If not too late, I'll give you the steps to create a DLL in VC++ express edition:
1. Open VC++ Express
2. Select New > Project
3. Use the project type
Win32 and select
Win32 Project
4. In the dialog box, select
Application Settings and check the
DLL radio button.
5. Your project is now created. Browse to your project directory and use notepad to create an empty .rc file. I do this by first creating a new text document, then open it, and save it to something like "
resource.rc" (you have to type .rc yourself).
6. Rightclick the resource folder in VC++ Express and use "add an existing file" to add the resource file to your project. Do the same with the globstruct.h and dbpsh.h files.
7. Finally, you just have to copy this part in the .cpp file:
#include "dbpsh.h"
//Global constructs go here
GlobStruct* g_pGlob = NULL;
//Export
#define MYCOMMAND __declspec( dllexport )
//Constructor
MYCOMMAND
void Constructor ( void )
{
//Constructor code
}
//Destructor
MYCOMMAND
void Destructor ( void )
{
//Destructor code
}
//Get DBP core pointer
MYCOMMAND
void ReceiveCoreDataPtr ( LPVOID pCore )
{
g_pGlob = (GlobStruct*)pCore;
}
Your resource file is built as followed:
STRINGTABLE
BEGIN
//Command list
END
Where each command is built as followed:
nr, "COMMAND%PARAMETERS%DECOR_NAMES%DESCRIPTION"
nr is an index starting from 1 all the way up.
COMMAND is the command DBP will take.
PARAMETERS search the forums for this one.
DECOR_NAMES can be found by opening the compiled DLL in notepad, and use Find (CTRL + F) for the functions you declared in your source code. If you had for example
void Hello(int a,b); you would search for
Hello and copy the string starting by a
?Hello@@[some chars until a space].
No other things have to be written in this resource file for it to work.
I agree, it takes a bit more time to create a DLL in VC++ Express edition, but it works.