diff options
author | Chris Wilson <chris+github@qwirx.com> | 2006-08-09 12:38:20 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2006-08-09 12:38:20 +0000 |
commit | a79c301c0f1f42cdb32c3ccc2cc46c0877b29853 (patch) | |
tree | 61f675b444f4e010ede0d6a5d8b36573217dc5ff /bin | |
parent | 0a73aa9dfbd49d86036672c3953663313cf1790a (diff) |
* bin/bbackupd/Win32ServiceFunctions.cpp
- Keep a static char pointer to hold onto the config file name to
pass it to ServiceMain (over whose parameters we have no control).
- ServiceMain passes the config file name as the parameter of the
thread it creates.
Diffstat (limited to 'bin')
-rw-r--r-- | bin/bbackupd/Win32ServiceFunctions.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/bbackupd/Win32ServiceFunctions.cpp b/bin/bbackupd/Win32ServiceFunctions.cpp index 2897f822..f0449226 100644 --- a/bin/bbackupd/Win32ServiceFunctions.cpp +++ b/bin/bbackupd/Win32ServiceFunctions.cpp @@ -93,6 +93,8 @@ void WINAPI ServiceControlHandler( DWORD controlCode ) // It also returns on any error because the // service cannot start if there is an eror. +static char* spConfigFileName; + VOID ServiceMain(DWORD argc, LPTSTR *argv) { // initialise service status @@ -129,7 +131,7 @@ VOID ServiceMain(DWORD argc, LPTSTR *argv) NULL, 0, RunService, - 0, + spConfigFileName, CREATE_SUSPENDED, NULL); |