Default ``QueryInterface`` implementation that returns ``self`` if piid is the implemented interface
(self, this, piid, result)
| 340 | self._as_parameter_ = ctypes.addressof(self.vtable_pointer) |
| 341 | |
| 342 | def QueryInterface(self, this, piid, result): |
| 343 | """Default ``QueryInterface`` implementation that returns ``self`` if piid is the implemented interface""" |
| 344 | if piid[0] in (gdef.IUnknown.IID, self.IMPLEMENT.IID): |
| 345 | result[0] = this |
| 346 | return 1 |
| 347 | return E_NOINTERFACE |
| 348 | |
| 349 | def AddRef(self, *args): |
| 350 | """Default ``AddRef`` implementation that returns ``1``""" |