ICP  1
selogcom.cpp
Go to the documentation of this file.
1 // selogcom.cpp : Implementation of DLL Exports.
2 
3 
4 #include "stdafx.h"
5 #include "resource.h"
6 #include "selogcom.h"
7 
8 
9 class CselogcomModule : public CAtlDllModuleT< CselogcomModule >
10 {
11 public :
12  DECLARE_LIBID(LIBID_selogcomLib)
13  DECLARE_REGISTRY_APPID_RESOURCEID(IDR_SELOGCOM, "{E2325115-0508-48B0-88E7-4CDD9217B24E}")
14 };
15 
17 
18 class CselogcomApp : 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(CselogcomApp, CWinApp)
30 END_MESSAGE_MAP()
31 
33 
34 BOOL CselogcomApp::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 
virtual BOOL InitInstance()
Definition: selogcom.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
virtual int ExitInstance()
Definition: selogcom.cpp:39
STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
Definition: selogcom.cpp:54
#define IDR_SELOGCOM
Definition: Resource.h:6
STDAPI DllUnregisterServer(void)
Definition: selogcom.cpp:70