simpledataobject.idl

来自「The ATL OLE DB Provider templates only s」· IDL 代码 · 共 86 行

IDL
86
字号
// SimpleDataObject.idl : IDL source for SimpleDataObject.dll
//

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

import "oaidl.idl";
import "ocidl.idl";
import "IGetAsADORecordset.idl";
import "IGetAsOLEDBRowset.idl";		

	[
		object,
		uuid(528F2F71-62A0-11D3-8277-0020186676FB),
	
		helpstring("IMyDataObject Interface"),
		pointer_default(unique)
	]
	interface IMyDataObject : IUnknown
	{
		HRESULT SetColumnSize(
			[in] long columnSize);

		HRESULT AddColumn(
			[in] BSTR columnName, 
			[out, retval] long *index);
		
		HRESULT GetColumnName(
			[in] long index,
			[out, retval] BSTR *columnName);

		HRESULT AddRow(
			[out, retval] long *index);
		
		HRESULT RemoveRow(
			[in] long index);
		
		HRESULT Depth(
			[out, retval] long *depth);

		HRESULT Width(
			[out, retval] long *width);

		HRESULT SetAt(
			[in] long rowIndex, 
			[in] long columnIndex, 
			[in] BSTR value);

		HRESULT GetAt(
			[in] long rowIndex, 
			[in] long columnIndex, 
			[out, retval] BSTR *value);
	};


[
	uuid(528F2F63-62A0-11D3-8277-0020186676FB),
	version(1.0),
	helpstring("SimpleDataObject 1.0 Type Library")
]
library SIMPLEDATAOBJECTLib
{
	importlib("stdole32.tlb");
	importlib("stdole2.tlb");

	[
		uuid(528F2F72-62A0-11D3-8277-0020186676FB),
		helpstring("MyDataObject Class")
	]
	coclass MyDataObject
	{
		[default] interface IMyDataObject;
		interface IGetAsADORecordset;
		interface _Recordset;
		interface _IGetAsOLEDBRowset;
	};
	[
		uuid(29B85006-649A-11D3-827D-0020186676FB),
		helpstring("ConversionProvider OLE DB Provider")
	]
	coclass ConversionProvider
	{
		interface IUnknown;
	};
};

⌨️ 快捷键说明

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