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

  • SEARCH
  • Home
  • 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 7490575
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T15:40:46+00:00 2026-05-29T15:40:46+00:00

i have an ActiveX. ActiveX means: Internet Explorer native binary code running from a

  • 0

i have an ActiveX.

ActiveX means:

  • Internet Explorer
  • native binary code
  • running from a dll (.ocx)
  • in Protected Mode

The user would like to save some content. i would like to show a Save As dialog, then save to the location they said.

Since the process hosting my ActiveX is running at a Low integrity level, the code cannot save to the user’s requested location.

Since the process hosting my ActiveX is running in Internet Explorer’s Protected mode, the code cannot save to the user’s requested location.

Instead the files are silently saved to a location that the user did not request.

Instead the files are silently saved to a location where the end-user is not able to find them.

Is there any suggestions of how to handle this?

Bonus Chatter

What is the user trying to save to their hard drive? It doesn’t matter to the question. But pretend:

  • it’s a few hundred megabyte 3D cad mesh
  • it’s a GIS imagery dump
  • it’s a PDF
  • it’s a PNG
  • it’s a text file

Additional Reading

Internet Explorer’s protected mode api does allow addins to show a savedialog:

IEShowSaveFileDialog(this.Handle, "Eden.3ds", 
      GetUserDocumentsFolder(), null, 
      "3D Studio File|*.3ds|GIS Imagery|*.kvm|Adobe Acrobat File|*.pdf|All Files|*.*|"
      null, 0, 
      OFN_ENABLESIZING | OFN_PATHMUSTEXIST,
      ref destinationPath, ref stateCookie);

and then save the file using that cookie that save provided:

IESaveFile(stateCookie, sourcefilename);

Where sourcefilename is going to be a file that i managed to save somewhere (which is another question).

Bonus Reading

Understanding and Working in Protected Mode Internet Explorer

Saving Files to the User Profile

Some extensions need to save files to a particular location so that users or applications can later find the files. The following steps show how to save a file outside of a low integrity location:

Create a temporary version of the file in %userprofile%\AppData\LocalLow. Remember to delete the temporary file after the file is sucessfully saved.

Call IEShowSaveFileDialog with the location of the user’s profile folder to prompt the user to save the file in a different location. If the user accepts the Save As dialog, IEShowSaveFileDialog returns the chosen destination folder.

Call IESaveFile with the location of the temporary file saved in Step 1.

When you do this, Protected Mode’s user broker copies the file from the temporary location to the location selected by the user.

  • 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-29T15:40:47+00:00Added an answer on May 29, 2026 at 3:40 pm

    The Internet Explorer Protected Mode API is how an ActiveX can save a file outside the low privelage areas:

    1. Save your file to the FOLDERID_LocalAppDataLow folder; where processes running at Low integrity level in IE are allowed to write:

      String sourceFile = SHGetKnownFolderPath(FOLDERID_LocalAppDataLow)+"\tempcopy.dat";
      SaveToFile(sourceFile);
      
    2. Show the user a save dialog using IEShowSaveFileDialog:

      int stateCookie = 0;
      
      IEShowSaveFileDialog(this.Handle, //hwnd
            "FemaleMesh.3ds", //suggested filename
            SHGetKnownFolder(FOLDERID_Desktop), //suggested save location
            "3D Studio Mesh|*.3ds|All Files|*.*", //save filer
            "3ds", //default extension
            1, //default one-based filter index
            ref destinationFile, 
            ref stateCookie);
      
    3. Instruct IE to move our temporary file to the location the user selected using IESaveFile:

      IESaveFile(stateCookie, sourceFile);
      

    So i was right that IE Protected Mode API was the API to use. i just had to translate all the API headers, figure out the imports, write the code, debug it, test it, before i could figure out that it is the correct API to use.

    Note: You can save yourself some work by checking if IE is running in protected mode first, by calling IEIsProtectedModeProcess:

    Boolean isProtectedMode = IEIsProtectedModeProcess();
    

    Bonus Chatter

    The IE protected mode API functions do not work from outside Internet Explorer.

    Note: Any code is released into the public domain. No attribution required.

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

Sidebar

Related Questions

I have an ActiveX control that I'm loading with JavaScript in Internet Explorer. It
I have an ActiveX control written in C++ that runs in Internet Explorer 8.
I have an ActiveX/COM DLL. It contains many methods and properties. I would like
I have an ActiveX control (an OCX file) which raises an event. I want
I have a Win32 application that includes an EXE, an ActiveX control (DLL) and
Using Rails 3.1.0, with Active Scaffold (from the git repo). My controllers have code
I have an ActiveX control written using the MS ATL library and I am
I have an ActiveX plugin that we need (if possible) to run in Firefox.
I have an ActiveX control that runs on a website, where the old version
I have an activeX control and i need to work with it in web

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.