ICP  1
nxlogcom.cpp
Go to the documentation of this file.
1 // nxlogcom.cpp : Implementation of DLL Exports.
2 
3 
4 #include "stdafx.h"
5 #include "resource.h"
6 #include "nxlogcom.h"
7 
8 
9 class CnxlogcomModule : public CAtlDllModuleT< CnxlogcomModule >
10 {
11 public :
12  DECLARE_LIBID(LIBID_nxlogcomLib)
13  DECLARE_REGISTRY_APPID_RESOURCEID(IDR_NXLOGCOM, "{10D4420E-CBAF-4D6D-85E9-52C4A5506AC4}")
14 };
15 
17 
18 class CnxlogcomApp : public CWinApp
19 {
20 public:
21 
22 // Overrides
23  virtual BOOL InitInstance();
24  virtual int ExitInstance();
25 
26  DECLARE_MESSAGE_MAP()
27 };
28 
29 BEGIN_MESSAGE_MAP(CnxlogcomApp, CWinApp)
30 END_MESSAGE_MAP()
31 
33 
34 BOOL CnxlogcomApp::InitInstance()
35 {
36  return CWinApp::InitInstance();
37 }
38 
40 {
41  return CWinApp::ExitInstance();
42 }
43 
44 
45 // Used to determine whether the DLL can be unloaded by OLE
46 STDAPI DllCanUnloadNow(void)
47 {
48  AFX_MANAGE_STATE(AfxGetStaticModuleState());
49  return (AfxDllCanUnloadNow()==S_OK && _AtlModule.GetLockCount()==0) ? S_OK : S_FALSE;
50 }
51 
52 
53 // Returns a class factory to create an object of the requested type
54 STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv)
55 {
56  return _AtlModule.DllGetClassObject(rclsid, riid, ppv);
57 }
58 
59 
60 // DllRegisterServer - Adds entries to the system registry
61 STDAPI DllRegisterServer(void)
62 {
63  // registers object, typelib and all interfaces in typelib
64  HRESULT hr = _AtlModule.DllRegisterServer();
65  return hr;
66 }
67 
68 
69 // DllUnregisterServer - Removes entries from the system registry
70 STDAPI DllUnregisterServer(void)
71 {
72  HRESULT hr = _AtlModule.DllUnregisterServer();
73  return hr;
74 }
75 
#define IDR_NXLOGCOM
Definition: Resource.h:6
virtual int ExitInstance()
Definition: nxlogcom.cpp:39
virtual BOOL InitInstance()
Definition: nxlogcom.cpp:34
STDAPI DllCanUnloadNow(void)
Definition: selogcom.cpp:46
STDAPI DllRegisterServer(void)
Definition: selogcom.cpp:61
CselogcomApp theApp
Definition: selogcom.cpp:32
CisisicpModule _AtlModule
Definition: isisicp.cpp:71
STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
Definition: selogcom.cpp:54
STDAPI DllUnregisterServer(void)
Definition: selogcom.cpp:70