Exemple #1
0
void CNotifyManager::SetNotifyWindow(HWND hwnd, UINT msgID)
{
	CBlockLock lock(&this->managerLock);

	this->hwndNotify = hwnd;
	this->msgIDNotify = msgID;
	SetNotifySrvStatus(0xFFFFFFFF);
}
Exemple #2
0
void CNotifyManager::RegistTCP(const REGIST_TCP_INFO& info)
{
	CBlockLock lock(&this->managerLock);

	UnRegistTCP(info);
	this->registTCPList.push_back(info);
	SetNotifySrvStatus(0xFFFFFFFF);
}
Exemple #3
0
void CNotifyManager::RegistGUI(DWORD processID)
{
	CBlockLock lock(&this->managerLock);

	{
		this->registGUIMap.insert(pair<DWORD,DWORD>(processID,processID));
		SetNotifySrvStatus(0xFFFFFFFF);
	}
}
Exemple #4
0
void CNotifyManager::RegistTCP(const REGIST_TCP_INFO& info)
{
	CBlockLock lock(&this->managerLock);

	{
		wstring key = L"";
		Format(key, L"%s:%d", info.ip.c_str(), info.port);

		this->registTCPMap.insert(pair<wstring,REGIST_TCP_INFO>(key,info));
		SetNotifySrvStatus(0xFFFFFFFF);
	}
}
Exemple #5
0
void CNotifyManager::RegistGUI(DWORD processID)
{
	CBlockLock lock(&this->managerLock);

	for( size_t i = 0; i < this->registGUIList.size(); i++ ){
		if( this->registGUIList[i].first == processID ){
			if( WaitForSingleObject(this->registGUIList[i].second, 0) == WAIT_TIMEOUT ){
				return;
			}
			UnRegistGUI(this->registGUIList[i].first);
			break;
		}
	}
	HANDLE hProcess = OpenProcess(SYNCHRONIZE, FALSE, processID);
	if( hProcess ){
		this->registGUIList.push_back(std::make_pair(processID, hProcess));
		SetNotifySrvStatus(0xFFFFFFFF);
	}
}