16,551
社区成员
发帖
与我相关
我的任务
分享
// CreateActiveX.idl : ActiveX 控件项目的类型库源。
// 此文件将由 MIDL 编译器工具处理以
// 产生类型库(CreateActiveX.tlb),该类型库将成为
// CreateActiveX.ocx 中的资源。
#include <olectl.h>
#include <idispids.h>
[ uuid(CEE2A449-2F98-413F-A803-A4BC015859D4), version(1.0),
helpfile("CreateActiveX.hlp"),
helpstring("CreateActiveX ActiveX 控件模块"),
control ]
library CreateActiveXLib
{
importlib(STDOLE_TLB);
// CCreateActiveXCtrl 的主调度接口
[ uuid(6316140A-FBAE-4E79-93C7-6E439FB2414C),
helpstring("CreateActiveX Control 的调度接口")]
dispinterface _DCreateActiveX
{
properties:
[id(1) , helpstring("属性 Data")] BSTR Data;
methods:
[id(DISPID_ABOUTBOX)] void AboutBox();
[id(2), helpstring("方法fnTest1")] void fnTest1(void);
};
// CCreateActiveXCtrl 的事件调度接口
[ uuid(3F3C83DD-9771-4C63-A562-117AD958E019),
helpstring("CreateActiveX Control 的事件接口") ]
dispinterface _DCreateActiveXEvents
{
properties:
// 事件接口没有任何属性
methods:
};
// CCreateActiveXCtrl 的类信息
[ uuid(2C3556E0-08F0-4871-A009-D15900F503E2), licensed,
helpstring("CreateActiveX Control"), control ]
coclass CreateActiveX
{
[default] dispinterface _DCreateActiveX;
[default, source] dispinterface _DCreateActiveXEvents;
};
};