Ok I have a Windows form which calls a DLL, both of which written by me.
I have a start form which is the main form which calls the DLL (frontend form).
The DLL processes data passed to it from the form and returns results.
I have a second form which is opened after the DLL is called, which shows the results passed back from the DLL (results form).
So I have a public function on the results form (although it doesn't actually do anything):
public ref class Results : public System::Windows::Forms::Form
//TODO: Add the constructor code here
void updateStatus(unsigned __int64 number, int field, char* status)
The function is defined in the dll header:
extern __declspec(dllexport) int startRecovery(int argc, char **argv, char* caseRoot, int(*updateStatus)(unsigned __int64 number, int field, char* status);
extern __declspec(dllimport) int startRecovery(int argc, char **argv, char* caseRoot, int(*updateStatus)(unsigned __int64 number, int field, char* status));
So in my frontend form I try to call the DLL:
startRecovery(8,arguments, path, *****);
My problem is where I have ****, I'm not sure how i reference the pointer for the updateStatus function.
Do I have to create an instance of the object (Resultsform ^frmRes = gcnew Resultsform)?
Either way I can't seem to figure how to pass the address for the function. Any ideas?