Exemple #1
0
//-----------------------------------------------------------------------------
//Spying Process functions follow
//-----------------------------------------------------------------------------
void Desktop::EnableHook(IntPtr windowHandle) {

	HINSTANCE hinstDLL; 
	hinstDLL = LoadLibrary((LPCTSTR) _T("ManagedSpyLib.dll")); 

	DisableHook();
	DWORD tid = GetWindowThreadProcessId((HWND)windowHandle.ToPointer(), NULL);
	_messageHookHandle = SetWindowsHookEx(WH_CALLWNDPROC,
		(HOOKPROC)GetProcAddress(hinstDLL, "MessageHookProc"),
		hinstDLL,
		tid);
}
Exemple #2
0
bool CFidgetApp::Finalize(void)
{
    m_pMainFrame = NULL;
    DisableHook();
    if (NULL != m_hRichEdit)
    {
        ::FreeLibrary(m_hRichEdit);
        m_hRichEdit = NULL;
    }

    UnregisterClasses();
    return true;
}