Click here to Skip to main content
15,888,454 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionCovert char array to unsined char array Pin
Tuscon15-Aug-06 22:54
Tuscon15-Aug-06 22:54 
AnswerRe: Covert char array to unsined char array Pin
Rage15-Aug-06 23:03
professionalRage15-Aug-06 23:03 
AnswerRe: Covert char array to unsined char array Pin
Eytukan16-Aug-06 0:57
Eytukan16-Aug-06 0:57 
AnswerRe: Covert char array to unsined char array Pin
Zac Howland16-Aug-06 4:22
Zac Howland16-Aug-06 4:22 
Questioncallback in windows service Pin
_tasleem15-Aug-06 22:18
_tasleem15-Aug-06 22:18 
AnswerRe: callback in windows service Pin
Milton Karimbekallil15-Aug-06 23:36
Milton Karimbekallil15-Aug-06 23:36 
GeneralRe: callback in windows service [modified] Pin
_tasleem15-Aug-06 23:56
_tasleem15-Aug-06 23:56 
GeneralRe: callback in windows service Pin
Milton Karimbekallil16-Aug-06 0:43
Milton Karimbekallil16-Aug-06 0: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 1:31
_tasleem16-Aug-06 1:31 
GeneralRe: callback in windows service Pin
Milton Karimbekallil16-Aug-06 3:18
Milton Karimbekallil16-Aug-06 3:18 
GeneralRe: callback in windows service Pin
_tasleem17-Aug-06 2:01
_tasleem17-Aug-06 2:01 
QuestionHow to disable USB Enhanced Host Controller by using VC++ code? Pin
momer15-Aug-06 22:16
momer15-Aug-06 22:16 
Questionproblem with LoadFrame Pin
sach!!15-Aug-06 22:06
sach!!15-Aug-06 22:06 
QuestionLinker Error Pin
tom groezer15-Aug-06 22:02
tom groezer15-Aug-06 22:02 
AnswerRe: Linker Error Pin
Rage15-Aug-06 23:05
professionalRage15-Aug-06 23:05 
GeneralRe: Linker Error Pin
tom groezer16-Aug-06 19:57
tom groezer16-Aug-06 19:57 
GeneralRe: Linker Error Pin
tom groezer16-Aug-06 19:57
tom groezer16-Aug-06 19:57 
QuestionMFC (database) please help ! Pin
Bravoone_200615-Aug-06 22:00
Bravoone_200615-Aug-06 22:00 
AnswerRe: MFC (database) please help ! Pin
Milton Karimbekallil15-Aug-06 22:34
Milton Karimbekallil15-Aug-06 22:34 
QuestionRe: MFC (database) please help ! Pin
Bravoone_200615-Aug-06 23:22
Bravoone_200615-Aug-06 23:22 
AnswerRe: MFC (database) please help ! Pin
Bravoone_200615-Aug-06 23:28
Bravoone_200615-Aug-06 23:28 
GeneralRe: MFC (database) please help ! Pin
Milton Karimbekallil16-Aug-06 0:54
Milton Karimbekallil16-Aug-06 0:54 
AnswerRe: MFC (database) please help ! Pin
kakan15-Aug-06 23:29
professionalkakan15-Aug-06 23:29 
AnswerRe: MFC (database) please help ! Pin
Bravoone_200615-Aug-06 23:40
Bravoone_200615-Aug-06 23:40 
GeneralRe: MFC (database) please help ! Pin
Bravoone_200615-Aug-06 23:41
Bravoone_200615-Aug-06 23: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.