Click here to Skip to main content
14,367,886 members

C / C++ / MFC

 
QuestionCovert char array to unsined char array Pin
Tuscon15-Aug-06 23:54
memberTuscon15-Aug-06 23:54 
AnswerRe: Covert char array to unsined char array Pin
Rage16-Aug-06 0:03
professionalRage16-Aug-06 0:03 
AnswerRe: Covert char array to unsined char array Pin
Eytukan16-Aug-06 1:57
memberEytukan16-Aug-06 1:57 
AnswerRe: Covert char array to unsined char array Pin
Zac Howland16-Aug-06 5:22
memberZac Howland16-Aug-06 5:22 
Questioncallback in windows service Pin
_tasleem15-Aug-06 23:18
member_tasleem15-Aug-06 23:18 
AnswerRe: callback in windows service Pin
Milton Karimbekallil16-Aug-06 0:36
memberMilton Karimbekallil16-Aug-06 0:36 
GeneralRe: callback in windows service [modified] Pin
_tasleem16-Aug-06 0:56
member_tasleem16-Aug-06 0:56 
GeneralRe: callback in windows service Pin
Milton Karimbekallil16-Aug-06 1:43
memberMilton Karimbekallil16-Aug-06 1:43 
I had understood what exactly u meant. Ur windows hook is not working in a service app while it works fine in a desktop application. This is what I understood before and now as well. The answer is same as before.

Hope you are aware of the fact that the Desktop window is the parent window of all other windows we create using Createwindow() API. Actually this desktop what we are seeing is just one among a number of other desktops which Windows OS keeps invisible(some of them are visible as well. eg: logon desktop). This is a mystery to most of us. Actually there is something called a window station and a window station can have n number of desktops in it. A window station is a secure kernel object that contains a clipboard, a private atom table, a set of desktops, and a set of windows.
see the info http://www.pluralsight.com/wiki/default.aspx/Keith.GuideBook/WhatIsAWindowStation.html[^]

All our applications (including your desktop application what you were talking about) are running under a desktop called Winsta0\default.

But NT Services are running in a different window station and desktop called Service0x0-3e7$\default.

Your hook will not get invoked as there are no windows in the service desktop. So try by changing the service type to SERVICE_INTERACTIVE_PROCESS so that the service will run under Winsta0\default desktop and you will start getting the notifications in the windows hook.

cheers Milton KB
GeneralRe: callback in windows service Pin
_tasleem16-Aug-06 2:31
member_tasleem16-Aug-06 2:31 
GeneralRe: callback in windows service Pin
Milton Karimbekallil16-Aug-06 4:18
memberMilton Karimbekallil16-Aug-06 4:18 
GeneralRe: callback in windows service Pin
_tasleem17-Aug-06 3:01
member_tasleem17-Aug-06 3:01 
QuestionHow to disable USB Enhanced Host Controller by using VC++ code? Pin
momer15-Aug-06 23:16
membermomer15-Aug-06 23:16 
Questionproblem with LoadFrame Pin
sach!!15-Aug-06 23:06
membersach!!15-Aug-06 23:06 
QuestionLinker Error Pin
tom groezer15-Aug-06 23:02
membertom groezer15-Aug-06 23:02 
AnswerRe: Linker Error Pin
Rage16-Aug-06 0:05
professionalRage16-Aug-06 0:05 
GeneralRe: Linker Error Pin
tom groezer16-Aug-06 20:57
membertom groezer16-Aug-06 20:57 
GeneralRe: Linker Error Pin
tom groezer16-Aug-06 20:57
membertom groezer16-Aug-06 20:57 
QuestionMFC (database) please help ! Pin
Bravoone_200615-Aug-06 23:00
memberBravoone_200615-Aug-06 23:00 
AnswerRe: MFC (database) please help ! Pin
Milton Karimbekallil15-Aug-06 23:34
memberMilton Karimbekallil15-Aug-06 23:34 
QuestionRe: MFC (database) please help ! Pin
Bravoone_200616-Aug-06 0:22
memberBravoone_200616-Aug-06 0:22 
AnswerRe: MFC (database) please help ! Pin
Bravoone_200616-Aug-06 0:28
memberBravoone_200616-Aug-06 0:28 
GeneralRe: MFC (database) please help ! Pin
Milton Karimbekallil16-Aug-06 1:54
memberMilton Karimbekallil16-Aug-06 1:54 
AnswerRe: MFC (database) please help ! Pin
kakan16-Aug-06 0:29
professionalkakan16-Aug-06 0:29 
AnswerRe: MFC (database) please help ! Pin
Bravoone_200616-Aug-06 0:40
memberBravoone_200616-Aug-06 0:40 
GeneralRe: MFC (database) please help ! Pin
Bravoone_200616-Aug-06 0:41
memberBravoone_200616-Aug-06 0:41 

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.