Показать сообщение отдельно
  #3  
Старый 23.03.2011, 16:43
AlexSku AlexSku вне форума
Специалист
 
Регистрация: 07.05.2007
Адрес: Москва
Сообщения: 884
Репутация: 21699
По умолчанию

Код:
unit S7PROSIMLib_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 23.03.2011 0:05:10 from Type Library described below.

// ************************************************************************  //
// Type Lib: C:\Program Files\Siemens\Plcsim\s7wsi\s7wspsmx.dll (1)
// LIBID: {83CC0D80-FEDA-11D1-BE76-0060B06816CF}
// LCID: 0
// Helpfile: 
// HelpString: Siemens S7ProSim COM Object
// DepndLst: 
//   (1) v2.0 stdole, (C:\Windows\system32\stdole2.tlb)
// Errors:
//   Error creating palette bitmap of (TS7ProSim) : Server C:\Program Files\Siemens\Plcsim\s7wsi\s7wspsmx.dll contains no icons
// ************************************************************************ //
// *************************************************************************//
// NOTE:                                                                      
// Items guarded by $IFDEF_LIVE_SERVER_AT_DESIGN_TIME are used by properties  
// which return objects that may need to be explicitly created via a function 
// call prior to any access via the property. These items have been disabled  
// in order to prevent accidental use from within the object inspector. You   
// may enable them by defining LIVE_SERVER_AT_DESIGN_TIME or by selectively   
// removing them from the $IFDEF blocks. However, such items must still be    
// programmatically created via a method of the appropriate CoClass before    
// they can be used.                                                          
{$TYPEDADDRESS OFF} // Unit must be compiled without type-checked pointers. 
{$WARN SYMBOL_PLATFORM OFF}
{$WRITEABLECONST ON}
{$VARPROPSETTER ON}
interface

uses Windows, ActiveX, Classes, Graphics, OleServer, 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
  S7PROSIMLibMajorVersion = 1;
  S7PROSIMLibMinorVersion = 0;

  LIBID_S7PROSIMLib: TGUID = '{83CC0D80-FEDA-11D1-BE76-0060B06816CF}';

  IID_IS7ProSimEvents: TGUID = '{83CC0D82-FEDA-11D1-BE76-0060B06816CF}';
  IID_IS7ProSim: TGUID = '{83CC0D81-FEDA-11D1-BE76-0060B06816CF}';
  CLASS_S7ProSim: TGUID = '{83CC0D83-FEDA-11D1-BE76-0060B06816CF}';

// *********************************************************************//
// Declaration of Enumerations defined in Type Library                    
// *********************************************************************//
// Constants for enum __MIDL___MIDL_itf_S7wspsmx_0000_0002
type
  __MIDL___MIDL_itf_S7wspsmx_0000_0002 = TOleEnum;
const
  S7Byte = $00000002;
  S7Word = $00000003;
  S7DoubleWord = $00000004;

// Constants for enum __MIDL___MIDL_itf_S7wspsmx_0000_0003
type
  __MIDL___MIDL_itf_S7wspsmx_0000_0003 = TOleEnum;
const
  S7_Bit = $00000001;
  S7_Byte = $00000002;
  S7_Word = $00000003;
  S7_DoubleWord = $00000004;

// Constants for enum __MIDL___MIDL_itf_S7wspsmx_0000_0001
type
  __MIDL___MIDL_itf_S7wspsmx_0000_0001 = TOleEnum;
const
  SingleScan = $00000000;
  ContinuousScan = $00000001;

// Constants for enum __MIDL___MIDL_itf_S7wspsmx_0000_0004
type
  __MIDL___MIDL_itf_S7wspsmx_0000_0004 = TOleEnum;
const
  Running = $00000000;
  Paused = $00000001;
  Disabled = $00000002;

// Constants for enum __MIDL___MIDL_itf_S7wspsmx_0000_0005
type
  __MIDL___MIDL_itf_S7wspsmx_0000_0005 = TOleEnum;
const
  WarmStart = $00000000;
  HotStart = $00000001;
  ColdStart = $00000002;

type

// *********************************************************************//
// Forward declaration of types defined in TypeLibrary                    
// *********************************************************************//
  IS7ProSimEvents = interface;
  IS7ProSim = interface;
  IS7ProSimDisp = dispinterface;

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


// *********************************************************************//
// Declaration of structures, unions and aliases.                         
// *********************************************************************//
  POleVariant1 = ^OleVariant; {*}

  ImageDataTypeConstants = __MIDL___MIDL_itf_S7wspsmx_0000_0002; 
  PointDataTypeConstants = __MIDL___MIDL_itf_S7wspsmx_0000_0003; 
  ScanModeConstants = __MIDL___MIDL_itf_S7wspsmx_0000_0001; 
  PauseStateConstants = __MIDL___MIDL_itf_S7wspsmx_0000_0004; 
  RestartSwitchPositionConstants = __MIDL___MIDL_itf_S7wspsmx_0000_0005; 

// *********************************************************************//
// Interface: IS7ProSimEvents
// Flags:     (256) OleAutomation
// GUID:      {83CC0D82-FEDA-11D1-BE76-0060B06816CF}
// *********************************************************************//
  IS7ProSimEvents = interface(IUnknown)
    ['{83CC0D82-FEDA-11D1-BE76-0060B06816CF}']
    function ScanFinished(ScanInfo: OleVariant): HResult; stdcall;
    function ConnectionError(const ControlEngine: WideString; Error: Integer): HResult; stdcall;
    function PLCSimStateChanged(const NewState: WideString): HResult; stdcall;
    function PauseStateChanged(const NewState: WideString): HResult; stdcall;
    function ScanModeChanged(const NewState: WideString): HResult; stdcall;
  end;
Нужно как-то написать обработчики к IS7ProSimEvents.
Ответить с цитированием