Revision 5dfeef22
Added by Hamish Coleman about 14 years ago
- ID 5dfeef22ba0cccf7acc408134bf78e573d847cac
win-scm.c | ||
---|---|---|
VOID WINAPI ServiceMain(DWORD argc, LPSTR *argv)
|
||
{
|
||
int err;
|
||
/*
|
||
* TODO
|
||
* - work out a race-free way to determine the correct sd ptr
|
||
* - once the correct sd is known, a void* could be passed to all the
|
||
* service functions, allowing the service to know
|
||
*/
|
||
struct SCM_def *sd = global_sd;
|
||
|
||
/* TODO - use RegisterServiceCtrlHandlerEx and pass the sd to it? */
|
||
svcHandle = RegisterServiceCtrlHandler(sd->name,ServiceCtrlHandler);
|
||
if (!svcHandle) {
|
||
/* FIXME - use SvcReportEvent() */
|
Also available in: Unified diff
Document a future direction