예제 #1
0
파일: main.cpp 프로젝트: 0xmono/miranda-ng
extern "C" __declspec(dllexport) int Unload(void)
{
	UnhookWindowsHooks();
	if (hModulesLoaded)
		UnhookEvent(hModulesLoaded);
	if (hMsgEventHook)
		UnhookEvent(hMsgEventHook);
	if (hOptionsInitialize)
		UnhookEvent(hOptionsInitialize);
	if (hEnableService)
		DestroyServiceFunction(hEnableService);
	if (hDisableService)
		DestroyServiceFunction(hDisableService);
	if (hStartBlinkService)
		DestroyServiceFunction(hStartBlinkService);
	if (hEventsOpenedService)
		DestroyServiceFunction(hEventsOpenedService);
	if (hFlashingEventService)
		DestroyServiceFunction(hFlashingEventService);
	if (hNormalizeSequenceService)
		DestroyServiceFunction(hNormalizeSequenceService);

	// Wait for thread to exit
	SetEvent(hExitEvent);
	WaitForSingleObject(hThread, INFINITE);

	RestoreLEDState();
	CloseKeyboardDevice();

	destroyProcessList();
	destroyProtocolList();

	return 0;
}
예제 #2
0
파일: main.cpp 프로젝트: kxepal/miranda-ng
extern "C" __declspec(dllexport) int Unload(void)
{
	UnhookWindowsHooks();

	// Wait for thread to exit
	WaitForSingleObject(hThread, INFINITE);

	RestoreLEDState();
	CloseKeyboardDevice();

	destroyProcessList();
	destroyProtocolList();
	return 0;
}