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 / Getting handles to user-dlls

Author
Message
Hamish McHaggis
21
Years of Service
User Offline
Joined: 13th Dec 2002
Location: Modgnik Detinu
Posted: 26th Jun 2006 00:07 Edited at: 26th Jun 2006 00:07
Is there any way that anyone knows of getting the handle to a user-plugin? I know the handles to DBPro-dlls are passed in the GlobCore data:

(Delphi Code)


But I can't see any way to do the same for user-dlls. Maybe there is a function you can call? Thanks for any help.


Join the BlackOut Forum Today
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 26th Jun 2006 15:21
You use LoadLibrary with the name of the DLL.

For free Plug-ins and source code http://www.matrix1.demon.co.uk
Hamish McHaggis
21
Years of Service
User Offline
Joined: 13th Dec 2002
Location: Modgnik Detinu
Posted: 26th Jun 2006 16:48
Hmm, I'd already tried that and it didn't seem to work, but I will try again. So if I use LoadLibrary and then call a function in the dll, will DBPro, having loaded the dll itself, be affected by the dll? I was under the impression that LoadLibrary would load an instance of the dll that was linked only to my dll, not to DBPro.


Join the BlackOut Forum Today
Hamish McHaggis
21
Years of Service
User Offline
Joined: 13th Dec 2002
Location: Modgnik Detinu
Posted: 26th Jun 2006 18:02
Ok, I've figured it out. For anyone looking at this thread in the future, here is some info.

You can't access the user-dll commands as if you were calling them from in DBPro, but you can load the library as you said, and then call the dll's 'ReceiveCoreDataPtr' function to pass to it the GlobCore data. You can then use the dll, but the functions you call from your dll will be completely separate from the functions if you call them from within DBPro. E.g. With the D3DFunc dll you would do this to draw some text:



However, if you created a function 'MyDLL_StartText' with your DLL that called D3D_StartText, you couldn't do this:



As MyDLL_StartText is in a completely different instance from D3D_StartText. You would have to do this to get it to work:



Note that both fonts can successfully use FontID 1, as they exist in two completely different instances of the dll.


Join the BlackOut Forum Today

Login to post a reply

Server time is: 2024-11-22 06:50:11
Your offset time is: 2024-11-22 06:50:11