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.

Dark GDK / Ummm Has anybody else noticed (dbLoadDLL)

Author
Message
flip sk8r11
18
Years of Service
User Offline
Joined: 23rd Aug 2006
Location:
Posted: 26th Nov 2007 01:17
That with the dark gdk the load dll function doesnt take a character string for the name of the dll instead it takes a dword when i try to use a string it doesnt compile but when i use an integer ie 1 or 2 it compiles fine and then crashes
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 26th Nov 2007 02:00 Edited at: 26th Nov 2007 02:00
is there another way to load a dll in c++ and use it with the dgk, aside from the LoadDll command?

I find I use the dgdk for only the commands needed to deal with DX, all else is done natively. Thats not to say it shouldnt be working, just an observation.

My DBP plugins page is now hosted [href]here[/href]
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 26th Nov 2007 14:27
The best way to use DLLs from C++ is via LoadLibrary/FreeLibrary/GetProcAddress, however I did write a wrapper for the DGDK for DLLs a while back that uses the dbLoadDll/dbCallDll/dbDeleteDll commands.

Do a search in this forum for now. If you can't find it, I'll repost the code.

Utility plugins collection and
http://www.matrix1.demon.co.uk for older plug-ins and example code
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 27th Nov 2007 18:33
*Sigh* Broken again, in another way.

This works with VC++2008


Utility plugins collection and
http://www.matrix1.demon.co.uk for older plug-ins and example code
Mike Johnson
TGC Developer
22
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United Kingdom
Posted: 27th Nov 2007 19:41
I will get these functions corrected for the next release.
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 27th Nov 2007 21:08 Edited at: 27th Nov 2007 21:10
Thanks Mike.

Can you take a look at changing the char* stuff to const char* too? It's a real pain to constantly have to cast away constness to compile.

Not, only that, but it also assists the compiler in some of its optimisations - if you call a function with a const pointer, the compiler can assume that that thing pointed to doesn't change during the call and can make some optimisations based upon that.

Utility plugins collection and
http://www.matrix1.demon.co.uk for older plug-ins and example code

Login to post a reply

Server time is: 2024-09-29 05:28:22
Your offset time is: 2024-09-29 05:28:22