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 / Simple DB callable dll

Author
Message
Master Xilo
17
Years of Service
User Offline
Joined: 8th Sep 2006
Location: Bern, Switzerland
Posted: 11th Jan 2009 18:27 Edited at: 11th Jan 2009 18:28
All the code:





EDIT:
nothing changes if I call it with just

It says "could not call dll function".

If I do the same, but with this EXPORT define:

Then it just works in GameMaker, what's wrong with my "DB-version"?

thx

IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 11th Jan 2009 19:03
The name of that function in the compiled DLL is NOT MB - it's '?MB@@YAXXZ', which is the C++ mangled name (used to allow functions of the same name to be overloaded with different alternatives).

If you define EXPORT like you do for GameMaker then it will be MB because you will have told it to compile for C, which doesn't use mangled names.

Master Xilo
17
Years of Service
User Offline
Joined: 8th Sep 2006
Location: Bern, Switzerland
Posted: 11th Jan 2009 19:09
OK
Now how would I make this command useable like any DB command?
Can I just put the dll in the "Compiler/pluginsuser" folder?

IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 11th Jan 2009 19:24
If this is a DBPro plug-in (which you didn't state originally) then ...

You'd read the 'Technical Documents->Third Party Commands' in the DBPro help files

However, add the following resource string to your DLL:


Then drop the file into you plugins-user folder.

If this is a DB plug-in, then you just place the DLL into your project folder and use the LOAD DLL/CALL DLL stuff.

Master Xilo
17
Years of Service
User Offline
Joined: 8th Sep 2006
Location: Bern, Switzerland
Posted: 11th Jan 2009 19:32
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 11th Jan 2009 19:50
Add a resource string to your project.
If you are using a version of C++ that doesn't include a resource editor, then get one of the editors at the bottom of this page

Master Xilo
17
Years of Service
User Offline
Joined: 8th Sep 2006
Location: Bern, Switzerland
Posted: 11th Jan 2009 19:54
Ok, I see, and I read the
Quote: "'Technical Documents->Third Party Commands'"

too
Thank you!

Now back to my normal dll callable by these LOAD DLL/CALL DLL functions:
I want it to create a dialog box specified in the resource file, but it doesn't work. (meaning there's just nothing showing up)
Message boxes (MessageBox) work however.



Master Xilo
17
Years of Service
User Offline
Joined: 8th Sep 2006
Location: Bern, Switzerland

Login to post a reply

Server time is: 2024-03-29 06:22:18
Your offset time is: 2024-03-29 06:22:18