Posted: Mon Jan 13, 2003 5:24 am
Restored from previous forum. Originally posted by mindplay.
I'm calling a function in a DLL, with CallFunction, and it returns a pointer to a string - how do I copy that string into an ordinary string variable so I can print it out?
My idea was to make a little procedure that takes a point as an argument, and returns a string, so I wrote this:
Procedure.s PStr(*str.s)
ProcedureReturn *str.s
EndProcedure
and then I would use it like this:
mystring = PStr(CallFunction(0, "GetDeviceInfo"))
but it won't compile my call to PStr() - it says "bad parameter type, a string is expected" ... but how come a string is expected for PStr, when I've specifically declared the parameter as a POINTER to a string, not just a string??
help, please! thanks
I'm calling a function in a DLL, with CallFunction, and it returns a pointer to a string - how do I copy that string into an ordinary string variable so I can print it out?
My idea was to make a little procedure that takes a point as an argument, and returns a string, so I wrote this:
Procedure.s PStr(*str.s)
ProcedureReturn *str.s
EndProcedure
and then I would use it like this:
mystring = PStr(CallFunction(0, "GetDeviceInfo"))
but it won't compile my call to PStr() - it says "bad parameter type, a string is expected" ... but how come a string is expected for PStr, when I've specifically declared the parameter as a POINTER to a string, not just a string??
help, please! thanks
