win32com调用ATL编写的COM组件
来源:互联网 发布:百度人工智能音乐 编辑:程序博客网 时间:2024/05/04 18:02
IDL文件
import "oaidl.idl";import "ocidl.idl";[object,uuid(B325C169-61FA-4513-9DB1-0CC231CCB633),dual,nonextensible,helpstring("IComTestClass Interface"),pointer_default(unique)]interface IComTestClass : IDispatch{[id(1), helpstring("method Method1")] HRESULT Method1(LONG arg1);};[uuid(9098C7D5-91BA-4C0C-837B-DB81C3DBA6AE),version(1.0),helpstring("ComTest 1.0 Type Library")]library ComTestLib{importlib("stdole2.tlb");[uuid(F41DAE07-8D10-430B-8834-06BB4B9AE8A2),helpstring("_IComTestClassEvents Interface")]dispinterface _IComTestClassEvents{properties:methods:[id(1), helpstring("method Event1")] HRESULT Event1(LONG arg1);};[uuid(2961361E-8E6D-4618-95A8-4DF03B65BDC3),helpstring("ComTestClass Class")]coclass ComTestClass{[default] interface IComTestClass;[default, source] dispinterface _IComTestClassEvents;};};
Method1中触发事件
STDMETHODIMP CComTestClass::Method1(LONG arg1){// TODO: Add your implementation code hereFire_Event1(arg1);return S_OK;}
win32com调用组件
import win32com.clientclass EventHandler:def OnEvent1(self, val):print(val)o = win32com.client.DispatchWithEvents("ComTest.ComTestClass", EventHandler)o.Method1(23)
0 0
- win32com调用ATL编写的COM组件
- VBS调用ATL编写的COM组件
- ATL COM 组件 调用
- atl com组件调用
- ATL入门:利用ATL编写简单的COM组件
- ATL入门:利用ATL编写简单的COM组件
- C#调用手动编写的COM组件(非ATL向导生成,参考上一篇手把手写COM组件)
- 用ATL编写一个简单的COM组件
- 在VC中使用ATL编写的COM组件
- vba调用vs2005使用atl开发的com组件
- PHP4调用自己编写的COM组件
- PHP4调用自己编写的COM组件
- PHP4调用自己编写的COM组件
- PHP4调用自己编写的COM组件
- Qt调用Delphi编写的COM组件
- C++调用C#编写的COM组件
- JavaScript调用C#编写的COM组件
- 简单的ATL COM组件
- linux系统分析工具续-SystemTap和火焰图(Flame Graph)
- Linux中使用ptrace获取pthread线程的寄存器信息
- 如何从英特尔® INDE测试版过渡到英特尔® INDE 2015版?
- Linux的Clone函数
- Tomcat常用配置
- win32com调用ATL编写的COM组件
- 简单登录界面
- Struts 2框架整合Spring
- jquery datepicker
- 正则表达式语法,全.
- Ubuntu Server 11.10 安装 MySQL,简单配置,及图形化工具
- 关闭屏幕
- Xcode设置项之Architectures和Valid Architectures
- gpio_request()