//////////////////IUknown Interface
| 165 | |
| 166 | ///////////////////////IUknown Interface |
| 167 | HRESULT 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 | |
| 198 | ULONG IStorageTrigger::AddRef() { |
| 199 | m_cRef++; |
nothing calls this directly
no outgoing calls
no test coverage detected