Page 1 of 1
How to have string as a prototype type?
Posted: Sun Aug 13, 2006 1:14 am
by Shannara
For some reason, prototypes do not work if they are of a string type. However, regular callfunction(fast) works. Have anybody else experience the same?
Posted: Sun Aug 13, 2006 10:10 pm
by Shannara
23 views and no replies, must be a bug. Reported in bug section ...
Posted: Sun Aug 13, 2006 10:56 pm
by Trond
Code: Select all
Prototype.s ProtoA()
Procedure.s A()
ProcedureReturn "Works!"
EndProcedure
PtrA.ProtoA = @A()
Debug PtrA()
Posted: Sun Aug 13, 2006 10:59 pm
by netmaestro
It works from the main program, but I assumed he meant calling a function from a dll, where you still have to use PeekS() to get at a returned string. The prototype will successfully get floats, etc. from dlls but not strings.
Posted: Sun Aug 13, 2006 11:38 pm
by Shannara
Answer to using strings in prototypes from DLLs @
http://www.purebasic.fr/english/viewtopic.php?t=23161 
Thanks guys.