?? appserver_tlb.pas
字號(hào):
unit AppServer_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 : $Revision: 1.88 $
// File generated on 99-12-16 23:16:10 from Type Library described below.
// *************************************************************************//
// 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.
// ************************************************************************ //
// Type Lib: E:\Delphi\Delphi5從入門到精通—程序\多層數(shù)據(jù)庫(kù)\Sam14-10\AppServer.tlb (1)
// IID\LCID: {D7E315E5-B40B-11D3-8EB0-F2CD72A3AB87}\0
// Helpfile:
// DepndLst:
// (1) v2.0 stdole, (C:\WINDOWS\SYSTEM\\STDOLE2.TLB)
// (2) v4.0 StdVCL, (C:\WINDOWS\SYSTEM\STDVCL40.DLL)
// (3) v1.0 Midas, (C:\WINDOWS\SYSTEM\MIDAS.DLL)
// ************************************************************************ //
{$TYPEDADDRESS OFF} // Unit must be compiled without type-checked pointers.
interface
uses Windows, ActiveX, Classes, Graphics, OleServer, OleCtrls, StdVCL,
MIDAS;
// *********************************************************************//
// 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
AppServerMajorVersion = 1;
AppServerMinorVersion = 0;
LIBID_AppServer: TGUID = '{D7E315E5-B40B-11D3-8EB0-F2CD72A3AB87}';
IID_IFirstRDM: TGUID = '{D7E315E6-B40B-11D3-8EB0-F2CD72A3AB87}';
CLASS_FirstRDM: TGUID = '{D7E315E8-B40B-11D3-8EB0-F2CD72A3AB87}';
type
// *********************************************************************//
// Forward declaration of types defined in TypeLibrary
// *********************************************************************//
IFirstRDM = interface;
IFirstRDMDisp = dispinterface;
// *********************************************************************//
// Declaration of CoClasses defined in Type Library
// (NOTE: Here we map each CoClass to its Default Interface)
// *********************************************************************//
FirstRDM = IFirstRDM;
// *********************************************************************//
// Interface: IFirstRDM
// Flags: (4416) Dual OleAutomation Dispatchable
// GUID: {D7E315E6-B40B-11D3-8EB0-F2CD72A3AB87}
// *********************************************************************//
IFirstRDM = interface(IAppServer)
['{D7E315E6-B40B-11D3-8EB0-F2CD72A3AB87}']
end;
// *********************************************************************//
// DispIntf: IFirstRDMDisp
// Flags: (4416) Dual OleAutomation Dispatchable
// GUID: {D7E315E6-B40B-11D3-8EB0-F2CD72A3AB87}
// *********************************************************************//
IFirstRDMDisp = dispinterface
['{D7E315E6-B40B-11D3-8EB0-F2CD72A3AB87}']
function AS_ApplyUpdates(const ProviderName: WideString; Delta: OleVariant;
MaxErrors: Integer; out ErrorCount: Integer; var OwnerData: OleVariant): OleVariant; dispid 20000000;
function AS_GetRecords(const ProviderName: WideString; Count: Integer; out RecsOut: Integer;
Options: Integer; const CommandText: WideString;
var Params: OleVariant; var OwnerData: OleVariant): OleVariant; dispid 20000001;
function AS_DataRequest(const ProviderName: WideString; Data: OleVariant): OleVariant; dispid 20000002;
function AS_GetProviderNames: OleVariant; dispid 20000003;
function AS_GetParams(const ProviderName: WideString; var OwnerData: OleVariant): OleVariant; dispid 20000004;
function AS_RowRequest(const ProviderName: WideString; Row: OleVariant; RequestType: Integer;
var OwnerData: OleVariant): OleVariant; dispid 20000005;
procedure AS_Execute(const ProviderName: WideString; const CommandText: WideString;
var Params: OleVariant; var OwnerData: OleVariant); dispid 20000006;
end;
// *********************************************************************//
// The Class CoFirstRDM provides a Create and CreateRemote method to
// create instances of the default interface IFirstRDM exposed by
// the CoClass FirstRDM. The functions are intended to be used by
// clients wishing to automate the CoClass objects exposed by the
// server of this typelibrary.
// *********************************************************************//
CoFirstRDM = class
class function Create: IFirstRDM;
class function CreateRemote(const MachineName: string): IFirstRDM;
end;
// *********************************************************************//
// OLE Server Proxy class declaration
// Server Object : TFirstRDM
// Help String : FirstRDM Object
// Default Interface: IFirstRDM
// Def. Intf. DISP? : No
// Event Interface:
// TypeFlags : (2) CanCreate
// *********************************************************************//
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
TFirstRDMProperties= class;
{$ENDIF}
TFirstRDM = class(TOleServer)
private
FIntf: IFirstRDM;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
FProps: TFirstRDMProperties;
function GetServerProperties: TFirstRDMProperties;
{$ENDIF}
function GetDefaultInterface: IFirstRDM;
protected
procedure InitServerData; override;
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
procedure Connect; override;
procedure ConnectTo(svrIntf: IFirstRDM);
procedure Disconnect; override;
function AS_ApplyUpdates(const ProviderName: WideString; Delta: OleVariant;
MaxErrors: Integer; out ErrorCount: Integer; var OwnerData: OleVariant): OleVariant;
function AS_GetRecords(const ProviderName: WideString; Count: Integer; out RecsOut: Integer;
Options: Integer; const CommandText: WideString;
var Params: OleVariant; var OwnerData: OleVariant): OleVariant;
function AS_DataRequest(const ProviderName: WideString; Data: OleVariant): OleVariant;
function AS_GetProviderNames: OleVariant;
function AS_GetParams(const ProviderName: WideString; var OwnerData: OleVariant): OleVariant;
function AS_RowRequest(const ProviderName: WideString; Row: OleVariant; RequestType: Integer;
var OwnerData: OleVariant): OleVariant;
procedure AS_Execute(const ProviderName: WideString; const CommandText: WideString;
var Params: OleVariant; var OwnerData: OleVariant);
property DefaultInterface: IFirstRDM read GetDefaultInterface;
published
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
property Server: TFirstRDMProperties read GetServerProperties;
{$ENDIF}
end;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
// *********************************************************************//
// OLE Server Properties Proxy Class
// Server Object : TFirstRDM
// (This object is used by the IDE's Property Inspector to allow editing
// of the properties of this server)
// *********************************************************************//
TFirstRDMProperties = class(TPersistent)
private
FServer: TFirstRDM;
function GetDefaultInterface: IFirstRDM;
constructor Create(AServer: TFirstRDM);
protected
public
property DefaultInterface: IFirstRDM read GetDefaultInterface;
published
end;
{$ENDIF}
procedure Register;
implementation
uses ComObj;
class function CoFirstRDM.Create: IFirstRDM;
begin
Result := CreateComObject(CLASS_FirstRDM) as IFirstRDM;
end;
class function CoFirstRDM.CreateRemote(const MachineName: string): IFirstRDM;
begin
Result := CreateRemoteComObject(MachineName, CLASS_FirstRDM) as IFirstRDM;
end;
procedure TFirstRDM.InitServerData;
const
CServerData: TServerData = (
ClassID: '{D7E315E8-B40B-11D3-8EB0-F2CD72A3AB87}';
IntfIID: '{D7E315E6-B40B-11D3-8EB0-F2CD72A3AB87}';
EventIID: '';
LicenseKey: nil;
Version: 500);
begin
ServerData := @CServerData;
end;
procedure TFirstRDM.Connect;
var
punk: IUnknown;
begin
if FIntf = nil then
begin
punk := GetServer;
Fintf:= punk as IFirstRDM;
end;
end;
procedure TFirstRDM.ConnectTo(svrIntf: IFirstRDM);
begin
Disconnect;
FIntf := svrIntf;
end;
procedure TFirstRDM.DisConnect;
begin
if Fintf <> nil then
begin
FIntf := nil;
end;
end;
function TFirstRDM.GetDefaultInterface: IFirstRDM;
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 TFirstRDM.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
FProps := TFirstRDMProperties.Create(Self);
{$ENDIF}
end;
destructor TFirstRDM.Destroy;
begin
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
FProps.Free;
{$ENDIF}
inherited Destroy;
end;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
function TFirstRDM.GetServerProperties: TFirstRDMProperties;
begin
Result := FProps;
end;
{$ENDIF}
function TFirstRDM.AS_ApplyUpdates(const ProviderName: WideString; Delta: OleVariant;
MaxErrors: Integer; out ErrorCount: Integer;
var OwnerData: OleVariant): OleVariant;
begin
Result := DefaultInterface.AS_ApplyUpdates(ProviderName, Delta, MaxErrors, ErrorCount, OwnerData);
end;
function TFirstRDM.AS_GetRecords(const ProviderName: WideString; Count: Integer;
out RecsOut: Integer; Options: Integer;
const CommandText: WideString; var Params: OleVariant;
var OwnerData: OleVariant): OleVariant;
begin
Result := DefaultInterface.AS_GetRecords(ProviderName, Count, RecsOut, Options, CommandText,
Params, OwnerData);
end;
function TFirstRDM.AS_DataRequest(const ProviderName: WideString; Data: OleVariant): OleVariant;
begin
Result := DefaultInterface.AS_DataRequest(ProviderName, Data);
end;
function TFirstRDM.AS_GetProviderNames: OleVariant;
begin
Result := DefaultInterface.AS_GetProviderNames;
end;
function TFirstRDM.AS_GetParams(const ProviderName: WideString; var OwnerData: OleVariant): OleVariant;
begin
Result := DefaultInterface.AS_GetParams(ProviderName, OwnerData);
end;
function TFirstRDM.AS_RowRequest(const ProviderName: WideString; Row: OleVariant;
RequestType: Integer; var OwnerData: OleVariant): OleVariant;
begin
Result := DefaultInterface.AS_RowRequest(ProviderName, Row, RequestType, OwnerData);
end;
procedure TFirstRDM.AS_Execute(const ProviderName: WideString; const CommandText: WideString;
var Params: OleVariant; var OwnerData: OleVariant);
begin
DefaultInterface.AS_Execute(ProviderName, CommandText, Params, OwnerData);
end;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
constructor TFirstRDMProperties.Create(AServer: TFirstRDM);
begin
inherited Create;
FServer := AServer;
end;
function TFirstRDMProperties.GetDefaultInterface: IFirstRDM;
begin
Result := FServer.DefaultInterface;
end;
{$ENDIF}
procedure Register;
begin
RegisterComponents('Servers',[TFirstRDM]);
end;
end.
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -