How to get IUnknown from WDM driver CreateInstance
In documentation (C++ example)
L开发者_开发知识库Unknown* pIUnknown = CreateInstance(slot);
I try this
>> import ctypes
>> print type(ctypes.cdll.lcomp.CreateInstance(0))
<type 'int'>
How to get IUNKNOWN and QueryInterface?
I guess that accessing COM object with ctypes might be a bit difficult. I would recommend to have a look to win32com included in the windows extensions by Mark Hammond.
You can start with this tutorial : http://www.boddie.org.uk/python/COM.html
I hope it helps
精彩评论