Board index » cppbuilder » Microsoft Script Control and BCB

Microsoft Script Control and BCB

I have installed MS Script Control 1.0 ActiveX in BCB1
neither the pascal or the c++ header mention a Run method that is
documented in the MS Script Control *psuedo documentation* at
http://msdn.microsoft.com/scripting/default.htm?/scripting/scriptcont...

This is the hpp file generated by BCB :

//----------------------------------------------------------------------------

// MSSCRIPT.hpp - bcbdcc32 generated hdr (DO NOT EDIT) rev: 0
// From: MSSCRIPT.pas
//----------------------------------------------------------------------------

#ifndef MSSCRIPTHPP
#define MSSCRIPTHPP
//----------------------------------------------------------------------------

#include <Controls.hpp>
#include <OleCtrls.hpp>
#include <Graphics.hpp>
#include <Classes.hpp>
#include <OleCtl.hpp>
#include <OLE2.hpp>
#include <System.hpp>
namespace Msscript
{
//-- type declarations
-------------------------------------------------------
class __declspec(delphiclass) TScriptControl;
class __declspec(pascalimplementation) TScriptControl : public
Olectrls::TOleControl
{
 typedef Olectrls::TOleControl inherited;

private:
 Classes::TNotifyEvent FOnError;
 Classes::TNotifyEvent FOnTimeout;

protected:
 virtual void __fastcall InitControlData(void);

public:
 void __stdcall _AboutBox(void);
 void __stdcall AddObject(const System::AnsiString Name, const
System::Variant &Object_, Word AddMembers
  );
 void __stdcall Reset(void);
 void __stdcall AddCode(const System::AnsiString Code);
 System::Variant __stdcall Eval(const System::AnsiString Expression);
 void __stdcall ExecuteStatement(const System::AnsiString Statement);
 __property System::Variant Modules = {read=GetVariantProp, index=1506};

 __property System::Variant Error = {read=GetVariantProp, index=1507};
 __property System::Variant CodeObject = {read=GetVariantProp,
index=1000};
 __property System::Variant Procedures = {read=GetVariantProp,
index=1001};

__published:
 __property System::AnsiString Language = {read=GetStringProp,
write=SetStringProp, stored=false, index=1500
  , nodefault};
 __property Olectrls::TOleEnum State = {read=GetOleEnumProp,
write=SetOleEnumProp, stored=false, index=1501
  , nodefault};
 __property int SitehWnd = {read=GetIntegerProp, write=SetIntegerProp,
stored=false, index=1502, nodefault
  };
 __property int Timeout = {read=GetIntegerProp, write=SetIntegerProp,
stored=false, index=1503, nodefault
  };
 __property Word AllowUI = {read=GetOleBoolProp, write=SetOleBoolProp,
stored=false, index=1504, nodefault
  };
 __property Word UseSafeSubset = {read=GetOleBoolProp,
write=SetOleBoolProp, stored=false, index=1505
  , nodefault};
 __property Classes::TNotifyEvent OnError = {read=FOnError,
write=FOnError};
 __property Classes::TNotifyEvent OnTimeout = {read=FOnTimeout,
write=FOnTimeout};
public:
 /* TOleControl.Create */ __fastcall virtual
TScriptControl(Classes::TComponent* AOwner) : Olectrls::
  TOleControl(AOwner) { }
 /* TOleControl.Destroy */ __fastcall virtual ~TScriptControl(void) { }

public:
 /* TWinControl.CreateParented */ __fastcall TScriptControl(HWND
ParentWindow) : Olectrls::TOleControl(
  ParentWindow) { }

Quote
};

//-- var, const, procedure
---------------------------------------------------
#define Initialized (Byte)(0)
#define Connected (Byte)(1)
extern void __fastcall Register(void);

Quote
} /* namespace Msscript */

#if !defined(NO_IMPLICIT_NAMESPACE_USE)
using namespace Msscript;
#endif
//-- end unit
----------------------------------------------------------------
#endif // MSSCRIPT

As observed, there is no TScriptControl::Run member !
Any idea how this might not be generated, since it is unlikely that the
ActiveX lacks the Run method.

DW

 

Re:Microsoft Script Control and BCB


Cydexia,

Do you have a copy of the Control handy that you can email me? We go strictly from the
TypeLibrary information. If a 'Run' method is described there (and it's not flagged hidden
etc. etc) we should be exposing it, otherwise we have a bug.

