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.

Code Snippets / [DBP] - A minor workaround the returning of strings (without DBPRo crashing) when calling DLL FUNCTION PTRs, without the faffing around with more complex code

Author
Message
Bored of the Rings
13
Years of Service
User Offline
Joined: 25th Feb 2005
Location: Middle Earth
Posted: 21st Sep 2018 09:31
Here is a little code snippet for those wanting to return strings from external DLLs using function ptr calls. Obviously, I usually do all this stuff in VS C+, but wanted to play around a bit more with the DLL commands (Matrix1Utils) in DBPro.
The #constant is optional, I just wanted to see if it worked. I added a dummy function with one of the Testcommands2.dll to prevent DBPro crashing. I've attached the .dll file just in case anyone wants to experiment.



Professional Programmer, languages: SAS, C++, SQL, PL-SQL, DBPro, Purebasic, JavaScript, others

Attachments

Login to view attachments

Login to post a reply

Server time is: 2018-10-21 09:58:08
Your offset time is: 2018-10-21 09:58:08