As an test I added this to one of my DLL's
typedef struct tagCHARDATA
{
char * CharName;
DWORD CharID;
}CHARDATA, *PCHARDATA;
char * WINAPI Char_GetCharName(PCHARDATA Char);
int WINAPI Char_SetCharName(HWND HWNDMain, PCHARDATA Char, char *NewCharName);
DWORD WINAPI Char_GetCharID(PCHARDATA Char);
int WINAPI Char_SetCharID(HWND HWNDMain, PCHARDATA Char, DWORD NewCharID);
char * WINAPI Char_GetCharName(PCHARDATA Char)
{
if (Char == NULL)
return 0;
return "OK";
}
int WINAPI Char_SetCharName(HWND HWNDMain, PCHARDATA Char, char *NewCharName)
{
if (Char == NULL)
return 0;
return 1;
}
DWORD WINAPI Char_GetCharID(PCHARDATA Char)
{
if (Char == NULL)
return 0;
return 1;
}
int WINAPI Char_SetCharID(HWND HWNDMain, PCHARDATA Char, DWORD NewCharID)
{
if (Char == NULL)
return 0;
return 1;
}
Then added this to the def file.
"Char_GetCharName" = _Char_GetCharName@4
"Char_SetCharName" = _Char_SetCharName@12
"Char_GetCharID" = _Char_GetCharID@4
"Char_SetCharID" = _Char_SetCharID@12
All compiled ok.
John