// ************************************************************************ //
// 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.                                         
// ************************************************************************ //

// C++ TLBWRTR : $Revision:   1.134.1.39  $
// File generated on 24.06.2000 17:52:23 from Type Library described below.

// ************************************************************************ //
// Type Lib: C:\WINNT\System32\msscript.ocx (1)
// IID\LCID: {0E59F1D2-1FBE-11D0-8FF2-00A0D10038BC}\0
// Helpfile: C:\WINNT\System32\MSSCRIPT.HLP
// DepndLst: 
//   (1) v2.0 stdole, (C:\WINNT\System32\stdole2.tlb)
//   (2) v4.0 StdVCL, (C:\WINNT\System32\STDVCL40.DLL)
// ************************************************************************ //
#ifndef   __MSScriptControl_OCX_h__
#define   __MSScriptControl_OCX_h__

#pragma option push -b -w-inl

#include <utilcls.h>
#if !defined(__UTILCLS_H_VERSION) || (__UTILCLS_H_VERSION < 0x0500)
//
// The code generated by the TLIBIMP utility or the Import|TypeLibrary 
// and Import|ActiveX feature of C++Builder rely on specific versions of
// the header file UTILCLS.H found in the INCLUDE\VCL directory. If an 
// older version of the file is detected, you probably need an update/patch.
//
#error "This file requires a newer version of the header UTILCLS.H" \
       "You need to apply an update/patch to your copy of C++Builder"
#endif
#include <olectl.h>
#include <ocidl.h>
#if !defined(_NO_VCL)
#include <stdvcl.hpp>
#endif  //   _NO_VCL
#include <ocxproxy.h>

#include "MSScriptControl_TLB.h"
namespace Msscriptcontrol_tlb
{

// *********************************************************************//
// HelpString: Microsoft Script Control 1.0
// Version:    1.0
// *********************************************************************//


// *********************************************************************//
// COM Component Proxy Class Declaration
// Component Name   : TScriptControl
// Help String      : Control to host scripting engines that understand the ActiveX Scripting interface
// Default Interface: IScriptControl
// Def. Intf. Object: TCOMIScriptControl
// Def. Intf. DISP? : No
// Event   Interface: DScriptControlSource
// TypeFlags        : (34) CanCreate Control
// *********************************************************************//

// *********************************************************************//
// Definition of closures to allow VCL handlers to catch OCX events.      
// *********************************************************************//
//+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
// Proxy class to host Control to host scripting engines that understand the ActiveX Scripting interface in CBuilder IDE/Applications.
//-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
class PACKAGE TScriptControl : public TOleControl
{
  OVERLOADED_PROP_METHODS;
  static TNoParam  OptParam;
  static GUID      DEF_CTL_INTF;

  // Instance of Closures to expose OCX Events as VCL ones
  //
  TNotifyEvent                   FOnError;
  TNotifyEvent                   FOnTimeout;

  // Default Interace of OCX
  //
  TCOMIScriptControl m_OCXIntf;

  // VCL Property Getters/Setters which delegate to OCX
  //
  Msscriptcontrol_tlb::IScriptModuleCollectionPtr __fastcall Get_Modules(void);
  Msscriptcontrol_tlb::IScriptErrorPtr __fastcall Get_Error(void);
  LPDISPATCH      __fastcall Get_CodeObject(void);
  Msscriptcontrol_tlb::IScriptProcedureCollectionPtr __fastcall Get_Procedures(void);

  // Static variables used by all instances of OCX proxy
  //
  static int          EventDispIDs[2];
  static TControlData CControlData;
  static GUID         CTL_DEF_INTF;

  // Method providing access to interface as __property
  //
  TCOMIScriptControl __fastcall GetDefaultInterface();
  TCOMIScriptControl __fastcall GetControlInterface()
  { return GetDefaultInterface(); }

protected:
  void     __fastcall CreateControl  ();
  void     __fastcall InitControlData();

public:
  virtual  __fastcall TScriptControl(TComponent* AOwner) : TOleControl(AOwner)
  {};
  virtual  __fastcall TScriptControl(HWND        Parent) : TOleControl(Parent)
  {};

  // OCX methods
  //
  void            __fastcall _AboutBox(void);
  void            __fastcall AddObject(BSTR Name/*[in]*/, LPDISPATCH Object/*[in]*/,
                                       TOLEBOOL AddMembers/*[in,def,opt]*/);
  void            __fastcall Reset(void);
  void            __fastcall AddCode(BSTR Code/*[in]*/);
  TVariant        __fastcall Eval(BSTR Expression/*[in]*/);
  void            __fastcall ExecuteStatement(BSTR Statement/*[in]*/);
  TVariant        __fastcall Run(BSTR ProcedureName/*[in]*/, LPSAFEARRAY* Parameters/*[in]*/);

  // OCX properties
  //
  __property Msscriptcontrol_tlb::IScriptModuleCollectionPtr Modules={ read=Get_Modules };
  __property Msscriptcontrol_tlb::IScriptErrorPtr Error={ read=Get_Error };
  __property _di_IDispatch CodeObject={ read=GetIDispatchProp, index=1000 };
  __property Msscriptcontrol_tlb::IScriptProcedureCollectionPtr Procedures={ read=Get_Procedures };
  __property TCOMIScriptControl ControlInterface={ read=GetDefaultInterface };

  // Published properties
  //
__published:

  // Standard/Extended properties
  //

  // OCX properties
  //
  __property System::WideString Language={ read=GetWideStringProp, write=SetWideStringProp, stored=false, index=1500 };
  __property Activex::TOleEnum State={ read=GetTOleEnumProp, write=SetTOleEnumProp, stored=false, index=1501 };
  __property int SitehWnd={ read=GetIntegerProp, write=SetIntegerProp, stored=false, index=1502 };
  __property int Timeout={ read=GetIntegerProp, write=SetIntegerProp, stored=false, index=1503 };
  __property bool AllowUI={ read=GetWordBoolProp, write=SetWordBoolProp, stored=false, index=1504 };
  __property bool UseSafeSubset={ read=GetWordBoolProp, write=SetWordBoolProp, stored=false, index=1505 };

  // OCX Events
  //
  __property TNotifyEvent OnError={ read=FOnError, write=FOnError };
  __property TNotifyEvent OnTimeout={ read=FOnTimeout, write=FOnTimeout };
};
typedef TScriptControl  TScriptControlProxy;

};     // namespace Msscriptcontrol_tlb

#if !defined(NO_IMPLICIT_NAMESPACE_USE)
using  namespace Msscriptcontrol_tlb;
#endif

#pragma option pop

#endif // __MSScriptControl_OCX_h__
