Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DLL Talk / PureBasic TPC Creation - Problem with returning strings

Author
Message
MikeK
20
Years of Service
User Offline
Joined: 13th Sep 2004
Location: Apparently
Posted: 4th Jan 2009 01:16
Hey,

After following the TPC Tutorial on how to create TPC's in Purebasic, a problem exists when attempting to return a string..

It works fine in the DBP runtime, but when closing the DBP application, a windows runtime error occurs on the application with the following information;



Now I assume this is because a string gets passed to the procedure initially which in C++ or whatever, people use CreateDestroyString to release it..

How is this possible in Purebasic?

Thanks

:: HybridTwo Sound & Music Production Studio : BinaryZoo Studios ::
Aelin
15
Years of Service
User Offline
Joined: 18th Feb 2009
Location: Infront of my computer.
Posted: 19th Feb 2009 16:47
Create a global string


Now, set the value in the function and return the pointer to the DBP.

If my memory serves correctly (it's been a while since I've used either DBP or PureBASIC) then this should work. Another option is to use Malloc or whatever function purebasic has.

I'm not looking to join any amateur teams, nor do I take requests.

Login to post a reply

Server time is: 2024-11-23 07:06:45
Your offset time is: 2024-11-23 07:06:45