Click here to Skip to main content
15,923,689 members
Home / Discussions / C#
   

C#

 
GeneralRe: BackgroundWorker and STA threading model ? Pin
Christian Graus13-Apr-07 10:59
protectorChristian Graus13-Apr-07 10:59 
GeneralRe: BackgroundWorker and STA threading model ? Pin
Pete O'Hanlon15-Apr-07 9:18
mvePete O'Hanlon15-Apr-07 9:18 
Questionregioning, drag'n'drop & saving drafts Pin
xtremetechnology13-Apr-07 0:43
xtremetechnology13-Apr-07 0:43 
QuestionDetect system shutdown Pin
Bob Stanneveld13-Apr-07 0:11
Bob Stanneveld13-Apr-07 0:11 
AnswerRe: Detect system shutdown Pin
originSH13-Apr-07 0:17
originSH13-Apr-07 0:17 
AnswerRe: Detect system shutdown Pin
lucjon13-Apr-07 0:35
lucjon13-Apr-07 0:35 
GeneralRe: Detect system shutdown Pin
Bob Stanneveld13-Apr-07 1:02
Bob Stanneveld13-Apr-07 1:02 
AnswerRe: Detect system shutdown Pin
Dave Kreskowiak13-Apr-07 8:11
mveDave Kreskowiak13-Apr-07 8:11 
You can call the Win32 API function RegisterServiceCtrlHandlerEx[^] to register your service to receive window message-based notification, like WM_QUERYENDSESSION or WM_ENDSESSION.

But, there's a downside to doing this. Once you call RegisterServiceCtrlHandlerEx, the normal ServiceBase's control handlers, like OnStart, OnStop, ..., will no longer work. You'll have to handle the Service Control messages and do the dispatching to your handlers yourself.

Sorry, I don't have any examples handy.


Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic
     2006, 2007


AnswerRe: Detect system shutdown Pin
Jupiter913-Apr-07 11:17
Jupiter913-Apr-07 11:17 
QuestionRe: Detect system shutdown Pin
Bob Stanneveld16-Apr-07 1:36
Bob Stanneveld16-Apr-07 1:36 
QuestionSmiley icon to be displayed in listbox. Pin
Nekshan12-Apr-07 23:57
Nekshan12-Apr-07 23:57 
AnswerRe: Smiley icon to be displayed in listbox. Pin
Christian Graus13-Apr-07 0:00
protectorChristian Graus13-Apr-07 0:00 
GeneralRe: Smiley icon to be displayed in listbox. Pin
Luc Pattyn13-Apr-07 1:54
sitebuilderLuc Pattyn13-Apr-07 1:54 
GeneralRe: Smiley icon to be displayed in listbox. Pin
Christian Graus13-Apr-07 10:54
protectorChristian Graus13-Apr-07 10:54 
AnswerRe: Smiley icon to be displayed in listbox. Pin
virendra patel13-Apr-07 0:02
virendra patel13-Apr-07 0:02 
GeneralRe: Smiley icon to be displayed in listbox. Pin
Obaid ur Rehman13-Apr-07 1:39
Obaid ur Rehman13-Apr-07 1:39 
QuestionProblem writing XML Pin
blackjack215012-Apr-07 23:41
blackjack215012-Apr-07 23:41 
AnswerRe: Problem writing XML Pin
Christian Graus12-Apr-07 23:46
protectorChristian Graus12-Apr-07 23:46 
GeneralRe: Problem writing XML Pin
blackjack215012-Apr-07 23:50
blackjack215012-Apr-07 23:50 
GeneralRe: Problem writing XML Pin
Christian Graus12-Apr-07 23:50
protectorChristian Graus12-Apr-07 23:50 
GeneralRe: Problem writing XML Pin
Dave Kreskowiak13-Apr-07 3:24
mveDave Kreskowiak13-Apr-07 3:24 
Questionprolog dll Vs c# or C++ ,how and why? Pin
ismail marmoush12-Apr-07 23:38
ismail marmoush12-Apr-07 23:38 
AnswerRe: prolog dll Vs c# or C++ ,how and why? Pin
Christian Graus12-Apr-07 23:50
protectorChristian Graus12-Apr-07 23:50 
GeneralRe: prolog dll Vs c# or C++ ,how and why? Pin
ismail marmoush13-Apr-07 0:01
ismail marmoush13-Apr-07 0:01 
GeneralRe: prolog dll Vs c# or C++ ,how and why? Pin
Christian Graus13-Apr-07 0:15
protectorChristian Graus13-Apr-07 0:15 

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.