MCPcopy Create free account
hub / github.com/clechasseur/pathcopycopy / DllInstall

Function DllInstall

PathCopyCopy/src/PathCopyCopy.cpp:97–125  ·  view source on GitHub ↗

DllInstall - Adds/Removes entries to the system registry per user per machine.

Source from the content-addressed store, hash-verified

95// DllInstall - Adds/Removes entries to the system registry per user
96// per machine.
97STDAPI DllInstall(BOOL bInstall, LPCWSTR pszCmdLine)
98{
99 HRESULT hr = E_FAIL;
100 static const wchar_t szUserSwitch[] = _T("user");
101
102 if (pszCmdLine != nullptr)
103 {
104#pragma warning(suppress: ALL_CPPCORECHECK_WARNINGS)
105 if (_wcsnicmp(pszCmdLine, szUserSwitch, _countof(szUserSwitch)) == 0)
106 {
107 ATL::AtlSetPerUserRegistration(true);
108 }
109 }
110
111 if (bInstall)
112 {
113 hr = DllRegisterServer();
114 if (FAILED(hr))
115 {
116 DllUnregisterServer();
117 }
118 }
119 else
120 {
121 hr = DllUnregisterServer();
122 }
123
124 return hr;
125}

Callers

nothing calls this directly

Calls 2

DllRegisterServerFunction · 0.70
DllUnregisterServerFunction · 0.70

Tested by

no test coverage detected