Re: How to control another program to run cryptically?
"Sean" <email@example.com> wrote in message
thanks for your help
I'v installed a global hook in a DLL(SetWindowsHookEx(WH_CBT, CBTProc,
g_hInstDLL, 0)),this is the callback function:
LRESULT CALLBACK CBTProc(int nCode, WPARAM wParam, LPARAM lParam)
m_handle=OpenProcess(PROCESS_ALL_ACCESS, TRUE, m_PID);
pos = strcmp( &sFilename[n_count-12], "AcroRd32.exe" );
stream = fopen( "c:\\sys_fopen.txt", "at" );
fclose( stream );
Do a GetClassName( (HWND) wParam, ... ) and GetWindowText ( (HWND) wParam,
....) and see if you can identify the splash screen by either its window
class or its caption. Then invoke your file code only if it matches.
Since your CBTProc runs in the context of every process, I would try to
avoid use of the RTL functions fopen/fwrite/fclose and replace them with the
Also, do you do a CallNextHookEx() anywhere? You're supposed to.