【delphi开源代码栏目提醒】:网学会员,鉴于大家对delphi开源代码十分关注,论文会员在此为大家搜集整理了“COMPEvent_TLB.pas”一文,供大家参考学习!
unit COMPEvent_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 19:15:54 from Type Library described below.
// ************************************************************************ //
// Type Lib: C:\Samples\Delphi7\COM\COMPEvent\COMPEvent.tlb (1)
// LIBID: {5A7DEC74-B933-41EB-ACB7-D4F58858483A}
// LCID: 0
// Helpfile:
// HelpString: COMPEvent Library
// DepndLst:
// (1) v2.0 stdole, (C:\WINDOWS\System32\stdole2.tlb)
// ************************************************************************ //
{$TYPEDADDRESS OFF} // Unit must be compiled without type-checked pointers.
{$WARN SYMBOL_PLATFORM OFF}
{$WRITEABLECONST ON}
{$VARPROPSETTER ON}
interface
uses Windows, ActiveX, Classes, Graphics, 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
COMPEventMajorVersion = 1;
COMPEventMinorVersion = 0;
LIBID_COMPEvent: TGUID = '{5A7DEC74-B933-41EB-ACB7-D4F58858483A}';
IID_IMyCOMPEvent: TGUID = '{C0E5D31D-9ADC-434B-A71D-573CE638CFBA}';
CLASS_MyCOMPEvent: TGUID = '{F0BB16C2-83B0-49AA-B6FE-A4F29EF8A4E7}';
type
// *********************************************************************//
// Forward declaration of types defined in TypeLibrary
// *********************************************************************//
IMyCOMPEvent = interface;
IMyCOMPEventDisp = dispinterface;
// *********************************************************************//
// Declaration of CoClasses defined in Type Library
// (NOTE: Here we map each CoClass to its Default Interface)
// *********************************************************************//
MyCOMPEvent = IMyCOMPEvent;
// *********************************************************************//
// Interface: IMyCOMPEvent
// Flags: (4416) Dual OleAutomation Dispatchable
// GUID: {C0E5D31D-9ADC-434B-A71D-573CE638CFBA}
// *********************************************************************//
IMyCOMPEvent = interface(IDispatch)
['{C0E5D31D-9ADC-434B-A71D-573CE638CFBA}']
procedure MyEvent; safecall;
end;
// *********************************************************************//
// DispIntf: IMyCOMPEventDisp
// Flags: (4416) Dual OleAutomation Dispatchable
// GUID: {C0E5D31D-9ADC-434B-A71D-573CE638CFBA}
// *********************************************************************//
IMyCOMPEventDisp = dispinterface
['{C0E5D31D-9ADC-434B-A71D-573CE638CFBA}']
procedure MyEvent; dispid 201;
end;
// *********************************************************************//
// The Class CoMyCOMPEvent provides a Create and CreateRemote method to
// create instances of the default interface IMyCOMPEvent exposed by
// the CoClass MyCOMPEvent. The functions are intended to be used by
// clients wishing to automate the CoClass objects exposed by the
// server of this typelibrary.
// *********************************************************************//
CoMyCOMPEvent = class
class function Create: IMyCOMPEvent;
class function CreateRemote(const MachineName: string): IMyCOMPEvent;
end;
implementation
uses ComObj;
class function CoMyCOMPEvent.Create: IMyCOMPEvent;
begin
Result := CreateComObject(CLASS_MyCOMPEvent) as IMyCOMPEvent;
end;
class function CoMyCOMPEvent.CreateRemote(const MachineName: string): IMyCOMPEvent;
begin
Result := CreateRemoteComObject(MachineName, CLASS_MyCOMPEvent) as IMyCOMPEvent;
end;
end.
上一篇:
frmCPick.frm
下一篇:
法律专业开题报告范文