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

📄 pos_server.idl

📁 Visual C++高级编程及其项目应用开发(含源代码)
💻 IDL
字号:
// Pos_Server.idl : IDL source for Pos_Server.dll
//

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

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

enum DataTypeEnum
{
    adEmpty = 0,
    adTinyInt = 16,
    adSmallInt = 2,
    adInteger = 3,
    adBigInt = 20,
    adUnsignedTinyInt = 17,
    adUnsignedSmallInt = 18,
    adUnsignedInt = 19,
    adUnsignedBigInt = 21,
    adSingle = 4,
    adDouble = 5,
    adCurrency = 6,
    adDecimal = 14,
    adNumeric = 131,
    adBoolean = 11,
    adError = 10,
    adUserDefined = 132,
    adVariant = 12,
    adIDispatch = 9,
    adIUnknown = 13,
    adGUID = 72,
    adDate = 7,
    adDBDate = 133,
    adDBTime = 134,
    adDBTimeStamp = 135,
    adBSTR = 8,
    adChar = 129,
    adVarChar = 200,
    adLongVarChar = 201,
    adWChar = 130,
    adVarWChar = 202,
    adLongVarWChar = 203,
    adBinary = 128,
    adVarBinary = 204,
    adLongVarBinary = 205
};

enum ParameterDirectionEnum
{
    adParamUnknown = 0,
    adParamInput = 1,
    adParamOutput = 2,
    adParamInputOutput = 3,
    adParamReturnValue = 4
};

	[
		object,
		uuid(5E1C77A1-B320-4E1B-881C-B7239D5C36FB),
		dual,
		helpstring("IPos_ADO Interface"),
		pointer_default(unique)
	]
	interface IPos_ADO : IDispatch
	{
		[id(1), helpstring("method Open")] HRESULT Open([in] BSTR Computer, [in] BSTR dbName, [in] BSTR dbUser, [in] BSTR dbPsw);
        [id(3), helpstring("method OpenRecordset")] HRESULT OpenRecordset([in] VARIANT query);
        [id(4), helpstring("method CloseRecordset")] HRESULT CloseRecordset(void);
        [id(5), helpstring("method ExecuteConnection")] HRESULT ExecuteConnection([in] BSTR query, [in] VARIANT_BOOL bChangeRec);
        [id(6), helpstring("method ExecuteCommand")] HRESULT ExecuteCommand([in] VARIANT_BOOL bStoredProcedure, [in] VARIANT_BOOL bChangeRec);
        [propget, id(7), helpstring("property CommandText")] HRESULT CommandText([out, retval] BSTR *pVal);
        [propput, id(7), helpstring("property CommandText")] HRESULT CommandText([in] BSTR newVal);
        [id(8), helpstring("method AppendParameter")] HRESULT AppendParameter([in] enum DataTypeEnum type, [in] VARIANT value, [in] enum ParameterDirectionEnum where, [in] long size);
        [id(9), helpstring("method Update")] HRESULT Update();
        [id(10), helpstring("method Delete")] HRESULT Delete();
        [propget, id(11), helpstring("property Field")] HRESULT Field([in] VARIANT idx, [out, retval] VARIANT *pVal);
        [propput, id(11), helpstring("property Field")] HRESULT Field([in] VARIANT idx, [in] VARIANT newVal);
        [propget, id(12), helpstring("property FieldCount")] HRESULT FieldCount([out, retval] long *pVal);
        [id(13), helpstring("method Close")] HRESULT Close();
        [id(14), helpstring("method First")] HRESULT First();
        [id(15), helpstring("method Next")] HRESULT Next();
        [id(16), helpstring("method Last")] HRESULT Last();
        [id(17), helpstring("method Prev")] HRESULT Prev();
        [propget, id(18), helpstring("property EOF")] HRESULT EOF([out, retval] VARIANT_BOOL *pVal);
        [propget, id(19), helpstring("property BOF")] HRESULT BOF([out, retval] VARIANT_BOOL *pVal);
        [id(20), helpstring("method ParamQuery")] HRESULT ParamQuery([in] BSTR query, [in] long idx1, [in] BSTR idx2, [in] BSTR idx3);
        [id(21), helpstring("method CallStoredProc")] HRESULT CallStoredProc([in] long idx1, [in] BSTR idx2, [in] BSTR idx3);
        [propput, id(22), helpstring("property StoredProc")] HRESULT StoredProc([in] BSTR newVal);
        [id(23), helpstring("method ChangeParameter")] HRESULT ChangeParameter([in] long idx, [in] enum DataTypeEnum type, [in] VARIANT value, [in] enum ParameterDirectionEnum where, [in] long size);
        [id(24), helpstring("method Requery")] HRESULT Requery();
        [id(25), helpstring("method ADORelease")] HRESULT ADORelease();
        [propget, id(26), helpstring("property Empty")] HRESULT Empty([out, retval] VARIANT_BOOL* bEmpty); 
		[propget, id(27), helpstring("property RecordCount")] HRESULT RecordCount([out, retval] long *pVal);
		[id(28), helpstring("method GetRs")] HRESULT GetRs([in] VARIANT vSql, [out, retval] IDispatch** ppRecordset);
		[id(29), helpstring("method CancelBatch")] HRESULT CancelBatch();
		[id(30), helpstring("method Cancel")] HRESULT Cancel();
		[id(31), helpstring("method CancelUpdate")] HRESULT CancelUpdate();
		[id(32), helpstring("method AddNew")] HRESULT AddNew([in, optional] VARIANT FieldList, [in, optional] VARIANT Values);
		[id(33), helpstring("method Find")] HRESULT Find([in] BSTR Criteria);
		[propget, id(34), helpstring("property BookMark")] HRESULT BookMark([out, retval] VARIANT *pVal);
		[propput, id(34), helpstring("property BookMark")] HRESULT BookMark([in] VARIANT newVal);
		[propget, id(35), helpstring("property FieldName")] HRESULT FieldName([in] VARIANT idx, [out, retval] BSTR *pVal);
		[propget, id(36), helpstring("property FieldDefSize")] HRESULT FieldDefSize([in] VARIANT idx, [out, retval] long *pVal);
	};


[
	uuid(5416C7E5-3D64-451C-9524-C637EDE9D784),
	version(1.0),
	helpstring("Pos_Server 1.0 Type Library")
]
library POS_SERVERLib
{
	importlib("stdole32.tlb");
	importlib("stdole2.tlb");

	[
		uuid(E060DC3A-0732-4AF4-8B05-0FBF5A9C5B78),
		helpstring("Pos_ADO Class")
	]
	coclass CPos_ADO
	{
		[default] interface IPos_ADO;
	};
};

⌨️ 快捷键说明

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