⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 atlsample.idl

📁 atl方法使用编程实例
💻 IDL
字号:
// ATLSample.idl : IDL source for ATLSample.dll
//

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

import "oaidl.idl";
import "ocidl.idl";
	[
		object,
		uuid(3B4F8E7A-80C1-11D4-A23D-02608CACEDBB),
		dual,
		helpstring("IAccount Interface"),
		pointer_default(unique)
	]
	interface IAccount : IDispatch
	{
		[propget, id(1), helpstring("the current balance")] HRESULT Balance([out, retval] long *pVal);
		[propput, id(1), helpstring("the current balance")] HRESULT Balance([in] long newVal);
		[id(2), helpstring("do debit or credit operation")] HRESULT Post([in]long lAmount, [out,retval]BSTR *pbstrResult);
	};

[
	uuid(3B4F8E6E-80C1-11D4-A23D-02608CACEDBB),
	version(1.0),
	helpstring("ATLSample 1.0 Type Library")
]
library ATLSAMPLELib
{
	importlib("stdole32.tlb");
	importlib("stdole2.tlb");

	[
		uuid(3B4F8E7B-80C1-11D4-A23D-02608CACEDBB),
		helpstring("Account Class")
	]
	coclass Account
	{
		[default] interface IAccount;
	};
};

⌨️ 快捷键说明

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