如何从 WDM 驱动程序 CreateInstance 获取 IUnknown
在文档(C++示例)中,
LUnknown* pIUnknown = CreateInstance(slot);
我尝试这个
>> import ctypes
>> print type(ctypes.cdll.lcomp.CreateInstance(0))
<type 'int'>
How to get IUNKNOWN and QueryInterface?
In documentation (C++ example)
LUnknown* pIUnknown = CreateInstance(slot);
I try this
>> import ctypes
>> print type(ctypes.cdll.lcomp.CreateInstance(0))
<type 'int'>
How to get IUNKNOWN and QueryInterface?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我想用 ctypes 访问 COM 对象可能有点困难。我建议您查看 Mark Hammond 的 Windows 扩展中包含的 win32com。
您可以从本教程开始: http://www.boddie.org.uk/python /COM.html
我希望它有帮助
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