MCPcopy Create free account
hub / github.com/OpenCppCoverage/OpenCppCoverage / DiaLoadCallback

Class DiaLoadCallback

CppCoverage/DebugInformationEnumerator.cpp:120–186  ·  view source on GitHub ↗

----------------------------------------------------------------------

Source from the content-addressed store, hash-verified

118
119 //----------------------------------------------------------------------
120 struct DiaLoadCallback : public IDiaLoadCallback
121 {
122 //------------------------------------------------------------------
123 HRESULT STDMETHODCALLTYPE QueryInterface(
124 REFIID riid,
125 _COM_Outptr_ void __RPC_FAR* __RPC_FAR* ppvObject) override
126 {
127 if (!ppvObject)
128 return E_POINTER;
129
130 if (riid == IID_IDiaLoadCallback)
131 {
132 *ppvObject = this;
133 return S_OK;
134 }
135
136 return E_NOINTERFACE;
137 }
138
139 //------------------------------------------------------------------
140 ULONG STDMETHODCALLTYPE AddRef() override
141 {
142 return 1; // On stack
143 }
144
145 //------------------------------------------------------------------
146 ULONG STDMETHODCALLTYPE Release() override
147 {
148 return 1; // On stack
149 }
150
151 //------------------------------------------------------------------
152 HRESULT STDMETHODCALLTYPE NotifyDebugDir(BOOL fExecutable,
153 DWORD cbData,
154 BYTE* pbData) override
155 {
156 return S_OK;
157 }
158
159 //------------------------------------------------------------------
160 HRESULT STDMETHODCALLTYPE NotifyOpenDBG(LPCOLESTR dbgPath,
161 HRESULT resultCode) override
162 {
163 return S_OK;
164 }
165
166 //------------------------------------------------------------------
167 HRESULT STDMETHODCALLTYPE NotifyOpenPDB(LPCOLESTR pdbPath,
168 HRESULT resultCode) override
169 {
170 LOG_DEBUG << "Try to load pdb from " << pdbPath << ": "
171 << (resultCode == S_OK ? "Success" : "Failed");
172 return S_OK;
173 }
174
175 //------------------------------------------------------------------
176 HRESULT STDMETHODCALLTYPE RestrictRegistryAccess() override
177 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected