Click here to Skip to main content
15,909,645 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralCEditView Pin
Starodubtsev Sergey26-May-01 6:05
Starodubtsev Sergey26-May-01 6:05 
GeneralRe: CEditView Pin
27-May-01 7:40
suss27-May-01 7:40 
GeneralReading data from CFile Pin
26-May-01 2:52
suss26-May-01 2:52 
GeneralRe: Reading data from CFile Pin
26-May-01 3:46
suss26-May-01 3:46 
GeneralRe: Reading data from CFile Pin
26-May-01 5:15
suss26-May-01 5:15 
GeneralRe: Reading data from CFile Pin
27-May-01 1:02
suss27-May-01 1:02 
GeneralRe: Reading data from CFile Pin
27-May-01 7:48
suss27-May-01 7:48 
GeneralWinNT service and system shutdown Pin
"Le Phuc Nguyen Tuan"25-May-01 19:18
"Le Phuc Nguyen Tuan"25-May-01 19:18 
Hi all,
I have a servive that laucnh a third party program. When the system shuts
down, I try to use my service control handler to process the
SERVICE_CONTROL_SHUTDOWN request from the system for terminating the
launched program (by using TerminateProcess func), but it doesn't work and
the system pop up some message that says "OleMainTreadWndName cannot respond
to End Task Request". It seems the third party program gets hang! I then try
to use SetConsoleCtrlHandler() to setup a handler routine to catch the
CTRL_SHUTDOWN_EVENT and terminate the process a bit ealier than the
SERVICE_CONTROL_SHUTDOWN request, but it doesn't work either. Now I try to
add up the CTRL_LOGOFF_EVENT and terminate the process at this event, then
there is no error message shows up. It seems to me that I need to terminate
the process ealier, at the time my service receive the CTRL_LOGOFF_EVENT.
But the problem is, if user just log off, but not shut down the system, the
process gets terminated! Anyone know some way so that at the time I receive
the CTRL_LOGOFF_EVENT, I also know whether the system is going to shut down
or not?
Thank you for your help,
Rocky Lee


GeneralRe: WinNT service and system shutdown Pin
Ghazi H. Wadi28-May-01 7:19
Ghazi H. Wadi28-May-01 7:19 
GeneralSource code ... Pin
Hadi Rezaee25-May-01 18:43
Hadi Rezaee25-May-01 18:43 
GeneralRe: Source code ... Pin
Christian Graus26-May-01 22:25
protectorChristian Graus26-May-01 22:25 
GeneralRe: Source code ... Pin
Hadi Rezaee27-May-01 1:16
Hadi Rezaee27-May-01 1:16 
GeneralRe: Source code ... Pin
Christian Graus27-May-01 2:38
protectorChristian Graus27-May-01 2:38 
GeneralRe: Source code ... Pin
Hadi Rezaee27-May-01 4:04
Hadi Rezaee27-May-01 4:04 
GeneralRe: Source code ... Pin
Christian Graus27-May-01 12:00
protectorChristian Graus27-May-01 12:00 
GeneralRe: Source code ... Pin
Hadi Rezaee27-May-01 17:47
Hadi Rezaee27-May-01 17:47 
GeneralRe: Source code ... Pin
Christian Graus27-May-01 18:34
protectorChristian Graus27-May-01 18:34 
QuestionWhich media API to use? Pin
Jonathan Gilligan25-May-01 11:44
Jonathan Gilligan25-May-01 11:44 
AnswerRe: Which media API to use? Pin
l a u r e n26-May-01 0:14
l a u r e n26-May-01 0:14 
GeneralWTL Question Pin
25-May-01 10:43
suss25-May-01 10:43 
GeneralRe: WTL Question Pin
Ben Burnett26-May-01 17:35
Ben Burnett26-May-01 17:35 
GeneralContext menus and tree/list control item Pin
Jim A. Johnson25-May-01 10:41
Jim A. Johnson25-May-01 10:41 
GeneralRe: Context menus and tree/list control item Pin
Michael Dunn25-May-01 12:57
sitebuilderMichael Dunn25-May-01 12:57 
GeneralRe: Context menus and tree/list control item Pin
Jim A. Johnson25-May-01 16:00
Jim A. Johnson25-May-01 16:00 
GeneralRe: Context menus and tree/list control item Pin
Michael Dunn25-May-01 16:11
sitebuilderMichael Dunn25-May-01 16:11 

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.