Server Setup


Your main server should call this function from the DLL:

extern "C" HRESULT __stdcall IGiveHelp(
	HWND hParent,
HICON hIcon, unsigned short Port1, std::function <HRESULT(vector<char>& ticket, string& ip, int& port)> facc, const wchar_t* SuppName, int MaxUsers, vector<tuple<string,unsigned short>>* Redirects)

This function expects:

A scenario for the redirect case would be:

 

Client Setup


Your application, running in your client, should call this function from the DLL:

extern "C" HRESULT __stdcall IWantHelp(
	HWND hParent,
	HICON hIcon, 	
	const char* host,
	int TCPPort,
	const wchar_t* MyName,
   	bool BlackScreen)

This function expects the HWND Parent (can be null), an HICON to show in the waiting dialog, the host name of the server and the TCP port of the server, along with a customer name. If BlackScreen is true, then the screen background is removed for the connection. If the connection fails, this function returns a HRESULT error code. If the connection succeeds, this function does not return as long as the help session is ongoing. When the help session is terminated, this function returns a HRESULT success code.