钉钉氚云到金碟之一:金碟KIS专业版的DELPHI接口
近段,在琢磨将钉钉氚云中的业务审批数据打通后直接转化为金碟KIS专业版中的凭证数据,实现业务财务一体化。
通过几天的努力,在网上资料一鳞半爪的情况下,还是成功地初步生成了凭证。看到金碟KIS的凭证窗口出现的程序自动写入凭证,成就感油然而生。
这是第一部分(待续),从金碟KIS插件,用DELHI7自动生成的接口库文件。派生来自于文件KISProfessionalPlugin.DLL。
=============
unit KISProfessionalPlugin_TLB;
// ************************************************************************ //
// WARNING
// -------
// The types declared in this file were generated from data read from a
// Type Library. If this type library is explicitly or indirectly (via
// another type library referring to this type library) re-imported, or the
// 'Refresh' command of the Type Library Editor activated while editing the
// Type Library, the contents of this file will be regenerated and all
// manual modifications will be lost.
// ************************************************************************ //
// PASTLWTR : 1.2
// File generated on 2022/7/11 7:47:22 from Type Library described below.
// ************************************************************************ //
// Type Lib: C:\Windows\SysWOW64\KISCOM\KISProfessionalPlugin.dll (1)
// LIBID: {50D1DAB2-3A93-45F4-BCC3-BE4856B7A867}
// LCID: 0
// Helpfile:
// HelpString:
// DepndLst:
// (1) v2.0 stdole, (C:\Windows\SysWOW64\stdole2.tlb)
// (2) v2.5 ADODB, (C:\Program Files (x86)\Common Files\System\ado\msado25.tlb)
// Errors:
// Error creating palette bitmap of (TVoucher) : Server C:\Windows\SysWow64\KISCOM\KISPROFESSIONALPLUGIN.DLL contains no icons
// Error creating palette bitmap of (TVoucherEntry) : Server C:\Windows\SysWow64\KISCOM\KISPROFESSIONALPLUGIN.DLL contains no icons
// Error creating palette bitmap of (TclsDataBase) : Server C:\Windows\SysWow64\KISCOM\KISPROFESSIONALPLUGIN.DLL contains no icons
// ************************************************************************ //
// *************************************************************************//
// NOTE:
// Items guarded by $IFDEF_LIVE_SERVER_AT_DESIGN_TIME are used by properties
// which return objects that may need to be explicitly created via a function
// call prior to any access via the property. These items have been disabled
// in order to prevent accidental use from within the object inspector. You
// may enable them by defining LIVE_SERVER_AT_DESIGN_TIME or by selectively
// removing them from the $IFDEF blocks. However, such items must still be
// programmatically created via a method of the appropriate CoClass before
// they can be used.
{$TYPEDADDRESS OFF} // Unit must be compiled without type-checked pointers.
{$WARN SYMBOL_PLATFORM OFF}
{$WRITEABLECONST ON}
{$VARPROPSETTER ON}
interface
uses
Windows, ActiveX, ADODB_TLB, Classes, Graphics, OleServer, StdVCL, Variants;
// *********************************************************************//
// GUIDS declared in the TypeLibrary. Following prefixes are used:
// Type Libraries : LIBID_xxxx
// CoClasses : CLASS_xxxx
// DISPInterfaces : DIID_xxxx
// Non-DISP interfaces: IID_xxxx
// *********************************************************************//
const
// TypeLibrary Major and minor versions
KISProfessionalPluginMajorVersion = 1;
KISProfessionalPluginMinorVersion = 0;
LIBID_KISProfessionalPlugin: TGUID = '{50D1DAB2-3A93-45F4-BCC3-BE4856B7A867}';
IID__Voucher: TGUID = '{5402A478-6BC9-427E-A23D-DC2F910C1F25}';
CLASS_Voucher: TGUID = '{8A78EB2C-37EB-4BEF-B967-F5E3668B8B6E}';
IID__VoucherEntry: TGUID = '{AF59AED7-308B-4786-BC2B-422A34A0285E}';
CLASS_VoucherEntry: TGUID = '{62F132B4-D6B9-42C5-8F04-BF49F0710EE3}';
IID__clsDataBase: TGUID = '{75EA5873-91E3-4617-9935-775AB2DE74A8}';
CLASS_clsDataBase: TGUID = '{F6CC3A8E-4540-424D-83BE-26C06C1864C6}';
type
// *********************************************************************//
// Forward declaration of types defined in TypeLibrary
// *********************************************************************//
_Voucher = interface;
_VoucherDisp = dispinterface;
_VoucherEntry = interface;
_VoucherEntryDisp = dispinterface;
_clsDataBase = interface;
_clsDataBaseDisp = dispinterface;
// *********************************************************************//
// Declaration of CoClasses defined in Type Library
// (NOTE: Here we map each CoClass to its Default Interface)
// *********************************************************************//
Voucher = _Voucher;
VoucherEntry = _VoucherEntry;
clsDataBase = _clsDataBase;
// *********************************************************************//
// Interface: _Voucher
// Flags: (4560) Hidden Dual NonExtensible OleAutomation Dispatchable
// GUID: {5402A478-6BC9-427E-A23D-DC2F910C1F25}
// *********************************************************************//
_Voucher = interface(IDispatch)
['{5402A478-6BC9-427E-A23D-DC2F910C1F25}']
function Get_VchID: Integer; safecall;
function Get_VchNum: Smallint; safecall;
procedure Set_VchNum(Param1: Smallint); safecall;
function Get_VchGroup: WideString; safecall;
procedure Set_VchGroup(const Param1: WideString); safecall;
function Get_VchReference: WideString; safecall;
procedure Set_VchReference(const Param1: WideString); safecall;
function Get_VchSerialNum: Smallint; safecall;
procedure Set_VchSerialNum(Param1: Smallint); safecall;
function DeleteVoucher(lngVoucherID: Integer): WordBool; safecall;
function Save: WordBool; safecall;
function InsertEntry: WordBool; safecall;
function Get_VouchEntry(index: Integer): _VoucherEntry; safecall;
procedure Set_VouchEntry(index: Integer; const Param2: _VoucherEntry); safecall;
function Get_VchDate: WideString; safecall;
procedure Set_VchDate(const Param1: WideString); safecall;
function Get_VchTranDate: WideString; safecall;
procedure Set_VchTranDate(const Param1: WideString); safecall;
function Get_VchAttachment: Smallint; safecall;
procedure Set_VchAttachment(Param1: Smallint); safecall;
function Get_nCount: Smallint; safecall;
function Get_ErrNumber: Integer; safecall;
function Get_ErrDescription: WideString; safecall;
property VchID: Integer read Get_VchID;
property VchNum: Smallint read Get_VchNum write Set_VchNum;
property VchGroup: WideString read Get_VchGroup write Set_VchGroup;
property VchReference: WideString read Get_VchReference write Set_VchReference;
property VchSerialNum: Smallint read Get_VchSerialNum write Set_VchSerialNum;
property VouchEntry[index: Integer]: _VoucherEntry read Get_VouchEntry write
Set_VouchEntry;
property VchDate: WideString read Get_VchDate write Set_VchDate;
property VchTranDate: WideString read Get_VchTranDate write Set_VchTranDate;
property VchAttachment: Smallint read Get_VchAttachment write Set_VchAttachment;
property nCount: Smallint read Get_nCount;
property ErrNumber: Integer read Get_ErrNumber;
property ErrDescription: WideString read Get_ErrDescription;
end;
// *********************************************************************//
// DispIntf: _VoucherDisp
// Flags: (4560) Hidden Dual NonExtensible OleAutomation Dispatchable
// GUID: {5402A478-6BC9-427E-A23D-DC2F910C1F25}
// *********************************************************************//
_VoucherDisp = dispinterface
['{5402A478-6BC9-427E-A23D-DC2F910C1F25}']
property VchID: Integer readonly dispid 1745027083;
property VchNum: Smallint dispid 1745027082;
property VchGroup: WideString dispid 1745027081;
property VchReference: WideString dispid 1745027080;
property VchSerialNum: Smallint dispid 1745027079;
function DeleteVoucher(lngVoucherID: Integer): WordBool; dispid 1610809357;
function Save: WordBool; dispid 1610809360;
function InsertEntry: WordBool; dispid 1610809374;
property VouchEntry[index: Integer]: _VoucherEntry dispid 1745027078;
property VchDate: WideString dispid 1745027077;
property VchTranDate: WideString dispid 1745027076;
property VchAttachment: Smallint dispid 1745027075;
property nCount: Smallint readonly dispid 1745027074;
property ErrNumber: Integer readonly dispid 1745027073;
property ErrDescription: WideString readonly dispid 1745027072;
end;
// *********************************************************************//
// Interface: _VoucherEntry
// Flags: (4560) Hidden Dual NonExtensible OleAutomation Dispatchable
// GUID: {AF59AED7-308B-4786-BC2B-422A34A0285E}
// *********************************************************************//
_VoucherEntry = interface(IDispatch)
['{AF59AED7-308B-4786-BC2B-422A34A0285E}']
function Get_AcctID: WideString; safecall;
procedure Set_AcctID(const Param1: WideString); safecall;
function Get_VchExp: WideString; safecall;
procedure Set_VchExp(const Param1: WideString); safecall;
function Get_VchCyid: WideString; safecall;
procedure Set_VchCyid(const Param1: WideString); safecall;
function Get_VchDebit: Currency; safecall;
procedure Set_VchDebit(Param1: Currency); safecall;
function Get_VchCredit: Currency; safecall;
procedure Set_VchCredit(Param1: Currency); safecall;
function Get_VchQty: Double; safecall;
procedure Set_VchQty(Param1: Double); safecall;
function Get_VchPrice: Double; safecall;
procedure Set_VchPrice(Param1: Double); safecall;
function Get_VchSettleNo: WideString; safecall;
procedure Set_VchSettleNo(const Param1: WideString); safecall;
function Get_VchSettleCode: WideString; safecall;
procedure Set_VchSettleCode(const Param1: WideString); safecall;
function Get_VchTransID: WideString; safecall;
procedure Set_VchTransID(const Param1: WideString); safecall;
function Get_ItemID: WideString; safecall;
procedure Set_ItemID(const Param1: WideString); safecall;
function Get_ExchangeRate: Double; safecall;
procedure Set_ExchangeRate(Param1: Double); safecall;
property AcctID: WideString read Get_AcctID write Set_AcctID;
property VchExp: WideString read Get_VchExp write Set_VchExp;
property VchCyid: WideString read Get_VchCyid write Set_VchCyid;
property VchDebit: Currency read Get_VchDebit write Set_VchDebit;
property VchCredit: Currency read Get_VchCredit write Set_VchCredit;
property VchQty: Double read Get_VchQty write Set_VchQty;
property VchPrice: Double read Get_VchPrice write Set_VchPrice;
property VchSettleNo: WideString read Get_VchSettleNo write Set_VchSettleNo;
property VchSettleCode: WideString read Get_VchSettleCode write Set_VchSettleCode;
property VchTransID: WideString read Get_VchTransID write Set_VchTransID;
property ItemID: WideString read Get_ItemID write Set_ItemID;
property ExchangeRate: Double read Get_ExchangeRate write Set_ExchangeRate;
end;
// *********************************************************************//
// DispIntf: _VoucherEntryDisp
// Flags: (4560) Hidden Dual NonExtensible OleAutomation Dispatchable
// GUID: {AF59AED7-308B-4786-BC2B-422A34A0285E}
// *********************************************************************//
_VoucherEntryDisp = dispinterface
['{AF59AED7-308B-4786-BC2B-422A34A0285E}']
property AcctID: WideString dispid 1745027083;
property VchExp: WideString dispid 1745027082;
property VchCyid: WideString dispid 1745027081;
property VchDebit: Currency dispid 1745027080;
property VchCredit: Currency dispid 1745027079;
property VchQty: Double dispid 1745027078;
property VchPrice: Double dispid 1745027077;
property VchSettleNo: WideString dispid 1745027076;
property VchSettleCode: WideString dispid 1745027075;
property VchTransID: WideString dispid 1745027074;
property ItemID: WideString dispid 1745027073;
property ExchangeRate: Double dispid 1745027072;
end;
// *********************************************************************//
// Interface: _clsDataBase
// Flags: (4560) Hidden Dual NonExtensible OleAutomation Dispatchable
// GUID: {75EA5873-91E3-4617-9935-775AB2DE74A8}
// *********************************************************************//
_clsDataBase = interface(IDispatch)
['{75EA5873-91E3-4617-9935-775AB2DE74A8}']
function Get_Conn: _Connection; safecall;
procedure BeginTrans; safecall;
procedure CommitTrans; safecall;
procedure RollBackTrans; safecall;
procedure InitConnection(const strConnectionString: WideString); safecall;
property Conn: _Connection read Get_Conn;
end;
// *********************************************************************//
// DispIntf: _clsDataBaseDisp
// Flags: (4560) Hidden Dual NonExtensible OleAutomation Dispatchable
// GUID: {75EA5873-91E3-4617-9935-775AB2DE74A8}
// *********************************************************************//
_clsDataBaseDisp = dispinterface
['{75EA5873-91E3-4617-9935-775AB2DE74A8}']
property Conn: _Connection readonly dispid 1745027072;
procedure BeginTrans; dispid 1610809345;
procedure CommitTrans; dispid 1610809346;
procedure RollBackTrans; dispid 1610809347;
procedure InitConnection(const strConnectionString: WideString); dispid 1610809348;
end;
// *********************************************************************//
// The Class CoVoucher provides a Create and CreateRemote method to
// create instances of the default interface _Voucher exposed by
// the CoClass Voucher. The functions are intended to be used by
// clients wishing to automate the CoClass objects exposed by the
// server of this typelibrary.
// *********************************************************************//
CoVoucher = class
class function Create: _Voucher;
class function CreateRemote(const MachineName: string): _Voucher;
end;
// *********************************************************************//
// OLE Server Proxy class declaration
// Server Object : TVoucher
// Help String :
// Default Interface: _Voucher
// Def. Intf. DISP? : No
// Event Interface:
// TypeFlags : (2) CanCreate
// *********************************************************************//
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
TVoucherProperties = class;
{$ENDIF}
TVoucher = class(TOleServer)
private
FIntf: _Voucher;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
FProps: TVoucherProperties;
function GetServerProperties: TVoucherProperties;
{$ENDIF}
function GetDefaultInterface: _Voucher;
protected
procedure InitServerData; override;
function Get_VchID: Integer;
function Get_VchNum: Smallint;
procedure Set_VchNum(Param1: Smallint);
function Get_VchGroup: WideString;
procedure Set_VchGroup(const Param1: WideString);
function Get_VchReference: WideString;
procedure Set_VchReference(const Param1: WideString);
function Get_VchSerialNum: Smallint;
procedure Set_VchSerialNum(Param1: Smallint);
function Get_VouchEntry(index: Integer): _VoucherEntry;
procedure Set_VouchEntry(index: Integer; const Param2: _VoucherEntry);
function Get_VchDate: WideString;
procedure Set_VchDate(const Param1: WideString);
function Get_VchTranDate: WideString;
procedure Set_VchTranDate(const Param1: WideString);
function Get_VchAttachment: Smallint;
procedure Set_VchAttachment(Param1: Smallint);
function Get_nCount: Smallint;
function Get_ErrNumber: Integer;
function Get_ErrDescription: WideString;
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
procedure Connect; override;
procedure ConnectTo(svrIntf: _Voucher);
procedure Disconnect; override;
function DeleteVoucher(lngVoucherID: Integer): WordBool;
function Save: WordBool;
function InsertEntry: WordBool;
property DefaultInterface: _Voucher read GetDefaultInterface;
property VchID: Integer read Get_VchID;
property VouchEntry[index: Integer]: _VoucherEntry read Get_VouchEntry write
Set_VouchEntry;
property nCount: Smallint read Get_nCount;
property ErrNumber: Integer read Get_ErrNumber;
property ErrDescription: WideString read Get_ErrDescription;
property VchNum: Smallint read Get_VchNum write Set_VchNum;
property VchGroup: WideString read Get_VchGroup write Set_VchGroup;
property VchReference: WideString read Get_VchReference write Set_VchReference;
property VchSerialNum: Smallint read Get_VchSerialNum write Set_VchSerialNum;
property VchDate: WideString read Get_VchDate write Set_VchDate;
property VchTranDate: WideString read Get_VchTranDate write Set_VchTranDate;
property VchAttachment: Smallint read Get_VchAttachment write Set_VchAttachment;
published
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
property Server: TVoucherProperties read GetServerProperties;
{$ENDIF}
end;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
// *********************************************************************//
// OLE Server Properties Proxy Class
// Server Object : TVoucher
// (This object is used by the IDE's Property Inspector to allow editing
// of the properties of this server)
// *********************************************************************//
TVoucherProperties = class(TPersistent)
private
FServer: TVoucher;
function GetDefaultInterface: _Voucher;
constructor Create(AServer: TVoucher);
protected
function Get_VchID: Integer;
function Get_VchNum: Smallint;
procedure Set_VchNum(Param1: Smallint);
function Get_VchGroup: WideString;
procedure Set_VchGroup(const Param1: WideString);
function Get_VchReference: WideString;
procedure Set_VchReference(const Param1: WideString);
function Get_VchSerialNum: Smallint;
procedure Set_VchSerialNum(Param1: Smallint);
function Get_VouchEntry(index: Integer): _VoucherEntry;
procedure Set_VouchEntry(index: Integer; const Param2: _VoucherEntry);
function Get_VchDate: WideString;
procedure Set_VchDate(const Param1: WideString);
function Get_VchTranDate: WideString;
procedure Set_VchTranDate(const Param1: WideString);
function Get_VchAttachment: Smallint;
procedure Set_VchAttachment(Param1: Smallint);
function Get_nCount: Smallint;
function Get_ErrNumber: Integer;
function Get_ErrDescription: WideString;
public
property DefaultInterface: _Voucher read GetDefaultInterface;
published
property VchNum: Smallint read Get_VchNum write Set_VchNum;
property VchGroup: WideString read Get_VchGroup write Set_VchGroup;
property VchReference: WideString read Get_VchReference write Set_VchReference;
property VchSerialNum: Smallint read Get_VchSerialNum write Set_VchSerialNum;
property VchDate: WideString read Get_VchDate write Set_VchDate;
property VchTranDate: WideString read Get_VchTranDate write Set_VchTranDate;
property VchAttachment: Smallint read Get_VchAttachment write Set_VchAttachment;
end;
{$ENDIF}
// *********************************************************************//
// The Class CoVoucherEntry provides a Create and CreateRemote method to
// create instances of the default interface _VoucherEntry exposed by
// the CoClass VoucherEntry. The functions are intended to be used by
// clients wishing to automate the CoClass objects exposed by the
// server of this typelibrary.
// *********************************************************************//
CoVoucherEntry = class
class function Create: _VoucherEntry;
class function CreateRemote(const MachineName: string): _VoucherEntry;
end;
// *********************************************************************//
// OLE Server Proxy class declaration
// Server Object : TVoucherEntry
// Help String :
// Default Interface: _VoucherEntry
// Def. Intf. DISP? : No
// Event Interface:
// TypeFlags : (2) CanCreate
// *********************************************************************//
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
TVoucherEntryProperties = class;
{$ENDIF}
TVoucherEntry = class(TOleServer)
private
FIntf: _VoucherEntry;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
FProps: TVoucherEntryProperties;
function GetServerProperties: TVoucherEntryProperties;
{$ENDIF}
function GetDefaultInterface: _VoucherEntry;
protected
procedure InitServerData; override;
function Get_AcctID: WideString;
procedure Set_AcctID(const Param1: WideString);
function Get_VchExp: WideString;
procedure Set_VchExp(const Param1: WideString);
function Get_VchCyid: WideString;
procedure Set_VchCyid(const Param1: WideString);
function Get_VchDebit: Currency;
procedure Set_VchDebit(Param1: Currency);
function Get_VchCredit: Currency;
procedure Set_VchCredit(Param1: Currency);
function Get_VchQty: Double;
procedure Set_VchQty(Param1: Double);
function Get_VchPrice: Double;
procedure Set_VchPrice(Param1: Double);
function Get_VchSettleNo: WideString;
procedure Set_VchSettleNo(const Param1: WideString);
function Get_VchSettleCode: WideString;
procedure Set_VchSettleCode(const Param1: WideString);
function Get_VchTransID: WideString;
procedure Set_VchTransID(const Param1: WideString);
function Get_ItemID: WideString;
procedure Set_ItemID(const Param1: WideString);
function Get_ExchangeRate: Double;
procedure Set_ExchangeRate(Param1: Double);
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
procedure Connect; override;
procedure ConnectTo(svrIntf: _VoucherEntry);
procedure Disconnect; override;
property DefaultInterface: _VoucherEntry read GetDefaultInterface;
property AcctID: WideString read Get_AcctID write Set_AcctID;
property VchExp: WideString read Get_VchExp write Set_VchExp;
property VchCyid: WideString read Get_VchCyid write Set_VchCyid;
property VchDebit: Currency read Get_VchDebit write Set_VchDebit;
property VchCredit: Currency read Get_VchCredit write Set_VchCredit;
property VchQty: Double read Get_VchQty write Set_VchQty;
property VchPrice: Double read Get_VchPrice write Set_VchPrice;
property VchSettleNo: WideString read Get_VchSettleNo write Set_VchSettleNo;
property VchSettleCode: WideString read Get_VchSettleCode write Set_VchSettleCode;
property VchTransID: WideString read Get_VchTransID write Set_VchTransID;
property ItemID: WideString read Get_ItemID write Set_ItemID;
property ExchangeRate: Double read Get_ExchangeRate write Set_ExchangeRate;
published
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
property Server: TVoucherEntryProperties read GetServerProperties;
{$ENDIF}
end;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
// *********************************************************************//
// OLE Server Properties Proxy Class
// Server Object : TVoucherEntry
// (This object is used by the IDE's Property Inspector to allow editing
// of the properties of this server)
// *********************************************************************//
TVoucherEntryProperties = class(TPersistent)
private
FServer: TVoucherEntry;
function GetDefaultInterface: _VoucherEntry;
constructor Create(AServer: TVoucherEntry);
protected
function Get_AcctID: WideString;
procedure Set_AcctID(const Param1: WideString);
function Get_VchExp: WideString;
procedure Set_VchExp(const Param1: WideString);
function Get_VchCyid: WideString;
procedure Set_VchCyid(const Param1: WideString);
function Get_VchDebit: Currency;
procedure Set_VchDebit(Param1: Currency);
function Get_VchCredit: Currency;
procedure Set_VchCredit(Param1: Currency);
function Get_VchQty: Double;
procedure Set_VchQty(Param1: Double);
function Get_VchPrice: Double;
procedure Set_VchPrice(Param1: Double);
function Get_VchSettleNo: WideString;
procedure Set_VchSettleNo(const Param1: WideString);
function Get_VchSettleCode: WideString;
procedure Set_VchSettleCode(const Param1: WideString);
function Get_VchTransID: WideString;
procedure Set_VchTransID(const Param1: WideString);
function Get_ItemID: WideString;
procedure Set_ItemID(const Param1: WideString);
function Get_ExchangeRate: Double;
procedure Set_ExchangeRate(Param1: Double);
public
property DefaultInterface: _VoucherEntry read GetDefaultInterface;
published
property AcctID: WideString read Get_AcctID write Set_AcctID;
property VchExp: WideString read Get_VchExp write Set_VchExp;
property VchCyid: WideString read Get_VchCyid write Set_VchCyid;
property VchDebit: Currency read Get_VchDebit write Set_VchDebit;
property VchCredit: Currency read Get_VchCredit write Set_VchCredit;
property VchQty: Double read Get_VchQty write Set_VchQty;
property VchPrice: Double read Get_VchPrice write Set_VchPrice;
property VchSettleNo: WideString read Get_VchSettleNo write Set_VchSettleNo;
property VchSettleCode: WideString read Get_VchSettleCode write Set_VchSettleCode;
property VchTransID: WideString read Get_VchTransID write Set_VchTransID;
property ItemID: WideString read Get_ItemID write Set_ItemID;
property ExchangeRate: Double read Get_ExchangeRate write Set_ExchangeRate;
end;
{$ENDIF}
// *********************************************************************//
// The Class CoclsDataBase provides a Create and CreateRemote method to
// create instances of the default interface _clsDataBase exposed by
// the CoClass clsDataBase. The functions are intended to be used by
// clients wishing to automate the CoClass objects exposed by the
// server of this typelibrary.
// *********************************************************************//
CoclsDataBase = class
class function Create: _clsDataBase;
class function CreateRemote(const MachineName: string): _clsDataBase;
end;
// *********************************************************************//
// OLE Server Proxy class declaration
// Server Object : TclsDataBase
// Help String :
// Default Interface: _clsDataBase
// Def. Intf. DISP? : No
// Event Interface:
// TypeFlags : (2) CanCreate
// *********************************************************************//
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
TclsDataBaseProperties = class;
{$ENDIF}
TclsDataBase = class(TOleServer)
private
FIntf: _clsDataBase;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
FProps: TclsDataBaseProperties;
function GetServerProperties: TclsDataBaseProperties;
{$ENDIF}
function GetDefaultInterface: _clsDataBase;
protected
procedure InitServerData; override;
function Get_Conn: _Connection;
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
procedure Connect; override;
procedure ConnectTo(svrIntf: _clsDataBase);
procedure Disconnect; override;
procedure BeginTrans;
procedure CommitTrans;
procedure RollBackTrans;
procedure InitConnection(const strConnectionString: WideString);
property DefaultInterface: _clsDataBase read GetDefaultInterface;
property Conn: _Connection read Get_Conn;
published
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
property Server: TclsDataBaseProperties read GetServerProperties;
{$ENDIF}
end;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
// *********************************************************************//
// OLE Server Properties Proxy Class
// Server Object : TclsDataBase
// (This object is used by the IDE's Property Inspector to allow editing
// of the properties of this server)
// *********************************************************************//
TclsDataBaseProperties = class(TPersistent)
private
FServer: TclsDataBase;
function GetDefaultInterface: _clsDataBase;
constructor Create(AServer: TclsDataBase);
protected
function Get_Conn: _Connection;
public
property DefaultInterface: _clsDataBase read GetDefaultInterface;
published
end;
{$ENDIF}
procedure Register;
resourcestring
dtlServerPage = 'ActiveX';
dtlOcxPage = 'ActiveX';
implementation
uses
ComObj;
class function CoVoucher.Create: _Voucher;
begin
Result := CreateComObject(CLASS_Voucher) as _Voucher;
end;
class function CoVoucher.CreateRemote(const MachineName: string): _Voucher;
begin
Result := CreateRemoteComObject(MachineName, CLASS_Voucher) as _Voucher;
end;
procedure TVoucher.InitServerData;
const
CServerData: TServerData = (
ClassID: '{8A78EB2C-37EB-4BEF-B967-F5E3668B8B6E}';
IntfIID: '{5402A478-6BC9-427E-A23D-DC2F910C1F25}';
EventIID: '';
LicenseKey: nil;
Version: 500
);
begin
ServerData := @CServerData;
end;
procedure TVoucher.Connect;
var
punk: IUnknown;
begin
if FIntf = nil then
begin
punk := GetServer;
Fintf := punk as _Voucher;
end;
end;
procedure TVoucher.ConnectTo(svrIntf: _Voucher);
begin
Disconnect;
FIntf := svrIntf;
end;
procedure TVoucher.DisConnect;
begin
if Fintf <> nil then
begin
FIntf := nil;
end;
end;
function TVoucher.GetDefaultInterface: _Voucher;
begin
if FIntf = nil then
Connect;
Assert(FIntf <> nil,
'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
Result := FIntf;
end;
constructor TVoucher.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
FProps := TVoucherProperties.Create(Self);
{$ENDIF}
end;
destructor TVoucher.Destroy;
begin
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
FProps.Free;
{$ENDIF}
inherited Destroy;
end;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
function TVoucher.GetServerProperties: TVoucherProperties;
begin
Result := FProps;
end;
{$ENDIF}
function TVoucher.Get_VchID: Integer;
begin
Result := DefaultInterface.VchID;
end;
function TVoucher.Get_VchNum: Smallint;
begin
Result := DefaultInterface.VchNum;
end;
procedure TVoucher.Set_VchNum(Param1: Smallint);
begin
DefaultInterface.Set_VchNum(Param1);
end;
function TVoucher.Get_VchGroup: WideString;
begin
Result := DefaultInterface.VchGroup;
end;
procedure TVoucher.Set_VchGroup(const Param1: WideString);
{ Warning: The property VchGroup has a setter and a getter whose
types do not match. Delphi was unable to generate a property of
this sort and so is using a Variant as a passthrough. }
var
InterfaceVariant: OleVariant;
begin
InterfaceVariant := DefaultInterface;
InterfaceVariant.VchGroup := Param1;
end;
function TVoucher.Get_VchReference: WideString;
begin
Result := DefaultInterface.VchReference;
end;
procedure TVoucher.Set_VchReference(const Param1: WideString);
{ Warning: The property VchReference has a setter and a getter whose
types do not match. Delphi was unable to generate a property of
this sort and so is using a Variant as a passthrough. }
var
InterfaceVariant: OleVariant;
begin
InterfaceVariant := DefaultInterface;
InterfaceVariant.VchReference := Param1;
end;
function TVoucher.Get_VchSerialNum: Smallint;
begin
Result := DefaultInterface.VchSerialNum;
end;
procedure TVoucher.Set_VchSerialNum(Param1: Smallint);
begin
DefaultInterface.Set_VchSerialNum(Param1);
end;
function TVoucher.Get_VouchEntry(index: Integer): _VoucherEntry;
begin
Result := DefaultInterface.VouchEntry[index];
end;
procedure TVoucher.Set_VouchEntry(index: Integer; const Param2: _VoucherEntry);
begin
DefaultInterface.VouchEntry[index] := Param2;
end;
function TVoucher.Get_VchDate: WideString;
begin
Result := DefaultInterface.VchDate;
end;
procedure TVoucher.Set_VchDate(const Param1: WideString);
{ Warning: The property VchDate has a setter and a getter whose
types do not match. Delphi was unable to generate a property of
this sort and so is using a Variant as a passthrough. }
var
InterfaceVariant: OleVariant;
begin
InterfaceVariant := DefaultInterface;
InterfaceVariant.VchDate := Param1;
end;
function TVoucher.Get_VchTranDate: WideString;
begin
Result := DefaultInterface.VchTranDate;
end;
procedure TVoucher.Set_VchTranDate(const Param1: WideString);
{ Warning: The property VchTranDate has a setter and a getter whose
types do not match. Delphi was unable to generate a property of
this sort and so is using a Variant as a passthrough. }
var
InterfaceVariant: OleVariant;
begin
InterfaceVariant := DefaultInterface;
InterfaceVariant.VchTranDate := Param1;
end;
function TVoucher.Get_VchAttachment: Smallint;
begin
Result := DefaultInterface.VchAttachment;
end;
procedure TVoucher.Set_VchAttachment(Param1: Smallint);
begin
DefaultInterface.Set_VchAttachment(Param1);
end;
function TVoucher.Get_nCount: Smallint;
begin
Result := DefaultInterface.nCount;
end;
function TVoucher.Get_ErrNumber: Integer;
begin
Result := DefaultInterface.ErrNumber;
end;
function TVoucher.Get_ErrDescription: WideString;
begin
Result := DefaultInterface.ErrDescription;
end;
function TVoucher.DeleteVoucher(lngVoucherID: Integer): WordBool;
begin
Result := DefaultInterface.DeleteVoucher(lngVoucherID);
end;
function TVoucher.Save: WordBool;
begin
Result := DefaultInterface.Save;
end;
function TVoucher.InsertEntry: WordBool;
begin
Result := DefaultInterface.InsertEntry;
end;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
constructor TVoucherProperties.Create(AServer: TVoucher);
begin
inherited Create;
FServer := AServer;
end;
function TVoucherProperties.GetDefaultInterface: _Voucher;
begin
Result := FServer.DefaultInterface;
end;
function TVoucherProperties.Get_VchID: Integer;
begin
Result := DefaultInterface.VchID;
end;
function TVoucherProperties.Get_VchNum: Smallint;
begin
Result := DefaultInterface.VchNum;
end;
procedure TVoucherProperties.Set_VchNum(Param1: Smallint);
begin
DefaultInterface.Set_VchNum(Param1);
end;
function TVoucherProperties.Get_VchGroup: WideString;
begin
Result := DefaultInterface.VchGroup;
end;
procedure TVoucherProperties.Set_VchGroup(const Param1: WideString);
{ Warning: The property VchGroup has a setter and a getter whose
types do not match. Delphi was unable to generate a property of
this sort and so is using a Variant as a passthrough. }
var
InterfaceVariant: OleVariant;
begin
InterfaceVariant := DefaultInterface;
InterfaceVariant.VchGroup := Param1;
end;
function TVoucherProperties.Get_VchReference: WideString;
begin
Result := DefaultInterface.VchReference;
end;
procedure TVoucherProperties.Set_VchReference(const Param1: WideString);
{ Warning: The property VchReference has a setter and a getter whose
types do not match. Delphi was unable to generate a property of
this sort and so is using a Variant as a passthrough. }
var
InterfaceVariant: OleVariant;
begin
InterfaceVariant := DefaultInterface;
InterfaceVariant.VchReference := Param1;
end;
function TVoucherProperties.Get_VchSerialNum: Smallint;
begin
Result := DefaultInterface.VchSerialNum;
end;
procedure TVoucherProperties.Set_VchSerialNum(Param1: Smallint);
begin
DefaultInterface.Set_VchSerialNum(Param1);
end;
function TVoucherProperties.Get_VouchEntry(index: Integer): _VoucherEntry;
begin
Result := DefaultInterface.VouchEntry[index];
end;
procedure TVoucherProperties.Set_VouchEntry(index: Integer; const Param2: _VoucherEntry);
begin
DefaultInterface.VouchEntry[index] := Param2;
end;
function TVoucherProperties.Get_VchDate: WideString;
begin
Result := DefaultInterface.VchDate;
end;
procedure TVoucherProperties.Set_VchDate(const Param1: WideString);
{ Warning: The property VchDate has a setter and a getter whose
types do not match. Delphi was unable to generate a property of
this sort and so is using a Variant as a passthrough. }
var
InterfaceVariant: OleVariant;
begin
InterfaceVariant := DefaultInterface;
InterfaceVariant.VchDate := Param1;
end;
function TVoucherProperties.Get_VchTranDate: WideString;
begin
Result := DefaultInterface.VchTranDate;
end;
procedure TVoucherProperties.Set_VchTranDate(const Param1: WideString);
{ Warning: The property VchTranDate has a setter and a getter whose
types do not match. Delphi was unable to generate a property of
this sort and so is using a Variant as a passthrough. }
var
InterfaceVariant: OleVariant;
begin
InterfaceVariant := DefaultInterface;
InterfaceVariant.VchTranDate := Param1;
end;
function TVoucherProperties.Get_VchAttachment: Smallint;
begin
Result := DefaultInterface.VchAttachment;
end;
procedure TVoucherProperties.Set_VchAttachment(Param1: Smallint);
begin
DefaultInterface.Set_VchAttachment(Param1);
end;
function TVoucherProperties.Get_nCount: Smallint;
begin
Result := DefaultInterface.nCount;
end;
function TVoucherProperties.Get_ErrNumber: Integer;
begin
Result := DefaultInterface.ErrNumber;
end;
function TVoucherProperties.Get_ErrDescription: WideString;
begin
Result := DefaultInterface.ErrDescription;
end;
{$ENDIF}
class function CoVoucherEntry.Create: _VoucherEntry;
begin
Result := CreateComObject(CLASS_VoucherEntry) as _VoucherEntry;
end;
class function CoVoucherEntry.CreateRemote(const MachineName: string): _VoucherEntry;
begin
Result := CreateRemoteComObject(MachineName, CLASS_VoucherEntry) as _VoucherEntry;
end;
procedure TVoucherEntry.InitServerData;
const
CServerData: TServerData = (
ClassID: '{62F132B4-D6B9-42C5-8F04-BF49F0710EE3}';
IntfIID: '{AF59AED7-308B-4786-BC2B-422A34A0285E}';
EventIID: '';
LicenseKey: nil;
Version: 500
);
begin
ServerData := @CServerData;
end;
procedure TVoucherEntry.Connect;
var
punk: IUnknown;
begin
if FIntf = nil then
begin
punk := GetServer;
Fintf := punk as _VoucherEntry;
end;
end;
procedure TVoucherEntry.ConnectTo(svrIntf: _VoucherEntry);
begin
Disconnect;
FIntf := svrIntf;
end;
procedure TVoucherEntry.DisConnect;
begin
if Fintf <> nil then
begin
FIntf := nil;
end;
end;
function TVoucherEntry.GetDefaultInterface: _VoucherEntry;
begin
if FIntf = nil then
Connect;
Assert(FIntf <> nil,
'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
Result := FIntf;
end;
constructor TVoucherEntry.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
FProps := TVoucherEntryProperties.Create(Self);
{$ENDIF}
end;
destructor TVoucherEntry.Destroy;
begin
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
FProps.Free;
{$ENDIF}
inherited Destroy;
end;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
function TVoucherEntry.GetServerProperties: TVoucherEntryProperties;
begin
Result := FProps;
end;
{$ENDIF}
function TVoucherEntry.Get_AcctID: WideString;
begin
Result := DefaultInterface.AcctID;
end;
procedure TVoucherEntry.Set_AcctID(const Param1: WideString);
{ Warning: The property AcctID has a setter and a getter whose
types do not match. Delphi was unable to generate a property of
this sort and so is using a Variant as a passthrough. }
var
InterfaceVariant: OleVariant;
begin
InterfaceVariant := DefaultInterface;
InterfaceVariant.AcctID := Param1;
end;
function TVoucherEntry.Get_VchExp: WideString;
begin
Result := DefaultInterface.VchExp;
end;
procedure TVoucherEntry.Set_VchExp(const Param1: WideString);
{ Warning: The property VchExp has a setter and a getter whose
types do not match. Delphi was unable to generate a property of
this sort and so is using a Variant as a passthrough. }
var
InterfaceVariant: OleVariant;
begin
InterfaceVariant := DefaultInterface;
InterfaceVariant.VchExp := Param1;
end;
function TVoucherEntry.Get_VchCyid: WideString;
begin
Result := DefaultInterface.VchCyid;
end;
procedure TVoucherEntry.Set_VchCyid(const Param1: WideString);
{ Warning: The property VchCyid has a setter and a getter whose
types do not match. Delphi was unable to generate a property of
this sort and so is using a Variant as a passthrough. }
var
InterfaceVariant: OleVariant;
begin
InterfaceVariant := DefaultInterface;
InterfaceVariant.VchCyid := Param1;
end;
function TVoucherEntry.Get_VchDebit: Currency;
begin
Result := DefaultInterface.VchDebit;
end;
procedure TVoucherEntry.Set_VchDebit(Param1: Currency);
begin
DefaultInterface.Set_VchDebit(Param1);
end;
function TVoucherEntry.Get_VchCredit: Currency;
begin
Result := DefaultInterface.VchCredit;
end;
procedure TVoucherEntry.Set_VchCredit(Param1: Currency);
begin
DefaultInterface.Set_VchCredit(Param1);
end;
function TVoucherEntry.Get_VchQty: Double;
begin
Result := DefaultInterface.VchQty;
end;
procedure TVoucherEntry.Set_VchQty(Param1: Double);
begin
DefaultInterface.Set_VchQty(Param1);
end;
function TVoucherEntry.Get_VchPrice: Double;
begin
Result := DefaultInterface.VchPrice;
end;
procedure TVoucherEntry.Set_VchPrice(Param1: Double);
begin
DefaultInterface.Set_VchPrice(Param1);
end;
function TVoucherEntry.Get_VchSettleNo: WideString;
begin
Result := DefaultInterface.VchSettleNo;
end;
procedure TVoucherEntry.Set_VchSettleNo(const Param1: WideString);
{ Warning: The property VchSettleNo has a setter and a getter whose
types do not match. Delphi was unable to generate a property of
this sort and so is using a Variant as a passthrough. }
var
InterfaceVariant: OleVariant;
begin
InterfaceVariant := DefaultInterface;
InterfaceVariant.VchSettleNo := Param1;
end;
function TVoucherEntry.Get_VchSettleCode: WideString;
begin
Result := DefaultInterface.VchSettleCode;
end;
procedure TVoucherEntry.Set_VchSettleCode(const Param1: WideString);
{ Warning: The property VchSettleCode has a setter and a getter whose
types do not match. Delphi was unable to generate a property of
this sort and so is using a Variant as a passthrough. }
var
InterfaceVariant: OleVariant;
begin
InterfaceVariant := DefaultInterface;
InterfaceVariant.VchSettleCode := Param1;
end;
function TVoucherEntry.Get_VchTransID: WideString;
begin
Result := DefaultInterface.VchTransID;
end;
procedure TVoucherEntry.Set_VchTransID(const Param1: WideString);
{ Warning: The property VchTransID has a setter and a getter whose
types do not match. Delphi was unable to generate a property of
this sort and so is using a Variant as a passthrough. }
var
InterfaceVariant: OleVariant;
begin
InterfaceVariant := DefaultInterface;
InterfaceVariant.VchTransID := Param1;
end;
function TVoucherEntry.Get_ItemID: WideString;
begin
Result := DefaultInterface.ItemID;
end;
procedure TVoucherEntry.Set_ItemID(const Param1: WideString);
{ Warning: The property ItemID has a setter and a getter whose
types do not match. Delphi was unable to generate a property of
this sort and so is using a Variant as a passthrough. }
var
InterfaceVariant: OleVariant;
begin
InterfaceVariant := DefaultInterface;
InterfaceVariant.ItemID := Param1;
end;
function TVoucherEntry.Get_ExchangeRate: Double;
begin
Result := DefaultInterface.ExchangeRate;
end;
procedure TVoucherEntry.Set_ExchangeRate(Param1: Double);
begin
DefaultInterface.Set_ExchangeRate(Param1);
end;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
constructor TVoucherEntryProperties.Create(AServer: TVoucherEntry);
begin
inherited Create;
FServer := AServer;
end;
function TVoucherEntryProperties.GetDefaultInterface: _VoucherEntry;
begin
Result := FServer.DefaultInterface;
end;
function TVoucherEntryProperties.Get_AcctID: WideString;
begin
Result := DefaultInterface.AcctID;
end;
procedure TVoucherEntryProperties.Set_AcctID(const Param1: WideString);
{ Warning: The property AcctID has a setter and a getter whose
types do not match. Delphi was unable to generate a property of
this sort and so is using a Variant as a passthrough. }
var
InterfaceVariant: OleVariant;
begin
InterfaceVariant := DefaultInterface;
InterfaceVariant.AcctID := Param1;
end;
function TVoucherEntryProperties.Get_VchExp: WideString;
begin
Result := DefaultInterface.VchExp;
end;
procedure TVoucherEntryProperties.Set_VchExp(const Param1: WideString);
{ Warning: The property VchExp has a setter and a getter whose
types do not match. Delphi was unable to generate a property of
this sort and so is using a Variant as a passthrough. }
var
InterfaceVariant: OleVariant;
begin
InterfaceVariant := DefaultInterface;
InterfaceVariant.VchExp := Param1;
end;
function TVoucherEntryProperties.Get_VchCyid: WideString;
begin
Result := DefaultInterface.VchCyid;
end;
procedure TVoucherEntryProperties.Set_VchCyid(const Param1: WideString);
{ Warning: The property VchCyid has a setter and a getter whose
types do not match. Delphi was unable to generate a property of
this sort and so is using a Variant as a passthrough. }
var
InterfaceVariant: OleVariant;
begin
InterfaceVariant := DefaultInterface;
InterfaceVariant.VchCyid := Param1;
end;
function TVoucherEntryProperties.Get_VchDebit: Currency;
begin
Result := DefaultInterface.VchDebit;
end;
procedure TVoucherEntryProperties.Set_VchDebit(Param1: Currency);
begin
DefaultInterface.Set_VchDebit(Param1);
end;
function TVoucherEntryProperties.Get_VchCredit: Currency;
begin
Result := DefaultInterface.VchCredit;
end;
procedure TVoucherEntryProperties.Set_VchCredit(Param1: Currency);
begin
DefaultInterface.Set_VchCredit(Param1);
end;
function TVoucherEntryProperties.Get_VchQty: Double;
begin
Result := DefaultInterface.VchQty;
end;
procedure TVoucherEntryProperties.Set_VchQty(Param1: Double);
begin
DefaultInterface.Set_VchQty(Param1);
end;
function TVoucherEntryProperties.Get_VchPrice: Double;
begin
Result := DefaultInterface.VchPrice;
end;
procedure TVoucherEntryProperties.Set_VchPrice(Param1: Double);
begin
DefaultInterface.Set_VchPrice(Param1);
end;
function TVoucherEntryProperties.Get_VchSettleNo: WideString;
begin
Result := DefaultInterface.VchSettleNo;
end;
procedure TVoucherEntryProperties.Set_VchSettleNo(const Param1: WideString);
{ Warning: The property VchSettleNo has a setter and a getter whose
types do not match. Delphi was unable to generate a property of
this sort and so is using a Variant as a passthrough. }
var
InterfaceVariant: OleVariant;
begin
InterfaceVariant := DefaultInterface;
InterfaceVariant.VchSettleNo := Param1;
end;
function TVoucherEntryProperties.Get_VchSettleCode: WideString;
begin
Result := DefaultInterface.VchSettleCode;
end;
procedure TVoucherEntryProperties.Set_VchSettleCode(const Param1: WideString);
{ Warning: The property VchSettleCode has a setter and a getter whose
types do not match. Delphi was unable to generate a property of
this sort and so is using a Variant as a passthrough. }
var
InterfaceVariant: OleVariant;
begin
InterfaceVariant := DefaultInterface;
InterfaceVariant.VchSettleCode := Param1;
end;
function TVoucherEntryProperties.Get_VchTransID: WideString;
begin
Result := DefaultInterface.VchTransID;
end;
procedure TVoucherEntryProperties.Set_VchTransID(const Param1: WideString);
{ Warning: The property VchTransID has a setter and a getter whose
types do not match. Delphi was unable to generate a property of
this sort and so is using a Variant as a passthrough. }
var
InterfaceVariant: OleVariant;
begin
InterfaceVariant := DefaultInterface;
InterfaceVariant.VchTransID := Param1;
end;
function TVoucherEntryProperties.Get_ItemID: WideString;
begin
Result := DefaultInterface.ItemID;
end;
procedure TVoucherEntryProperties.Set_ItemID(const Param1: WideString);
{ Warning: The property ItemID has a setter and a getter whose
types do not match. Delphi was unable to generate a property of
this sort and so is using a Variant as a passthrough. }
var
InterfaceVariant: OleVariant;
begin
InterfaceVariant := DefaultInterface;
InterfaceVariant.ItemID := Param1;
end;
function TVoucherEntryProperties.Get_ExchangeRate: Double;
begin
Result := DefaultInterface.ExchangeRate;
end;
procedure TVoucherEntryProperties.Set_ExchangeRate(Param1: Double);
begin
DefaultInterface.Set_ExchangeRate(Param1);
end;
{$ENDIF}
class function CoclsDataBase.Create: _clsDataBase;
begin
Result := CreateComObject(CLASS_clsDataBase) as _clsDataBase;
end;
class function CoclsDataBase.CreateRemote(const MachineName: string): _clsDataBase;
begin
Result := CreateRemoteComObject(MachineName, CLASS_clsDataBase) as _clsDataBase;
end;
procedure TclsDataBase.InitServerData;
const
CServerData: TServerData = (
ClassID: '{F6CC3A8E-4540-424D-83BE-26C06C1864C6}';
IntfIID: '{75EA5873-91E3-4617-9935-775AB2DE74A8}';
EventIID: '';
LicenseKey: nil;
Version: 500
);
begin
ServerData := @CServerData;
end;
procedure TclsDataBase.Connect;
var
punk: IUnknown;
begin
if FIntf = nil then
begin
punk := GetServer;
Fintf := punk as _clsDataBase;
end;
end;
procedure TclsDataBase.ConnectTo(svrIntf: _clsDataBase);
begin
Disconnect;
FIntf := svrIntf;
end;
procedure TclsDataBase.DisConnect;
begin
if Fintf <> nil then
begin
FIntf := nil;
end;
end;
function TclsDataBase.GetDefaultInterface: _clsDataBase;
begin
if FIntf = nil then
Connect;
Assert(FIntf <> nil,
'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
Result := FIntf;
end;
constructor TclsDataBase.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
FProps := TclsDataBaseProperties.Create(Self);
{$ENDIF}
end;
destructor TclsDataBase.Destroy;
begin
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
FProps.Free;
{$ENDIF}
inherited Destroy;
end;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
function TclsDataBase.GetServerProperties: TclsDataBaseProperties;
begin
Result := FProps;
end;
{$ENDIF}
function TclsDataBase.Get_Conn: _Connection;
begin
Result := DefaultInterface.Conn;
end;
procedure TclsDataBase.BeginTrans;
begin
DefaultInterface.BeginTrans;
end;
procedure TclsDataBase.CommitTrans;
begin
DefaultInterface.CommitTrans;
end;
procedure TclsDataBase.RollBackTrans;
begin
DefaultInterface.RollBackTrans;
end;
procedure TclsDataBase.InitConnection(const strConnectionString: WideString);
begin
DefaultInterface.InitConnection(strConnectionString);
end;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
constructor TclsDataBaseProperties.Create(AServer: TclsDataBase);
begin
inherited Create;
FServer := AServer;
end;
function TclsDataBaseProperties.GetDefaultInterface: _clsDataBase;
begin
Result := FServer.DefaultInterface;
end;
function TclsDataBaseProperties.Get_Conn: _Connection;
begin
Result := DefaultInterface.Conn;
end;
{$ENDIF}
procedure Register;
begin
RegisterComponents(dtlServerPage, [TVoucher, TVoucherEntry, TclsDataBase]);
end;
end.
钉钉氚云到金碟之一:金碟KIS专业版的DELPHI接口相关推荐
- ALL IN 钉钉的氚云,如何成为低代码头部?
来源 / ToB行业头条 (ID:wwwqifu) 采访对象 / 詹萧 作者 / 樊航 2015年SaaS赛道进入爆发期,历经8年,中国SaaS行业无论从市场规模.产品理念还是 ...
- 氚云徐平俊:低代码赛道热度陡升,今年增长目标200%
关注ITValue,看企业级最新鲜.最价值报道! 奥哲网络 CEO徐平俊 ,本文为其署名文章| 低代码应用氚云系奥哲网络旗下业务 | 1月14日,钉钉召开年度发布会,宣布战略升级.新钉钉的定位有两重: ...
- 逃离「大厂」回乡创业,用氚云攻克流量瓶颈,年入1300万
近两三年,短视频电商和直播带货火热,一定程度上提高了产品在线销售的说服力,但线上销售需要流量支撑,没有充足的营销投入,流量就无从保证,销路一样难以拓开.流量红利见顶,依靠传统电商模式按部就班地赚钱,对 ...
- 钉钉:开放不是玩流量
钉钉,正在重新思考自己真正的价值--答案不是规模.不是流量.不是过去20年里消费互联网的"成熟"游戏规则,而是更能切实服务B端客户.帮助企业做好数字化. 作者|皮爷 出品|产业家 ...
- 钉钉氚云到金碟之二:测试凭证写入金碟KIS(DELPHI)
DELPHI在使用其他程序的COM接口比较方便,在生成了相关的接口代码之后,只需引用接口单元即可,不需很多额外操作. 我新建一个DELPHI 应用程序,建一标准FORM,放一标准按钮,最简单的FORM ...
- 钉钉氚云到金碟之三 DELPHI从氚云下载数据
DELPHI7下实在难以测试出来,最后在DELPHI XE10 下经过两天测试出来了,能正常下载. 特别注意的是标红处的一些登录参数,要从钉钉氚云专业版系统处获得,然后替换红色处的代号,才能登录下载. ...
- “破局者”氚云——低代码应用搭建工具,基于钉钉敏捷搭建企业专属应用
关键词:低代码开发.氚云.企业信息化.丰富模板.移动办公 通过信息化来提升管理效率,减低管理成本,增强企业竞争力,是绝大部分企业在发展过程中都绕不开的关键点. 对于大型企业而言,专业的IT人才配备以及 ...
- 使用钉钉、宜搭、简道云及氚云等做项目施工或工程管理的前提
使用钉钉.宜搭.简道云及氚云等做项目施工或工程管理的前提 钉钉.宜搭.简道云及氚云等做项目施工或工程管理的前提 项目施工管理和项目工程管理,在中小型企业中是个难题: 专业的项目管理软件,过臃肿,很多 ...
- 【分享】乐才无需代码连接钉钉氚云的方法
乐才用户使用场景: 企业使用乐才人事智能管理系统管理组织架构.员工档案.招聘流程.员工福利等各个方面,提高人才管理效率.每当有员工入职时,HR需要先在乐才平台创建员工档案,发送电子合同签署,安排培训等 ...
最新文章
- 论文: Data-Driven Evolutionary Optimization: An Overview and case studies(1) 数据驱动概念,文章结构,大数分类
- 【创新应用】小图像,大图景:AI彻底改变了显微镜技术
- VirtualBox通过命令方式批量创建并配置虚拟机
- 【Coursera】SecondWeek(2)
- SAP UI5 Nav container - how the inner control is added
- input只能输入数字_Python基础第一个案例:猜数字游戏,这个都写不出,那就放弃吧...
- python爬虫select用法_Python爬虫利器二之Beautiful Soup的用法
- 实战 | F1060防火墙透明模式典型组网配置案例(trunk)
- Android详细刷机教程
- python-RFM模型
- 十进制浮点型数据转换成二进制,并在内存中的存储方式
- 第二十九讲 求方程组通解和特解的公式(矩阵指数)
- java中bio_java中bio是什么
- QQ群课堂无法打开和加入
- python爬取12306_Python 爬取12306火车票
- 函数分离常数法 oracle,函数值域之《分离常数法》正确打开方式
- 专利法上的抽象思想与具体技术 ——计算机程序算法的客体属性分析
- python 动漫卡通人物图片大全,『TensorFlow』DCGAN生成动漫人物头像_下
- Yii2日志使用方法
- 倍分法DID详解(一):传统DID