I get no errors here (again, in function int APIENTRY InnoVisitClient::_tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow)):
//set initial values through the manager
manager = remoteClient->InitEngine(sipAccount, hWndChildVideo, hWndChildPreview);
manager->OnIncommingCall = &IncomingCall; //function you can here call manager->AnswerCall() or manager->RejectCall();
manager->OnCallReleased = &CallReleased;
manager is of type IRManager*, which is defined in a seperate file. The manager object is a private member variable or class Client (sorry, where it said "InnoVisitClient" above should have been simply "Client")
I don't think it's a problem with the function. It's declared properly, but the problem seems to be for any member of IRManager that occurs outside of the Main function:
manager->HangUp(); //again, in a different Client function
manager->StopPreview(); //occurs multiple times in various functions
manager->StartPreview(); //occurs multiple times in various functions
manager->AnswerCall(); //occurs multiple times in various functions
manager->RejectCall(); //occurs multiple times in various functions
The problem with the manager occurs in a public member function of class Client. Do I need to create an instance of the class Client inside the member function? I've never seen that.
No, no. You have IRManager* manager; in your Client class. It should be fine to invoke manager's member functions. But, in general a static member function cannot directly call a non-static member function. Like here.
And when you say "main" function, you mean Client::_tWinMain. Right?
And the error message right at that line (manager->HangUp();) ?