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.

DarkBASIC Professional Discussion / How does dbp load user plug-ins?

Author
Message
TRIGEN48
17
Years of Service
User Offline
Joined: 7th Aug 2008
Location: LOST IN CYBER SPACE
Posted: 10th Nov 2010 05:49
How does it do this? And how does it call the user plugin fuctions afterwards. This is interesting.
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 10th Nov 2010 14:37
When you run the compiler, one of the very first things it does is to scan all the DLLs in the plugins, plugins-licensed and plugins-user directories to get a list of all of the commands that are available - these are stored in memory, alongside the name of the DLL they came from.

As the compiler parses your DBPro code, it matches the commands you use against this list, so it knows which DLLs are used, and the entry points to the commands from those DLLs.

When the compiler writes the compiled code to disk, it writes out a table of the DLL names, and a cross-reference of entry-point names to DLLs.

When you execute your program, it uses the above lists to load the DLLs into memory, and get the entry-point addresses, then applies those addresses to the compiled code at the appropriate places.

There's a little more to it than that, but that's the basic method.

Utility plug-ins (26-JUL-2010)
I'm applying terms of use that require you to wear a red nose and honk a horn whenever you use the Internet
TRIGEN48
17
Years of Service
User Offline
Joined: 7th Aug 2008
Location: LOST IN CYBER SPACE
Posted: 10th Nov 2010 16:49
Thank you. I think thats excellent. It must have been hard to impliment.

Login to post a reply

Server time is: 2026-07-21 18:58:21
Your offset time is: 2026-07-21 18:58:21