I have been working on a plugin for a while, and the user has to call the initialization command, which has no parameters and returns void.
I've tried many ways in the string table to represent this, but all the ways I've tried, DBP has refused to understand what I mean.
here are the things I've tried so far:
1,"IAC ALLOCATE RUNTIME FUNCTIONS%0%?initializeSystem%No Parameters"
...
1,"IAC ALLOCATE RUNTIME FUNCTIONS%?initializeSystem%No Parameters"
...
1,"IAC ALLOCATE RUNTIME FUNCTIONS%%?initializeSystem%No Parameters"
etc.
Using the first one, DBP says "can't find '?initializeSystem' in 0:dbprocore.dll"
Using the second, DBP says "parameter mismatch"
Using the third, DBP says "could not understand command at line #"
Any help?
hold on a minute... initializeSystem returns an integer... o.O easy fix for the stringtable...
EDIT: oh snap, now it says "can't determine parameter type" when i use the following entry
1,"IAC ALLOCATE RUNTIME FUNCTIONS[%L%?initializeSystem%No Parameters"
!!
EDIT: hmmm. it seems i've merely forgotten the paren.s in DBP.
EDIT: Well, now it seems to be looking in dbprocore.dll instead of MY dll, wherein the stringtable that holds the entry can be found.
It compiles, runs, but when it hits the command IAC ALLOCATE RUNTIME FUNCTIONS() it says "cannot find function '?initializeSystem' in 0:dbprocore.dll"
wtf?!
EDIT: I wasn't supposed to put a ? before a function when I use
extern "C".
So that's fixed now, my error handling in the DLL command has caught something shiny for me to look at and now I must fix that instead.
so... LoadLibrary is failing on me.
?
HMODULE dbpBasic3d;
...
dbpBasic3d = LoadLibrary( "DBProBasic3DDebug.dll" );
if(!dbpBasic3d)
{
MessageBox(NULL, "FATAL ERROR: IAC failed to load necessary libraries","FATAL USER PLUGIN ERROR", NULL);
return 0;
}
I copied this method straight from my other experimental DLL which I got working with some help o.O