diff options
author | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-04-21 22:43:24 +0000 |
---|---|---|
committer | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-04-21 22:43:24 +0000 |
commit | 8472a878ec8cba7368e89167176e076f07a04798 (patch) | |
tree | 2547fd491d04980a0407e42fa48de5d98d172c25 /examples/NT_Service/main.cpp | |
parent | 95499dedb111ee47f94b81e85d0cb08c59fbac42 (diff) | |
download | ATCD-8472a878ec8cba7368e89167176e076f07a04798.tar.gz |
ChangeLogTag:Sat Apr 21 15:31:27 2001 Carlos O'Ryan <coryan@uci.edu>
Diffstat (limited to 'examples/NT_Service/main.cpp')
-rw-r--r-- | examples/NT_Service/main.cpp | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/examples/NT_Service/main.cpp b/examples/NT_Service/main.cpp index 74472b4af4d..c517615a11e 100644 --- a/examples/NT_Service/main.cpp +++ b/examples/NT_Service/main.cpp @@ -14,7 +14,7 @@ // runs on Win32. // // = AUTHOR -// Gonzalo Diethelm <gonzo@cs.wustl.edu> +// Gonzalo Diethelm <gonzo@cs.wustl.edu> // and Steve Huston <shuston@riverace.com> // // ============================================================================ @@ -72,7 +72,7 @@ Process::~Process (void) ACE::fini (); } -void +void Process::print_usage_and_die (void) { ACE_DEBUG ((LM_INFO, @@ -89,11 +89,11 @@ Process::print_usage_and_die (void) ACE_OS::exit(1); } -void +void Process::parse_args (int argc, ACE_TCHAR* argv[]) { ACE_Get_Opt get_opt (argc, argv, ACE_TEXT ("i:rskt:d")); - int c; + int c; while ((c = get_opt ()) != -1) switch (c) @@ -143,6 +143,7 @@ Process::parse_args (int argc, ACE_TCHAR* argv[]) static BOOL __stdcall ConsoleHandler (DWORD ctrlType) { + ACE_UNUSED_ARG (ctrlType); SERVICE::instance ()->handle_control (SERVICE_CONTROL_STOP); return TRUE; } @@ -151,7 +152,7 @@ ACE_NT_SERVICE_DEFINE (Beeper, Service, ACE_TEXT ("Annoying Beeper Service")); -int +int Process::run (int argc, ACE_TCHAR* argv[]) { SERVICE::instance ()->name (ACE_TEXT ("Beeper"), @@ -195,12 +196,18 @@ Process::run (int argc, ACE_TCHAR* argv[]) "%p\n", "Couldn't start service")); } - + return 0; } -int +int main (int argc, ACE_TCHAR* argv[]) { return PROCESS::instance ()->run (argc, argv); } + +#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) +template class ACE_Singleton<Process, ACE_Mutex>; +#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) +#pragma instantiate ACE_Singleton<Process, ACE_Mutex> +#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ |