unit Example2_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 02.08.2002 15:18:21 from Type Library described below.

// ************************************************************************  //
// Type Lib: D:\BLOODGOD\SAVE\COM\ForArticle\Example2\Example2.tlb (1)
// LIBID: {39F943A4-85B2-4845-A840-829AF6DA90F3}
// 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
  Example2MajorVersion = 1;
  Example2MinorVersion = 0;

  LIBID_Example2: TGUID = '{39F943A4-85B2-4845-A840-829AF6DA90F3}';

  IID_IAutoServ2: TGUID = '{2819362C-35AF-4E4B-BEC9-A1E40BC2ED14}';
  CLASS_AutoServ2: TGUID = '{51C828D2-25A4-473A-960D-B3AF896EF6B3}';
type

// *********************************************************************//
// Forward declaration of types defined in TypeLibrary                    
// *********************************************************************//
  IAutoServ2 = interface;
  IAutoServ2Disp = dispinterface;

// *********************************************************************//
// Declaration of CoClasses defined in Type Library                       
// (NOTE: Here we map each CoClass to its Default Interface)              
// *********************************************************************//
  AutoServ2 = IAutoServ2;


// *********************************************************************//
// Interface: IAutoServ2
// Flags:     (4416) Dual OleAutomation Dispatchable
// GUID:      {2819362C-35AF-4E4B-BEC9-A1E40BC2ED14}
// *********************************************************************//
  IAutoServ2 = interface(IDispatch)
    ['{2819362C-35AF-4E4B-BEC9-A1E40BC2ED14}']
    function  Get_MyMessage: WideString; safecall;
    procedure Set_MyMessage(const Value: WideString); safecall;
    procedure ShowMyMessage; safecall;
    property MyMessage: WideString read Get_MyMessage write Set_MyMessage;
  end;

// *********************************************************************//
// DispIntf:  IAutoServ2Disp
// Flags:     (4416) Dual OleAutomation Dispatchable
// GUID:      {2819362C-35AF-4E4B-BEC9-A1E40BC2ED14}
// *********************************************************************//
  IAutoServ2Disp = dispinterface
    ['{2819362C-35AF-4E4B-BEC9-A1E40BC2ED14}']
    property MyMessage: WideString dispid 1;
    procedure ShowMyMessage; dispid 2;
  end;

// *********************************************************************//
// The Class CoAutoServ2 provides a Create and CreateRemote method to          
// create instances of the default interface IAutoServ2 exposed by              
// the CoClass AutoServ2. The functions are intended to be used by             
// clients wishing to automate the CoClass objects exposed by the         
// server of this typelibrary.                                            
// *********************************************************************//
  CoAutoServ2 = class
    class function Create: IAutoServ2;
    class function CreateRemote(const MachineName: string): IAutoServ2;
  end;

implementation

uses ComObj;

class function CoAutoServ2.Create: IAutoServ2;
begin
  Result := CreateComObject(CLASS_AutoServ2) as IAutoServ2;
end;

class function CoAutoServ2.CreateRemote(const MachineName: string): IAutoServ2;
begin
  Result := CreateRemoteComObject(MachineName, CLASS_AutoServ2) as IAutoServ2;
end;

end.
