unit PDemoCOM_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/8/13 ¤W¤È 11:17:30 from Type Library described below.

// ************************************************************************  //
// Type Lib: C:\pub\LeeWei\Books\InsideVCL\Demos\Chap07\DemoCOM\PDemoCOM.tlb (1)
// LIBID: {73D86211-2067-40E8-99B1-927B6D53943A}
// LCID: 0
// Helpfile: 
// HelpString: PDemoCOM Library
// DepndLst: 
//   (1) v2.0 stdole, (C:\WINDOWS\System32\stdole2.tlb)
//   (2) v4.0 StdVCL, (C:\WINDOWS\System32\stdvcl40.dll)
// ************************************************************************ //
{$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
  PDemoCOMMajorVersion = 1;
  PDemoCOMMinorVersion = 0;

  LIBID_PDemoCOM: TGUID = '{73D86211-2067-40E8-99B1-927B6D53943A}';

  IID_IDemoCOM: TGUID = '{3C15A66B-630D-4B72-A3A1-F45491B72668}';
  CLASS_DemoCOM: TGUID = '{4A9AE1C9-6685-4FD9-9A77-838558BFED36}';
  IID_ISecond: TGUID = '{40BF4813-A11D-4C39-B055-776F7CDA57F3}';
type

// *********************************************************************//
// Forward declaration of types defined in TypeLibrary                    
// *********************************************************************//
  IDemoCOM = interface;
  IDemoCOMDisp = dispinterface;
  ISecond = interface;
  ISecondDisp = dispinterface;

// *********************************************************************//
// Declaration of CoClasses defined in Type Library                       
// (NOTE: Here we map each CoClass to its Default Interface)              
// *********************************************************************//
  DemoCOM = IDemoCOM;


// *********************************************************************//
// Interface: IDemoCOM
// Flags:     (4416) Dual OleAutomation Dispatchable
// GUID:      {3C15A66B-630D-4B72-A3A1-F45491B72668}
// *********************************************************************//
  IDemoCOM = interface(IDispatch)
    ['{3C15A66B-630D-4B72-A3A1-F45491B72668}']
    function GetSystemTime: WideString; safecall;
  end;

// *********************************************************************//
// DispIntf:  IDemoCOMDisp
// Flags:     (4416) Dual OleAutomation Dispatchable
// GUID:      {3C15A66B-630D-4B72-A3A1-F45491B72668}
// *********************************************************************//
  IDemoCOMDisp = dispinterface
    ['{3C15A66B-630D-4B72-A3A1-F45491B72668}']
    function GetSystemTime: WideString; dispid 201;
  end;

// *********************************************************************//
// Interface: ISecond
// Flags:     (4416) Dual OleAutomation Dispatchable
// GUID:      {40BF4813-A11D-4C39-B055-776F7CDA57F3}
// *********************************************************************//
  ISecond = interface(IDispatch)
    ['{40BF4813-A11D-4C39-B055-776F7CDA57F3}']
    function GetGreeting: WideString; safecall;
  end;

// *********************************************************************//
// DispIntf:  ISecondDisp
// Flags:     (4416) Dual OleAutomation Dispatchable
// GUID:      {40BF4813-A11D-4C39-B055-776F7CDA57F3}
// *********************************************************************//
  ISecondDisp = dispinterface
    ['{40BF4813-A11D-4C39-B055-776F7CDA57F3}']
    function GetGreeting: WideString; dispid 201;
  end;

// *********************************************************************//
// The Class CoDemoCOM provides a Create and CreateRemote method to          
// create instances of the default interface IDemoCOM exposed by              
// the CoClass DemoCOM. The functions are intended to be used by             
// clients wishing to automate the CoClass objects exposed by the         
// server of this typelibrary.                                            
// *********************************************************************//
  CoDemoCOM = class
    class function Create: IDemoCOM;
    class function CreateRemote(const MachineName: string): IDemoCOM;
  end;

implementation

uses ComObj;

class function CoDemoCOM.Create: IDemoCOM;
begin
  Result := CreateComObject(CLASS_DemoCOM) as IDemoCOM;
end;

class function CoDemoCOM.CreateRemote(const MachineName: string): IDemoCOM;
begin
  Result := CreateRemoteComObject(MachineName, CLASS_DemoCOM) as IDemoCOM;
end;

end.