If you can send me a copy of the OCX/TLB or point me to the binary, I'll investigate. (Or
if you have OleView, load the control and look at the default interface of the CoClass and
see if you spot the 'Run' method).

Thanks,

Bruneau.

Quote
Cydexia wrote:
> I have installed MS Script Control 1.0 ActiveX in BCB1
> neither the pascal or the c++ header mention a Run method that is
> documented in the MS Script Control *psuedo documentation* at
> http://msdn.microsoft.com/scripting/default.htm?/scripting/scriptcont...

> This is the hpp file generated by BCB :

> //----------------------------------------------------------------------------

> // MSSCRIPT.hpp - bcbdcc32 generated hdr (DO NOT EDIT) rev: 0
> // From: MSSCRIPT.pas
> //----------------------------------------------------------------------------

> #ifndef MSSCRIPTHPP
> #define MSSCRIPTHPP
> //----------------------------------------------------------------------------

> #include <Controls.hpp>
> #include <OleCtrls.hpp>
> #include <Graphics.hpp>
> #include <Classes.hpp>
> #include <OleCtl.hpp>
> #include <OLE2.hpp>
> #include <System.hpp>
> namespace Msscript
> {
> //-- type declarations
> -------------------------------------------------------
> class __declspec(delphiclass) TScriptControl;
> class __declspec(pascalimplementation) TScriptControl : public
> Olectrls::TOleControl
> {
>  typedef Olectrls::TOleControl inherited;

> private:
>  Classes::TNotifyEvent FOnError;
>  Classes::TNotifyEvent FOnTimeout;

> protected:
>  virtual void __fastcall InitControlData(void);

> public:
>  void __stdcall _AboutBox(void);
>  void __stdcall AddObject(const System::AnsiString Name, const
> System::Variant &Object_, Word AddMembers
>   );
>  void __stdcall Reset(void);
>  void __stdcall AddCode(const System::AnsiString Code);
>  System::Variant __stdcall Eval(const System::AnsiString Expression);
>  void __stdcall ExecuteStatement(const System::AnsiString Statement);
>  __property System::Variant Modules = {read=GetVariantProp, index=1506};

>  __property System::Variant Error = {read=GetVariantProp, index=1507};
>  __property System::Variant CodeObject = {read=GetVariantProp,
> index=1000};
>  __property System::Variant Procedures = {read=GetVariantProp,
> index=1001};

> __published:
>  __property System::AnsiString Language = {read=GetStringProp,
> write=SetStringProp, stored=false, index=1500
>   , nodefault};
>  __property Olectrls::TOleEnum State = {read=GetOleEnumProp,
> write=SetOleEnumProp, stored=false, index=1501
>   , nodefault};
>  __property int SitehWnd = {read=GetIntegerProp, write=SetIntegerProp,
> stored=false, index=1502, nodefault
>   };
>  __property int Timeout = {read=GetIntegerProp, write=SetIntegerProp,
> stored=false, index=1503, nodefault
>   };
>  __property Word AllowUI = {read=GetOleBoolProp, write=SetOleBoolProp,
> stored=false, index=1504, nodefault
>   };
>  __property Word UseSafeSubset = {read=GetOleBoolProp,
> write=SetOleBoolProp, stored=false, index=1505
>   , nodefault};
>  __property Classes::TNotifyEvent OnError = {read=FOnError,
> write=FOnError};
>  __property Classes::TNotifyEvent OnTimeout = {read=FOnTimeout,
> write=FOnTimeout};
> public:
>  /* TOleControl.Create */ __fastcall virtual
> TScriptControl(Classes::TComponent* AOwner) : Olectrls::
>   TOleControl(AOwner) { }
>  /* TOleControl.Destroy */ __fastcall virtual ~TScriptControl(void) { }

> public:
>  /* TWinControl.CreateParented */ __fastcall TScriptControl(HWND
> ParentWindow) : Olectrls::TOleControl(
>   ParentWindow) { }

> };

> //-- var, const, procedure
> ---------------------------------------------------
> #define Initialized (Byte)(0)
> #define Connected (Byte)(1)
> extern void __fastcall Register(void);

> } /* namespace Msscript */
> #if !defined(NO_IMPLICIT_NAMESPACE_USE)
> using namespace Msscript;
> #endif
> //-- end unit
> ----------------------------------------------------------------
> #endif // MSSCRIPT

> As observed, there is no TScriptControl::Run member !
> Any idea how this might not be generated, since it is unlikely that the
> ActiveX lacks the Run method.

> DW

Other Threads