MCPcopy Create free account
hub / github.com/antonioCoco/JuicyPotatoNG / QueryInterface

Method QueryInterface

IStorageTrigger.cpp:167–196  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

165
166///////////////////////IUknown Interface
167HRESULT IStorageTrigger::QueryInterface(const IID& riid, void** ppvObj) {
168 // Always set out parameter to NULL, validating it first.
169 if (!ppvObj) {
170 //printf("QueryInterface INVALID\n");
171 return E_INVALIDARG;
172 }
173 if (riid == IID_IUnknown)
174 {
175 *ppvObj = static_cast<IStorageTrigger*>(this);
176 //reinterpret_cast<IUnknown*>(*ppvObj)->AddRef();
177 }
178 else if (riid == IID_IStorage)
179 {
180 *ppvObj = static_cast<IStorageTrigger*>(this);
181 }
182 else if (riid == IID_IMarshal)
183 {
184 *ppvObj = static_cast<IStorageTrigger*>(this);
185 }
186 else
187 {
188 *ppvObj = NULL;
189 //printf("QueryInterface NOINT\n");
190 return E_NOINTERFACE;
191 }
192 // Increment the reference count and return the pointer.
193
194 return S_OK;
195
196}
197
198ULONG IStorageTrigger::AddRef() {
199 m_cRef++;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected