unit Example1_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.130  $
// File generated on 09.07.2002 15:06:40 from Type Library described below.

// ************************************************************************  //
// Type Lib: D:\BLOODGOD\SAVE\COM\ForArticle\Example1.tlb (1)
// LIBID: {D3AF38E0-8060-11D6-BC56-0050BF44BD3B}
// LCID: 0
// Helpfile: 
// DepndLst: 
//   (1) v2.0 stdole, (C:\WINNT\System32\stdole2.tlb)
//   (2) v4.0 StdVCL, (C:\WINNT\System32\stdvcl40.dll)
// ************************************************************************ //
{$TYPEDADDRESS OFF} // Unit must be compiled without type-checked pointers. 
{$WARN SYMBOL_PLATFORM OFF}
{$WRITEABLECONST ON}

interface

uses ActiveX, Classes, Graphics, StdVCL, Variants, Windows;
  

// *********************************************************************//
// 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
  Example1MajorVersion = 1;
  Example1MinorVersion = 0;

  LIBID_Example1: TGUID = '{D3AF38E0-8060-11D6-BC56-0050BF44BD3B}';

  IID_IAutoServ1: TGUID = '{D3AF38E1-8060-11D6-BC56-0050BF44BD3B}';
  CLASS_AutoServ1: TGUID = '{D3AF38E3-8060-11D6-BC56-0050BF44BD3B}';
type

// *********************************************************************//
// Forward declaration of types defined in TypeLibrary                    
// *********************************************************************//
  IAutoServ1 = interface;
  IAutoServ1Disp = dispinterface;

// *********************************************************************//
// Declaration of CoClasses defined in Type Library                       
// (NOTE: Here we map each CoClass to its Default Interface)              
// *********************************************************************//
  AutoServ1 = IAutoServ1;


// *********************************************************************//
// Interface: IAutoServ1
// Flags:     (4416) Dual OleAutomation Dispatchable
// GUID:      {D3AF38E1-8060-11D6-BC56-0050BF44BD3B}
// *********************************************************************//
  IAutoServ1 = interface(IDispatch)
    ['{D3AF38E1-8060-11D6-BC56-0050BF44BD3B}']
    procedure NewOle; safecall;
    function  Get_Caption: WideString; safecall;
    procedure Set_Caption(const Value: WideString); safecall;
    property Caption: WideString read Get_Caption write Set_Caption;
  end;

// *********************************************************************//
// DispIntf:  IAutoServ1Disp
// Flags:     (4416) Dual OleAutomation Dispatchable
// GUID:      {D3AF38E1-8060-11D6-BC56-0050BF44BD3B}
// *********************************************************************//
  IAutoServ1Disp = dispinterface
    ['{D3AF38E1-8060-11D6-BC56-0050BF44BD3B}']
    procedure NewOle; dispid 1;
    property Caption: WideString dispid 2;
  end;

// *********************************************************************//
// The Class CoAutoServ1 provides a Create and CreateRemote method to          
// create instances of the default interface IAutoServ1 exposed by              
// the CoClass AutoServ1. The functions are intended to be used by             
// clients wishing to automate the CoClass objects exposed by the         
// server of this typelibrary.                                            
// *********************************************************************//
  CoAutoServ1 = class
    class function Create: IAutoServ1;
    class function CreateRemote(const MachineName: string): IAutoServ1;
  end;

implementation

uses ComObj;

class function CoAutoServ1.Create: IAutoServ1;
begin
  Result := CreateComObject(CLASS_AutoServ1) as IAutoServ1;
end;

class function CoAutoServ1.CreateRemote(const MachineName: string): IAutoServ1;
begin
  Result := CreateRemoteComObject(MachineName, CLASS_AutoServ1) as IAutoServ1;
end;

end.
