【delphi开源代码栏目提醒】:网学会员,鉴于大家对delphi开源代码十分关注,论文会员在此为大家搜集整理了“ComDll_TLB.pas”一文,供大家参考学习!
unit ComDll_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 2003-2-13 13:28:11 from Type Library described below.
// ************************************************************************ //
// Type Lib: C:\Samples\Delphi7\COM\ComDll\ComDll.dll (1)
// LIBID: {1D13686C-C397-4EEE-8955-8CF50AF8EC33}
// LCID: 0
// Helpfile:
// HelpString: ComDll Library
// DepndLst:
// (1) v2.0 stdole, (C:\WINDOWS\System32\stdole2.tlb)
// ************************************************************************ //
// *************************************************************************//
// 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, 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
ComDllMajorVersion = 1;
ComDllMinorVersion = 0;
LIBID_ComDll: TGUID = '{1D13686C-C397-4EEE-8955-8CF50AF8EC33}';
IID_IMyComObject: TGUID = '{E933B189-6E8B-4EC9-A14D-5458BEF0FF99}';
CLASS_MyComObject: TGUID = '{5B30FAE9-7904-40C2-B869-B649567962A3}';
IID_IMyEventObject: TGUID = '{4C7A56FF-1528-49FD-9388-6F8A9427AC2B}';
DIID_IMyEventObjectEvents: TGUID = '{6AD00394-5A82-49D1-80CE-BE9053F80EBF}';
CLASS_MyEventObject: TGUID = '{328069DF-3100-4E12-8BDE-AE03AECBA0FC}';
type
// *********************************************************************//
// Forward declaration of types defined in TypeLibrary
// *********************************************************************//
IMyComObject = interface;
IMyEventObject = interface;
IMyEventObjectDisp = dispinterface;
IMyEventObjectEvents = dispinterface;
// *********************************************************************//
// Declaration of CoClasses defined in Type Library
// (NOTE: Here we map each CoClass to its Default Interface)
// *********************************************************************//
MyComObject = IMyComObject;
MyEventObject = IMyEventObject;
// *********************************************************************//
// Interface: IMyComObject
// Flags: (256) OleAutomation
// GUID: {E933B189-6E8B-4EC9-A14D-5458BEF0FF99}
// *********************************************************************//
IMyComObject = interface(IUnknown)
['{E933B189-6E8B-4EC9-A14D-5458BEF0FF99}']
function ShowDialog: HResult; stdcall;
end;
// *********************************************************************//
// Interface: IMyEventObject
// Flags: (4416) Dual OleAutomation Dispatchable
// GUID: {4C7A56FF-1528-49FD-9388-6F8A9427AC2B}
// *********************************************************************//
IMyEventObject = interface(IDispatch)
['{4C7A56FF-1528-49FD-9388-6F8A9427AC2B}']
procedure SetNumber(Value: Integer); safecall;
end;
// *********************************************************************//
// DispIntf: IMyEventObjectDisp
// Flags: (4416) Dual OleAutomation Dispatchable
// GUID: {4C7A56FF-1528-49FD-9388-6F8A9427AC2B}
// *********************************************************************//
IMyEventObjectDisp = dispinterface
['{4C7A56FF-1528-49FD-9388-6F8A9427AC2B}']
procedure SetNumber(Value: Integer); dispid 201;
end;
// *********************************************************************//
// DispIntf: IMyEventObjectEvents
// Flags: (4096) Dispatchable
// GUID: {6AD00394-5A82-49D1-80CE-BE9053F80EBF}
// *********************************************************************//
IMyEventObjectEvents = dispinterface
['{6AD00394-5A82-49D1-80CE-BE9053F80EBF}']
procedure OnEventOccur; dispid 201;
end;
// *********************************************************************//
// The Class CoMyComObject provides a Create and CreateRemote method to
// create instances of the default interface IMyComObject exposed by
// the CoClass MyComObject. The functions are intended to be used by
// clients wishing to automate the CoClass objects exposed by the
// server of this typelibrary.
// *********************************************************************//
CoMyComObject = class
class function Create: IMyComObject;
class function CreateRemote(const MachineName: string): IMyComObject;
end;
// *********************************************************************//
// OLE Server Proxy class declaration
// Server Object : TMyComObject
// Help String : MyComObject
// Default Interface: IMyComObject
// Def. Intf. DISP? : No
// Event Interface:
// TypeFlags : (2) CanCreate
// *********************************************************************//
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
TMyComObjectProperties= class;
{$ENDIF}
TMyComObject = class(TOleServer)
private
FIntf: IMyComObject;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
FProps: TMyComObjectProperties;
function GetServerProperties: TMyComObjectProperties;
{$ENDIF}
function GetDefaultInterface: IMyComObject;
protected
procedure InitServerData; overrid
上一篇:
ColumnInfo.pas
下一篇:
秋天是疼痛的