chapter5_simple.idl

来自「这是ATL电子书的随书代码」· IDL 代码 · 共 43 行

IDL
43
字号
// Chapter5_Simple.idl : IDL source for Chapter5_Simple.dll
//

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

import "oaidl.idl";
import "ocidl.idl";

	[
	
		uuid(380F79EA-4098-11D1-883A-444553540000),
	
		helpstring("IMath Interface"),
		pointer_default(unique)
	]
	interface IMath : IUnknown
	{
		[helpstring("method Add")] HRESULT Add(long lOp1, long lOp2, long* plResult);
		[helpstring("method Subtract")] HRESULT Subtract(long lOp1, long lOp2, long* plResult);
		[helpstring("method Multiply")] HRESULT Multiply(long lOp1, long lOp2, long* plResult);
		[helpstring("method Divide")] HRESULT Divide(long lOp1, long lOp2, long* plResult);
	};
[
	uuid(380F79DD-4098-11D1-883A-444553540000),
	version(1.0),
	helpstring("Chapter5_Simple 1.0 Type Library")
]
library CHAPTER5_SIMPLELib
{
	importlib("stdole32.tlb");
	importlib("stdole2.tlb");

	[
		uuid(380F79EB-4098-11D1-883A-444553540000),
		helpstring("SimpleMath Class")
	]
	coclass SimpleMath
	{
		[default] interface IMath;
	};
};

⌨️ 快捷键说明

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