I tried your code, but the string table wouldn't compile properly until I removed the includes at the beginning, this seemed to work:
STRINGTABLE
BEGIN
4, "TEST1[%S%_Z5test1v"
5, "TEST2[%SSS%_Z13ReverseStringmm"
END
make sure it's saved in a .rc file and that under Project>Project options>files the .rc file has 'include this file in the compilation' ticked.
dbpro should recognise the commands but at the moment they will crash because you need to receive the globstruct pointer from dbpro before you can use it to reference the 'CreateDeleteString' function.
In every dll that dbpro loads, it looks for the function '?ReceiveCoreDataPtr@@YAXPAX@Z' and if it finds it it sends the dll the globstruct pointer, this is what you need.
In visual c++ including this function in your code achieves this
GlobStruct *g_pGlob;
void ReceiveCoreDataPtr( void *cdp ){
g_pGlob = (GlobStruct *) cdp;
}
when it is compiled and mangled it appears as dbpro expects and is found. when this function is compiled in dev-c++ it is mangled differently and dbpro can't find it. We can change this by using a .def file (a bit like a stringtable) to specify exactly how we want our functions to look.
Add a new resource file to your project and give it a .def extension. then add these lines to it:
LIBRARY Project1
EXPORTS
?ReceiveCoreDataPtr@@YAXPAX@Z=_Z18ReceiveCoreDataPtrPv
('Project1' must be replaced by the name of your project)
plus any other functions that you want exported from your dll. In your case it would look like this:
LIBRARY Project1
EXPORTS
?ReceiveCoreDataPtr@@YAXPAX@Z=_Z18ReceiveCoreDataPtrPv
_Z5test1v
_Z13ReverseStringmm
Note: this file overwrites the __declspec(dllexport) and any functions not included in the .def will not be availabe to dbpro. __declspec is effectively ignored, so you can choose to leave it on your functions or remove it if you plan to continue with the .def file.
Including a funciton in the .def file without specifying how it should be exported (like the last two funcitons in the example) will be exported as they are (with the normal _Z8... format) or you can change the mangling yourself by using
LIBRARY Project1
EXPORTS
?ReceiveCoreDataPtr@@YAXPAX@Z=_Z18ReceiveCoreDataPtrPv
test1=_Z5test1v
test2=_Z13ReverseStringmm
the functions would then be exported as 'test1' and 'test2', however you still need a stringtable to make dbpro aware of them, and you must use the new function names in the stringtable, for example:
STRINGTABLE
BEGIN
4, "TEST1[%S%test1"
5, "TEST2[%SSS%test2"
END
With the .def file the 'ReceiveCoreDataPtr' should be found by dbpro and called automatically at load time, you can then use the globstruct pointer to access all the functions of dbpro.
If you have any questions feel free to ask.