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 / Help interacting with DBP libraries

Author
Message
Image All
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: Home
Posted: 27th Mar 2008 19:58
I found a few very helpful people on the GameDev IRC channel who taught me how to access functions from within DLLs which have no header file.

I made a simple TPC which is supposed to do nothing more than call one of DBP's commands form DBProBasic3DDebug.dll (position object), essentially wrapping the command. Apparently the DLL compiles fine, the library is loaded fine and the function is accessed fine... but when I use the command to move an object nothing happens. o_O I'm wondering if this is because the command I called was not what I thought it was... which brings me to my question: is there an easy way or tool to examine the string table resource in a DLL?

If you're interested in seeing if I merely did something wrong, which may also be the cause of lack of happenings, I've attached the project to this post.

Thanks

Attachments

Login to view attachments
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 27th Mar 2008 20:21
Quote: "Apparently the DLL compiles fine"

It does? Maybe for you, but not for me - you don't have a DllMain. Also, you shouldn't load the DLL with a full pathname in this case, because it's not the one you are executing.

Changed code:


DBPro test code:


When you compile your DBPro program, a copy of your DLL is included in the exe file, along with a copy of the Basic3D file.

When you execute the exe, everything is unpacked into a temporary directory and run from there.

What was happening was you were using LoadLibrary on a completely different Basic3D DLL and calling its function, not the one in the local copy being run by your program.

Image All
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: Home
Posted: 27th Mar 2008 21:07
Thank you IanM, that makes perfect sense

Now I can begin doing... stuff

Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 28th Mar 2008 17:51
Quote: "Maybe for you, but not for me - you don't have a DllMain"

Your compiler forces you to use an optional entry point?

IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 28th Mar 2008 19:11
Actually, I've just tested it in various compilers and no it doesn't. I must have picked up the habit from somewhere though ... maybe VC++6?

Login to post a reply

Server time is: 2024-11-23 02:34:03
Your offset time is: 2024-11-23 02:34:03