Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

Is JScript supported on 64 bits?

When I try to use JScript in 64 bit, the following error is shown:

"ActiveX languages are not supported on X64 platform"

Is JScript supported in 64 bits?
Is planned to support this language?
What langs are supported in 64 bits?


Comments

  • 4 Comments sorted by Votes Date Added
  • > "ActiveX languages are not supported on X64 platform"

    Thats true. No support of ActiveX languages for 64 bit platform. And it's not planned.
    Native languages, on the other hand, support 64 bit.
  • Hello, 

    I have modify the LMD code in order to allow ActiveX languages in 64 bits. I have tested with JScript with the basic funcions (runtime and error management).

    The modification needed are:

    LMDSctMScriptTLB

    - Modify the GUIDs of the ActiveScript interface. Those interface has a diferent GUID in 64 bits

      (* JPG *)
      {$IFDEF WIN64}
      IID_IActiveScriptParseProcedure: TGUID = '{C64713B6-E029-4CC5-9200-438B72890B6A}';
      IID_IActiveScriptParseProcedureOld: TGUID = '{21F57128-08C9-4638-BA12-22D15D88DC5C}';
      IID_IActiveScriptParse: TGUID = '{C7EF7658-E1EE-480E-97EA-D52CB4D76D17}';
      {$ELSE}
      IID_IActiveScriptParseProcedure: TGUID = '{AA5B6A80-B834-11D0-932F-00A0C90DCAA9}';
      IID_IActiveScriptParseProcedureOld: TGUID = '{1CFF0050-6FDD-11D0-9328-00A0C90DCAA9}';
      IID_IActiveScriptParse: TGUID = '{BB1A2AE2-A4F9-11CF-8F20-00805F2CD064}';
      {$ENDIF}
      
    - Remove definition of tagEXCEPINFO and EXCEPINFO. These types are already declared in Winapi.ActiveX. 

    - Modify prototype of IActiveScriptSite.GetItemInfo. In 64 bits, I don't know why, does not with a IUnknown parameter: 

      {$IFDEF WIN64}
        procedure GetItemInfo(pstrName: PWideChar;
                              dwReturnMask: LongWord;
                              out ppiunkItem: Pointer;
                              out ppti: Pointer); safecall;
      {$ELSE}
        procedure GetItemInfo(pstrName: PWideChar;
                              dwReturnMask: LongWord;
                              out ppiunkItem: IUnknown;
                              out ppti: IUnknown); safecall;
      {$ENDIF}
      
    - Modify GUIDs in the IActiveScriptParseProcedure, IActiveScriptParseProcedureOld and IActiveScriptParse definitions:

      IActiveScriptParseProcedure = interface(IUnknown)
        {$IFDEF WIN64}
        ['{C64713B6-E029-4CC5-9200-438B72890B6A}']
        {$ELSE}
        ['{AA5B6A80-B834-11D0-932F-00A0C90DCAA9}']
        {$ENDIF}

      IActiveScriptParseProcedureOld = interface(IUnknown)
        {$IFDEF WIN64}
        ['{21F57128-08C9-4638-BA12-22D15D88DC5C}']
        {$ELSE}
        ['{1CFF0050-6FDD-11D0-9328-00A0C90DCAA9}']
        {$ENDIF}
        
      IActiveScriptParse = interface(IUnknown)
        {$IFDEF WIN64}
        ['{C7EF7658-E1EE-480E-97EA-D52CB4D76D17}']
        {$ELSE}
        ['{BB1A2AE2-A4F9-11CF-8F20-00805F2CD064}']
        {$ENDIF}
        
    LMDSctScripter.pas

    - Modify implementation of TAXSite according with the new "GetItemInfo" definition:

        (* JPG *)
    {$IFDEF LMDX64}
        procedure GetItemInfo(pstrName: PWideChar;
                              dwReturnMask: LongWord;
                              out ppiunkItem: Pointer;
                              out ppti: Pointer); safecall;
    {$ELSE}
        procedure GetItemInfo(pstrName: PWideChar;
                              dwReturnMask: LongWord;
                              out ppiunkItem: IUnknown;
                              out ppti: IUnknown); safecall;
    {$ENDIF}
    ....
    {$IFDEF LMDX64}
    procedure TAXSite.GetItemInfo(pstrName: PWideChar;
                                 dwReturnMask: LongWord;
                                 out ppiunkItem: Pointer;
                                 out ppti: Pointer); safecall;
    {$ELSE}
    procedure TAXSite.GetItemInfo(pstrName: PWideChar;
                                  dwReturnMask: LongWord;
                                  out ppiunkItem: IUnknown;
                                  out ppti: IUnknown);
    {$ENDIF}
    var
      uppnm:  WideString;
      item:   TNamedItem;
      Result: HRESULT;
    ....

    - Remove validation to abort if user tries to use ActiveX langs in 64 bits:

    procedure TLMDScriptControl.SetLanguage(const Value: TLMDScriptLanguage);
    begin
      CheckState([ssInactive]);

      {$IFDEF LMDX64}
      (*
      if LMDScriptLangKinds[Value] = slkActiveX then
        raise ELMDScriptControl.Create('ActiveX languages are not supported ' +
                                       'on X64 platform');
      *)
      {$ENDIF}
      
    Attached to this issue you can find the modified files. 

    Is it possible to add this change to the version? I think it good for all !!
    zip
    zip
    Changes.zip
    41K
  • Thanks for your work, we will consider this. Did you checked debugging features?
  • Not yet. I'm only checked it with Delphi's pIDE demo, and that demo does not include debugger. Now, I'm trying to check it with C++ project (it is my priority because all my developments are in C++) but I can not compile the C++ source code (I have oponed a new discussion about this).

    Once I can finish the C++ compilation I would like to check the debugger.
Sign In or Register to comment.