Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4002244
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T08:00:11+00:00 2026-05-20T08:00:11+00:00

I am working with an ActiveX control in Internet Explorer 8 that is to

  • 0

I am working with an ActiveX control in Internet Explorer 8 that is to display a save file dialog which let’s the user choose a file name and file type (jpg, gif, etc). These values get passed to code and then are used in a different method to save the file. Unfortunately the method that invokes the dialog has no return value, and the file name and file type are passed in as out parameters.

The signature of the method (expressed in Visual Basic) looks like this:

Public Sub SaveFileDialog( _
   ByVal bstrDialogType As Variant, _
   ByRef pbstrFileName As String, _
   ByRef out_pvType As Long _
)

The two ByRef parameters are the out parameters.

I have written the following JavaScript code:

try
{
    var saveFileName, saveFileType; // out variables
    gxVideoPlayBack.SaveFileDialog("image", saveFileName, saveFileType);
    alert(saveFileName); // displays "undefined"
    alert(saveFileType); // displays "undefined"
}
catch(error)
{
    if(!error.number === -2147221484) // User clicked cancel.
    {  
        alert(error.message);
    }
}

The code works in that the ActiveX control produces its dialog, and I can handle error conditions, but I can’t seem to figure out how to capture the values of the out parameters.

In the code gxVideoPlayBack is a reference to the ActiveX control embedded in the DOM via an HTML element.

If JavaScript will not work for this, can it be done in VBScript?

As an alternative I can just implement my own dialog, but would rather use the one provided.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T08:00:11+00:00Added an answer on May 20, 2026 at 8:00 am

    Edit: It seems that it’s not possible to have “out” parameters in JavaScript/JScript.

    Original:
    Perhaps the approach described in this article will work:

    var saveFileName={}, saveFileType={}; // Empty "output" objects.
    gxVideoPlayBack.SaveFileDialog("image", saveFileName, saveFileType);
    alert(saveFileName.value); // The "value" attribute is assigned ...
    alert(saveFileType.value); // ... by the "SaveFileDialog" method?
    

    I suppose the idea is that the WSH wrapper for this native call will attempt to assign the “value” property of the given output parameters, so you can either override the value setter or just give it an object with a built-in value setter.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have Installed ActiveX control on windows vista.. using Internet Explorer and cab file..
I'm working with an ActiveX control placed on a winform. I'd when the user
I have written an ActiveX control in C# and have made it working using
We are working on using a 3rd party's ActiveX control within a web page.
I'm working on a new product that uses an Active-X control that requires the
We are hosting the ActiveX control in a WinForms application to embed flash. Is
I'm try develop an ActiveX Control in VB6. It have one UserControl and one
I am trying to wrap up a TFrame descendant as an ActiveX control, but
I have an ASP.NET 3.5 application where I am using an ActiveX control. When
I am trying to make an Outlook 2003 add-in using Visual Studio 2008 on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.