eventclass.idl

来自「中间件编写示例 COM与.NET组件服务」· IDL 代码 · 共 40 行

IDL
40
字号
// EventClass.idl : IDL source for EventClass.dll
//

// This file will be processed by the MIDL tool to
// produce the type library (EventClass.tlb) and marshalling code.

import "oaidl.idl";
import "ocidl.idl";
[
	object,
	uuid(A23B08E6-DD54-416C-8404-CDF02CA577BC),
	dual,
	helpstring("IMyEvent Interface"),
	pointer_default(unique)
]
interface IMyEvent : IDispatch
{
	[id(1), helpstring("method Hello")] HRESULT Hello();
};

[
	uuid(03D4D0DA-D32F-4826-9CB5-2429D8883C5E),
	version(1.0),
	helpstring("EventClass 1.0 Type Library")
]
library EVENTCLASSLib
{
	importlib("stdole32.tlb");
	importlib("stdole2.tlb");

	[
		uuid(66D88CB1-51D4-4396-B5D4-680B9FAC3077),
		helpstring("MyEvent Class")
	]
	coclass MyEventClass
	{
		[default] interface IMyEvent;
	};
};

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?