sieveatl.idl

来自「The code for this article was written fo」· IDL 代码 · 共 52 行

IDL
52
字号
// SieveATL.idl : IDL source for SieveATL.dll
//

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

import "oaidl.idl";
import "ocidl.idl";
	
[
	object,
	uuid(18315EE2-B8D4-11CF-AEC1-444553540000),
	dual, hidden,
	helpstring("ISieveATL Interface"),
	pointer_default(unique)
]
interface ISieveATL : IDispatch
{
	[propget, id(0x60020000), helpstring("The next prime number")] 
	HRESULT NextPrime([out, retval] short *piVal);
	[propget, id(0x60020001), helpstring("The maximum prime number to evalutate")] 
	HRESULT MaxPrime([out, retval] short *piVal);
	[propput, id(0x60020001)] 
	HRESULT MaxPrime([in] short iVal);
	[propget, id(0x60020003), helpstring("Count of calculated prime numbers")] 
	HRESULT Primes([out, retval] short *piVal);
	[id(0x60020004), helpstring("Reinitialize the prime number counter")] 
	HRESULT Reinitialize();
	[id(0x60020005), helpstring("Get all primes in a given array")] 
	HRESULT AllPrimes(SAFEARRAY(short) *ai);
};

[
	uuid(18315EE3-B8D4-11CF-AEC1-444553540000),
	version(1.2),
	helpstring("Sieve of Eratosthenes As C++ ATL DLL")
]
library SIEVEATLLib
{
	importlib("stdole32.tlb");
	importlib("stdole2.tlb");

	[
		uuid(18315EE7-B8D4-11CF-AEC1-444553540000),
		helpstring("CSieveATL Class")
	]
	coclass CSieveATL
	{
		[default] interface ISieveATL;
	};
};

⌨️ 快捷键说明

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