unit pAggregateDemo_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/9/13 ¤W¤È 09:11:57 from Type Library described below.

// ************************************************************************  //
// Type Lib: E:\Leewei\Books\InsideVCL\Demos\Chap07\AggregateDemo\pAggregateDemo.tlb (1)
// LIBID: {953B9059-6D31-415B-BA0A-3903AB0C9242}
// LCID: 0
// Helpfile: 
// HelpString: pAggregateDemo Library
// DepndLst: 
//   (1) v2.0 stdole, (F:\WINNT\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
  pAggregateDemoMajorVersion = 1;
  pAggregateDemoMinorVersion = 0;

  LIBID_pAggregateDemo: TGUID = '{953B9059-6D31-415B-BA0A-3903AB0C9242}';

  IID_IController: TGUID = '{6CA7BB73-3FFF-4DFE-8E5D-0D1CE57E9F17}';
  CLASS_Controller: TGUID = '{963E3F6E-3DA3-497F-A272-CEF72F67856E}';
  IID_IAggreObj: TGUID = '{421558C9-A6EA-453A-ACD2-D09268222185}';
  CLASS_AggreObj: TGUID = '{1CC2EC6B-02C6-4E3C-B46F-24C46200DA5D}';
type

// *********************************************************************//
// Forward declaration of types defined in TypeLibrary                    
// *********************************************************************//
  IController = interface;
  IAggreObj = interface;

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


// *********************************************************************//
// Interface: IController
// Flags:     (256) OleAutomation
// GUID:      {6CA7BB73-3FFF-4DFE-8E5D-0D1CE57E9F17}
// *********************************************************************//
  IController = interface(IUnknown)
    ['{6CA7BB73-3FFF-4DFE-8E5D-0D1CE57E9F17}']
    function GetName(var sName: WideString): HResult; stdcall;
    function GetInnerName(var sNAme: WideString): HResult; stdcall;
  end;

// *********************************************************************//
// Interface: IAggreObj
// Flags:     (256) OleAutomation
// GUID:      {421558C9-A6EA-453A-ACD2-D09268222185}
// *********************************************************************//
  IAggreObj = interface(IUnknown)
    ['{421558C9-A6EA-453A-ACD2-D09268222185}']
    function GetInnerName(var sName: WideString): HResult; stdcall;
  end;

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

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

implementation

uses ComObj;

class function CoController.Create: IController;
begin
  Result := CreateComObject(CLASS_Controller) as IController;
end;

class function CoController.CreateRemote(const MachineName: string): IController;
begin
  Result := CreateRemoteComObject(MachineName, CLASS_Controller) as IController;
end;

class function CoAggreObj.Create: IAggreObj;
begin
  Result := CreateComObject(CLASS_AggreObj) as IAggreObj;
end;

class function CoAggreObj.CreateRemote(const MachineName: string): IAggreObj;
begin
  Result := CreateRemoteComObject(MachineName, CLASS_AggreObj) as IAggreObj;
end;

end.
