(self, interface)
| 319 | return True |
| 320 | |
| 321 | def _create_vtable(self, interface): |
| 322 | implems = [] |
| 323 | names = [] |
| 324 | for index, name, method in self.extract_methods_order(interface): |
| 325 | func_implem = getattr(self, name) |
| 326 | #'this' is a COM-interface of the type we are implementing |
| 327 | types = [method.restype, interface] + list(method.argtypes) |
| 328 | implems.append(ctypes.WINFUNCTYPE(*types)(func_implem)) |
| 329 | names.append(name) |
| 330 | class Vtable(ctypes.Structure): |
| 331 | _fields_ = [(name, ctypes.c_void_p) for name in names] |
| 332 | return Vtable(*[ctypes.cast(x, ctypes.c_void_p) for x in implems]), implems |
| 333 | |
| 334 | def __init__(self): |
| 335 | self.verify_implem(self.IMPLEMENT) |
no test coverage detected