int CPMSifDlg::EncodeAndSend(char *firstName, char *lastName, char *roomNumber, char *userId, char *userFirstName, char *userLastName)
{
...
return 1;
}
extern "C"
{
__declspec(dllexport) int start(char *firstName, char *lastName, char *roomNumber, char *userId, char *userFirstName, char *userLastName)
{
return CPMSifDlg::EncodeAndSend(firstName, lastName, roomNumber, userId, userFirstName, userLastName);
}
}
On line return CPMSifDlg::EncodeAndSend
I have an error :
Error : a nonstatic member reference must be relative to a specific object.
What does it mean?
EncodeAndSend
is not a static function, which means it can be called on an instance of the class CPMSifDlg
. You cannot write this:
CPMSifDlg::EncodeAndSend(/*...*/); //wrong - EncodeAndSend is not static
It should rather be called as:
CPMSifDlg dlg; //create instance, assuming it has default constructor!
dlg.EncodeAndSend(/*...*/); //correct