-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathAnalysisToolsApp.cpp
More file actions
79 lines (58 loc) · 1.92 KB
/
AnalysisToolsApp.cpp
File metadata and controls
79 lines (58 loc) · 1.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
// Copyright (c) 1993-2018 Robert McNeel & Associates. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
// AnalysisToolsApp.cpp
#include "stdafx.h"
#include "AnalysisToolsApp.h"
// CAnalysisToolsApp
BEGIN_MESSAGE_MAP(CAnalysisToolsApp, CWinApp)
END_MESSAGE_MAP()
// The one and only CAnalysisToolsApp object
CAnalysisToolsApp theApp;
const GUID CDECL BASED_CODE _tlid = { 0x8E069405, 0x7078, 0x499A,{ 0xA8, 0x44, 0x5D, 0xB9, 0xB0, 0xC, 0x92, 0x52 } };
const WORD _wVerMajor = 1;
const WORD _wVerMinor = 0;
// CAnalysisToolsApp initialization
BOOL CAnalysisToolsApp::InitInstance()
{
CWinApp::InitInstance();
// Register all OLE server (factories) as running. This enables the
// OLE libraries to create objects from other applications.
COleObjectFactory::RegisterAll();
return TRUE;
}
int CAnalysisToolsApp::ExitInstance()
{
return CWinApp::ExitInstance();
}
// DllGetClassObject - Returns class factory
STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
return AfxDllGetClassObject(rclsid, riid, ppv);
}
// DllCanUnloadNow - Allows COM to unload DLL
STDAPI DllCanUnloadNow()
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
return AfxDllCanUnloadNow();
}
// DllRegisterServer - Adds entries to the system registry
STDAPI DllRegisterServer()
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
if (!AfxOleRegisterTypeLib(AfxGetInstanceHandle(), _tlid))
return SELFREG_E_TYPELIB;
if (!COleObjectFactory::UpdateRegistryAll())
return SELFREG_E_CLASS;
return S_OK;
}
// DllUnregisterServer - Removes entries from the system registry
STDAPI DllUnregisterServer()
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
if (!AfxOleUnregisterTypeLib(_tlid, _wVerMajor, _wVerMinor))
return SELFREG_E_TYPELIB;
if (!COleObjectFactory::UpdateRegistryAll(FALSE))
return SELFREG_E_CLASS;
return S_OK;
}