CallFunction() Return Values

Just starting out? Need help? Post your questions and find answers here.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by blueb.

I have a DLL and one of it's procedures is:

AppPath() ;supposed to return a string: "c:\bob\"

Using CallFuntion() or CallFunctionFast()... all I get for
return values are numeric. Not string values. The help file
simply states:
'Result' contains the result of the called function."
How can I return string values from CallFunction() or CallFunctionFast()?

Regards,
--blueb
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by tranquil.

If you are only able to return values, just return a pointer to your string. Only as a Tip or did I understand something wrong!?

Mike

Tranquilizer/ Secretly!
http://www.secretly.de
Registred PureBasic User
System: Windows 2000 Server, 512 MB Ram, GeForce4200 TI 128 MB DDR, Hercules Theater 6.1 DTS Sound
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Rings.

ReturnvaluefromDLL=CallFunction(.......
MyStrings.s=Peeks(ReturnvaluefromDLL)'if it is a string


Its a long way to the top if you wanna .....CodeGuru
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Danilo.

AppPath$ = PeekS( CallFunction( #DLL, "AppPath" ) )

cya,
...Danilo
(registered PureBasic user)
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by blueb.

Thanks Danilo, That was the 'short' answer
I was looking for. :)

Regards,
--blueb
Post Reply