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 / Return a string from dll?

Author
Message
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 27th Dec 2006 10:54
I have just got VS.net 2005 this christmas, and have been learning to create dlls for DBP. I used this page for help.

I've already created the example functions, and a few of my own, but I still don't know how you are supposed to return a dword for a string.
If you look on the table, it says in, LPSTR, out, DWORD???

If someone has some example c++ code for returning a string, that would be great

EddieB
19
Years of Service
User Offline
Joined: 29th Sep 2004
Location: United Kingdom
Posted: 27th Dec 2006 14:07
I found this on the forums, Three score coded it.



All its doing is "packing" a string into the dword. You would use the function like this:

DWORD MyDLLFunc()
{
DWORD tmp = dbstring("Hello world.");
return(tmp);
}
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 27th Dec 2006 17:12
Thanks, it's working now

Also, does anybody know of any more advanced tutorials about creating c++ plugins than returning the number 42?



EddieB
19
Years of Service
User Offline
Joined: 29th Sep 2004
Location: United Kingdom
Posted: 27th Dec 2006 21:01
What do you want to make?

Login to post a reply

Server time is: 2024-09-28 14:40:28
Your offset time is: 2024-09-28 14:40:28