diff options
author | Mark Spruiell <mes@zeroc.com> | 2004-01-08 22:09:13 +0000 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2004-01-08 22:09:13 +0000 |
commit | 6b3f920e7860c453a941c0d4fad4c46ee6fa4f38 (patch) | |
tree | 235f4a854ef977088744ec518bbf788887f3e9ba /cpp/src/Ice/DLLMain.cpp | |
parent | adding support for Win32 service (diff) | |
download | ice-6b3f920e7860c453a941c0d4fad4c46ee6fa4f38.tar.bz2 ice-6b3f920e7860c453a941c0d4fad4c46ee6fa4f38.tar.xz ice-6b3f920e7860c453a941c0d4fad4c46ee6fa4f38.zip |
adding support for Win32 event log
Diffstat (limited to 'cpp/src/Ice/DLLMain.cpp')
-rwxr-xr-x | cpp/src/Ice/DLLMain.cpp | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/cpp/src/Ice/DLLMain.cpp b/cpp/src/Ice/DLLMain.cpp new file mode 100755 index 00000000000..ce07b35254c --- /dev/null +++ b/cpp/src/Ice/DLLMain.cpp @@ -0,0 +1,38 @@ +// ********************************************************************** +// +// Copyright (c) 2004 +// ZeroC, Inc. +// Billerica, MA, USA +// +// All Rights Reserved. +// +// Ice is free software; you can redistribute it and/or modify it under +// the terms of the GNU General Public License version 2 as published by +// the Free Software Foundation. +// +// ********************************************************************** + +#include <Ice/EventLoggerI.h> + +extern "C" BOOL WINAPI _CRT_INIT(HINSTANCE, DWORD, LPVOID); + +extern "C" +{ + +BOOL WINAPI +Ice_DLL_Main(HINSTANCE hDLL, DWORD reason, LPVOID reserved) +{ + if(!_CRT_INIT(hDLL, reason, reserved)) + { + return FALSE; + } + + if(reason == DLL_PROCESS_ATTACH) + { + Ice::EventLoggerI::setModuleHandle(hDLL); + } + + return TRUE; +} + +} |