simple1.idl

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

IDL
41
字号
// Simple1.idl : IDL source for Simple1.dll
//

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

import "oaidl.idl";
import "ocidl.idl";
	[
		object,
		uuid(1F0BD295-9A78-42A4-9256-D7F45C7E4551),
	
		helpstring("IFun Interface"),
		pointer_default(unique)
	]
	interface IFun : IUnknown
	{
		[helpstring("method Add")] HRESULT Add([in] long n1, [in] long n2, [out, retval] long * pVal);
		[helpstring("method Cat")] HRESULT Cat([in]BSTR s1,[in]BSTR s2,[out,retval] BSTR *pVal);
	};

[
	uuid(C27FC488-0E8F-4E76-89E3-CC9B019D6E69),
	version(1.0),
	helpstring("Simple1 1.0 Type Library")
]
library SIMPLE1Lib
{
	importlib("stdole32.tlb");
	importlib("stdole2.tlb");

	[
		uuid(F8B8DEEC-9428-4C85-A4C2-301DF8AB0A9A),
		helpstring("Fun Class")
	]
	coclass Fun
	{
		[default] interface IFun;
	};
};

⌨️ 快捷键说明

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