📄 dfminfotip_tlb.pas
字号:
unit DFMInfoTip_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 2/25/2000 3:10:41 PM 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: C:\Work\Win2K\DFMInfoTip\DFMInfoTip.tlb (1)
// IID\LCID: {8DC76F80-09F4-44FD-A101-3E43FF78C695}\0
// Helpfile:
// DepndLst:
// (1) v2.0 stdole, (D:\WINNT\System32\stdole2.tlb)
// (2) v4.0 StdVCL, (D:\WINNT\System32\STDVCL40.DLL)
// ************************************************************************ //
{$TYPEDADDRESS OFF} // Unit must be compiled without type-checked pointers.
interface
uses Windows, ActiveX, Classes, Graphics, OleServer, OleCtrls, StdVCL;
// *********************************************************************//
// 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
DFMInfoTipMajorVersion = 1;
DFMInfoTipMinorVersion = 0;
LIBID_DFMInfoTip: TGUID = '{8DC76F80-09F4-44FD-A101-3E43FF78C695}';
IID_IDFMInfoTip: TGUID = '{B4D5F9E3-A8E9-4845-BA36-B10B29928B3B}';
CLASS_DFMInfoTip: TGUID = '{A6614304-6DFB-4A31-8032-C4E0CCA42D81}';
type
// *********************************************************************//
// Forward declaration of types defined in TypeLibrary
// *********************************************************************//
IDFMInfoTip = interface;
IDFMInfoTipDisp = dispinterface;
// *********************************************************************//
// Declaration of CoClasses defined in Type Library
// (NOTE: Here we map each CoClass to its Default Interface)
// *********************************************************************//
DFMInfoTip = IDFMInfoTip;
// *********************************************************************//
// Interface: IDFMInfoTip
// Flags: (4416) Dual OleAutomation Dispatchable
// GUID: {B4D5F9E3-A8E9-4845-BA36-B10B29928B3B}
// *********************************************************************//
IDFMInfoTip = interface(IDispatch)
['{B4D5F9E3-A8E9-4845-BA36-B10B29928B3B}']
end;
// *********************************************************************//
// DispIntf: IDFMInfoTipDisp
// Flags: (4416) Dual OleAutomation Dispatchable
// GUID: {B4D5F9E3-A8E9-4845-BA36-B10B29928B3B}
// *********************************************************************//
IDFMInfoTipDisp = dispinterface
['{B4D5F9E3-A8E9-4845-BA36-B10B29928B3B}']
end;
// *********************************************************************//
// The Class CoDFMInfoTip provides a Create and CreateRemote method to
// create instances of the default interface IDFMInfoTip exposed by
// the CoClass DFMInfoTip. The functions are intended to be used by
// clients wishing to automate the CoClass objects exposed by the
// server of this typelibrary.
// *********************************************************************//
CoDFMInfoTip = class
class function Create: IDFMInfoTip;
class function CreateRemote(const MachineName: string): IDFMInfoTip;
end;
// *********************************************************************//
// OLE Server Proxy class declaration
// Server Object : TDFMInfoTip
// Help String : DFMInfoTip Object
// Default Interface: IDFMInfoTip
// Def. Intf. DISP? : No
// Event Interface:
// TypeFlags : (2) CanCreate
// *********************************************************************//
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
TDFMInfoTipProperties= class;
{$ENDIF}
TDFMInfoTip = class(TOleServer)
private
FIntf: IDFMInfoTip;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
FProps: TDFMInfoTipProperties;
function GetServerProperties: TDFMInfoTipProperties;
{$ENDIF}
function GetDefaultInterface: IDFMInfoTip;
protected
procedure InitServerData; override;
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
procedure Connect; override;
procedure ConnectTo(svrIntf: IDFMInfoTip);
procedure Disconnect; override;
property DefaultInterface: IDFMInfoTip read GetDefaultInterface;
published
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
property Server: TDFMInfoTipProperties read GetServerProperties;
{$ENDIF}
end;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
// *********************************************************************//
// OLE Server Properties Proxy Class
// Server Object : TDFMInfoTip
// (This object is used by the IDE's Property Inspector to allow editing
// of the properties of this server)
// *********************************************************************//
TDFMInfoTipProperties = class(TPersistent)
private
FServer: TDFMInfoTip;
function GetDefaultInterface: IDFMInfoTip;
constructor Create(AServer: TDFMInfoTip);
protected
public
property DefaultInterface: IDFMInfoTip read GetDefaultInterface;
published
end;
{$ENDIF}
procedure Register;
implementation
uses ComObj;
class function CoDFMInfoTip.Create: IDFMInfoTip;
begin
Result := CreateComObject(CLASS_DFMInfoTip) as IDFMInfoTip;
end;
class function CoDFMInfoTip.CreateRemote(const MachineName: string): IDFMInfoTip;
begin
Result := CreateRemoteComObject(MachineName, CLASS_DFMInfoTip) as IDFMInfoTip;
end;
procedure TDFMInfoTip.InitServerData;
const
CServerData: TServerData = (
ClassID: '{A6614304-6DFB-4A31-8032-C4E0CCA42D81}';
IntfIID: '{B4D5F9E3-A8E9-4845-BA36-B10B29928B3B}';
EventIID: '';
LicenseKey: nil;
Version: 500);
begin
ServerData := @CServerData;
end;
procedure TDFMInfoTip.Connect;
var
punk: IUnknown;
begin
if FIntf = nil then
begin
punk := GetServer;
Fintf:= punk as IDFMInfoTip;
end;
end;
procedure TDFMInfoTip.ConnectTo(svrIntf: IDFMInfoTip);
begin
Disconnect;
FIntf := svrIntf;
end;
procedure TDFMInfoTip.DisConnect;
begin
if Fintf <> nil then
begin
FIntf := nil;
end;
end;
function TDFMInfoTip.GetDefaultInterface: IDFMInfoTip;
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 TDFMInfoTip.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
FProps := TDFMInfoTipProperties.Create(Self);
{$ENDIF}
end;
destructor TDFMInfoTip.Destroy;
begin
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
FProps.Free;
{$ENDIF}
inherited Destroy;
end;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
function TDFMInfoTip.GetServerProperties: TDFMInfoTipProperties;
begin
Result := FProps;
end;
{$ENDIF}
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
constructor TDFMInfoTipProperties.Create(AServer: TDFMInfoTip);
begin
inherited Create;
FServer := AServer;
end;
function TDFMInfoTipProperties.GetDefaultInterface: IDFMInfoTip;
begin
Result := FServer.DefaultInterface;
end;
{$ENDIF}
procedure Register;
begin
RegisterComponents('Servers',[TDFMInfoTip]);
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -