MCPcopy Create free account
hub / github.com/decoder-it/ADCSCoercePotato / QueryInterface

Method QueryInterface

IStorageTrigger.cpp:188–217  ·  view source on GitHub ↗

//////////////////IUknown Interface

Source from the content-addressed store, hash-verified

186
187///////////////////////IUknown Interface
188HRESULT IStorageTrigger::QueryInterface(const IID &riid, void **ppvObj) {
189 // Always set out parameter to NULL, validating it first.
190 if (!ppvObj) {
191 //printf("QueryInterface INVALID\n");
192 return E_INVALIDARG;
193 }
194 if (riid == IID_IUnknown)
195 {
196 *ppvObj = static_cast<IStorageTrigger *>(this);
197 //reinterpret_cast<IUnknown*>(*ppvObj)->AddRef();
198 }
199 else if (riid == IID_IStorage)
200 {
201 *ppvObj = static_cast<IStorageTrigger *>(this);
202 }
203 else if (riid == IID_IMarshal)
204 {
205 *ppvObj = static_cast<IStorageTrigger *>(this);
206 }
207 else
208 {
209 *ppvObj = NULL;
210 //printf("QueryInterface NOINT\n");
211 return E_NOINTERFACE;
212 }
213 // Increment the reference count and return the pointer.
214
215 return S_OK;
216
217}
218
219
220ULONG IStorageTrigger::AddRef() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected