Click here to Skip to main content
15,911,646 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: win32 openssl based client socket application Pin
Mark Salsbery24-Apr-08 6:26
Mark Salsbery24-Apr-08 6:26 
GeneralRe: win32 openssl based client socket application Pin
amit_pansuria25-Apr-08 19:35
amit_pansuria25-Apr-08 19:35 
GeneralRe: win32 openssl based client socket application Pin
Mark Salsbery26-Apr-08 6:22
Mark Salsbery26-Apr-08 6:22 
Questionhow to create a hook which monitors foreground windows using WinCE for Pocket PC Pin
Shashi.Shinde23-Apr-08 23:04
Shashi.Shinde23-Apr-08 23:04 
AnswerRe: how to create a hook which monitors foreground windows using WinCE for Pocket PC Pin
Cedric Moonen23-Apr-08 23:13
Cedric Moonen23-Apr-08 23:13 
GeneralRe: how to create a hook which monitors foreground windows using WinCE for Pocket PC Pin
Shashi.Shinde23-Apr-08 23:41
Shashi.Shinde23-Apr-08 23:41 
GeneralRe: how to create a hook which monitors foreground windows using WinCE for Pocket PC Pin
Cedric Moonen23-Apr-08 23:50
Cedric Moonen23-Apr-08 23:50 
AnswerRe: how to create a hook which monitors foreground windows using WinCE for Pocket PC Pin
Naveen23-Apr-08 23:44
Naveen23-Apr-08 23:44 
Shashi.Shinde wrote:
hEvtHook = SetWinEventHook (EVENT_SYSTEM_FOREGROUND, EVENT_SYSTEM_FOREGROUND,
NULL, ForegroundProc, 0, 0,
WINEVENT_OUTOFCONTEXT);


There are some mistakes in your code. To dynamically call the SetWinEventHook function, follow the below code. Also those modification in the winuser.h is not needed...

typedef HWINEVENTHOOK (WINAPI *SetWinEventHookDef)(DWORD, DWORD, HMODULE, WINEVENTPROC, DWORD, DWORD, DWORD);

SetWinEventHookDef pSetWinEventHook = (SetWinEventHookDef)GetProcAddress(g_hHkApiDLLBox,
                                      _T("SetWinEventHook"));
if(pSetWinEventHook == NULL)
{
AfxMessageBox(_T("Error to install hook procedure"));
//this means that MS has really stopped supporting this API in WinCE
return false;
}
else
{
hEvtHook = pSetWinEventHook(EVENT_SYSTEM_FOREGROUND, 
                                   EVENT_SYSTEM_FOREGROUND,
                                   NULL, ForegroundProc, 0, 0,
                                   WINEVENT_OUTOFCONTEXT);
}



GeneralRe: how to create a hook which monitors foreground windows using WinCE for Pocket PC Pin
Shashi.Shinde24-Apr-08 1:50
Shashi.Shinde24-Apr-08 1:50 
GeneralUsing Wuapi at visual c++ Pin
monsieur_jj23-Apr-08 22:42
monsieur_jj23-Apr-08 22:42 
GeneralFile operation Pin
Chandrasekharan P23-Apr-08 22:33
Chandrasekharan P23-Apr-08 22:33 
QuestionRe: File operation Pin
CPallini23-Apr-08 22:49
mveCPallini23-Apr-08 22:49 
GeneralRe: File operation Pin
Chandrasekharan P23-Apr-08 22:51
Chandrasekharan P23-Apr-08 22:51 
GeneralRe: File operation Pin
CPallini23-Apr-08 23:17
mveCPallini23-Apr-08 23:17 
GeneralRe: File operation Pin
David Crow24-Apr-08 3:59
David Crow24-Apr-08 3:59 
Generalpassing a value from one exe to another Pin
Le@rner23-Apr-08 22:20
Le@rner23-Apr-08 22:20 
GeneralRe: passing a value from one exe to another Pin
CPallini23-Apr-08 22:30
mveCPallini23-Apr-08 22:30 
AnswerRe: passing a value from one exe to another Pin
prasad_som24-Apr-08 2:05
prasad_som24-Apr-08 2:05 
QuestionUsername & password!! Pin
Ajay L D23-Apr-08 22:19
Ajay L D23-Apr-08 22:19 
JokeRe: Username & password!! Pin
CPallini23-Apr-08 22:24
mveCPallini23-Apr-08 22:24 
GeneralRe: Username & password!! Pin
tina->newcoder23-Apr-08 22:55
tina->newcoder23-Apr-08 22:55 
JokeRe: Username & password!! Pin
_AnsHUMAN_ 23-Apr-08 23:14
_AnsHUMAN_ 23-Apr-08 23:14 
JokeRe: Username & password!! Pin
CPallini23-Apr-08 23:32
mveCPallini23-Apr-08 23:32 
JokeRe: Username & password!! Pin
Hamid_RT24-Apr-08 6:02
Hamid_RT24-Apr-08 6:02 
GeneralRe: Username & password!! Pin
CPallini24-Apr-08 21:44
mveCPallini24-Apr-08 21:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.