simple3.idl

来自「Thinkinc++English 电子书籍,英文版」· IDL 代码 · 共 67 行

IDL
67
字号
// Simple3.idl : IDL source for Simple3.dll
//

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

import "oaidl.idl";
import "ocidl.idl";
	[
		object,
		uuid(072EA6CA-7D08-4E7E-B2B7-B2FB0B875595),
	
		helpstring("IMathe Interface"),
		pointer_default(unique)
	]
	interface IMathe : IUnknown
	{
		[helpstring("method Add")] HRESULT Add([in] long n1, [in] long n2, [out,retval] long *pnVal);
	};

	[
		object,
		uuid(072EA6CB-7D08-4E7E-B2B7-B2FB0B875595),
	
		helpstring("IStr Interface"),
		pointer_default(unique)
	]
	interface IStr : IUnknown
	{
		[helpstring("method Cat")] HRESULT Cat([in] BSTR s1, [in] BSTR s2, [out,retval] BSTR *psVal);
	};

	[
		object,
		uuid(072EA6CC-7D08-4E7E-B2B7-B2FB0B875595),
	
		helpstring("IMathe2 Interface"),
		pointer_default(unique)
	]
	interface IMathe2 : IUnknown
	{
		[helpstring("method Add")] HRESULT Add([in] long n1, [in] long n2, [out,retval] long *pnVal);
		[helpstring("method Mul")] HRESULT Mul([in] long n1, [in] long n2, [out,retval] long *pnVal);
	};

[
	uuid(CD7672F7-C0B4-4090-A2F8-234C0062F42C),
	version(1.0),
	helpstring("Simple3 1.0 Type Library")
]
library SIMPLE3Lib
{
	importlib("stdole32.tlb");
	importlib("stdole2.tlb");

	[
		uuid(C6F241E2-43F6-4449-A024-B7340553221E),
		helpstring("Mathe Class")
	]
	coclass Mathe
	{
		[default] interface IMathe;
		interface IStr;
		interface IMathe2;
	};
};

⌨️ 快捷键说明

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