I've used the folowing code to retrieve a dll function which has this prototype...
__declspec(dllexport) void CreateGauge
(const char*, const char*, int);
-------------------------
here's the export table we can found when we take a look at the dll's quickview...
0000 00001041 ?CreateGauge@@YAXPBD0H@Z
-------------------------
#include <windows.h>
void main(){
HINSTANCE hLib;
void (*MyFunc)(const char*, const char*, int);
hLib = LoadLibrary("YtriaGUI.dll"
if (hLib){
MyFunc = (void (__cdecl *)(const char*, const char*, int))GetProcAddress(hLib, );
if (MyFunc!=NULL){
MyFunc("test1", "test2", 10000);
}
else{
MessageBox(NULL, "Function not found", "Error!", MB_OK);
}
}
else{
MessageBox(NULL, "Library not found", "Error!", MB_OK);
}
FreeLibrary(hLib);
}
****************************
The message containing "Function not found" is shown to me whick means that the program is unable to find my function... Does anyone has a suggestion?
thanks
****************************
__declspec(dllexport) void CreateGauge
(const char*, const char*, int);
-------------------------
here's the export table we can found when we take a look at the dll's quickview...
0000 00001041 ?CreateGauge@@YAXPBD0H@Z
-------------------------
#include <windows.h>
void main(){
HINSTANCE hLib;
void (*MyFunc)(const char*, const char*, int);
hLib = LoadLibrary("YtriaGUI.dll"
if (hLib){
MyFunc = (void (__cdecl *)(const char*, const char*, int))GetProcAddress(hLib, );
if (MyFunc!=NULL){
MyFunc("test1", "test2", 10000);
}
else{
MessageBox(NULL, "Function not found", "Error!", MB_OK);
}
}
else{
MessageBox(NULL, "Library not found", "Error!", MB_OK);
}
FreeLibrary(hLib);
}
****************************
The message containing "Function not found" is shown to me whick means that the program is unable to find my function... Does anyone has a suggestion?
thanks
****************************