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 3698322
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T04:58:02+00:00 2026-05-19T04:58:02+00:00

I have an ActiveX control generated by the FireBreath framework (http://firebreath.org). I need to

  • 0

I have an ActiveX control generated by the FireBreath framework (http://firebreath.org). I need to get a reference to the <object> tag in the page that hosts the plugin from C++.

If I were using NPAPI, I would use the NPNVPluginElementNPObject constant with NPN_GetValue.

so to make sure I am being clear, say I have the following in the page:

<object id=”testPlugin” type=”application/x-someplugin” width=”100%” height=”100%”></object>

I want to get a reference to the plugin like I would if I used document.getElementById(“testPlugin”), except from within the C++ code of the activex control that is inserted for that mimetype.

Please note that passing the id in as a <param> is not a good option for me, but if there is a way to get the ID from inside the activex control that may work.

edit: I am considering using getElementsByTagName and trying to find it through the DOM, but it would be difficult to tell the difference between two instances of the same plugin.

  • 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-19T04:58:03+00:00Added an answer on May 19, 2026 at 4:58 am

    Thanks to FireBreath contributor jtojanen from Finland, we finally have a solution.

    The first thing is that the COM object must be registered as “Apartment”, not “Single” (in the registry). Otherwise, this will not work; seems to be a bug in COM.

    Then anywhere after SetClientSite is called, you can do the following:

    CComQIPtr<IOleControlSite> site(m_spClientSite);
    CComPtr<IDispatch> dispatch;
    site->GetExtendedControl(&dispatch);
    CComQIPtr<IHTMLElement2> htmlElement = dispatch;
    

    Hope this saves someone some time; it’s taken me almost 2 years to find someone who could answer this for me.

    The object in htmlElement will be the <object> tag that wraps your plugin; so if you queryInterface for any of your interfaces, it should succeed, but it may not actually literally be your object, it will likely be a wrapper to your object.

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

Sidebar

Related Questions

We have a windows application that contains an ActiveX WebBrowser control. As part of
I have an ActiveX plugin that we need (if possible) to run in Firefox.
I have an ActiveX control written using the MS ATL library and I am
Ok, so here is the scenario: I have an activeX that uploads files using
I have created an ActiveX control using C++. I use Visual Basic code to
We are working on using a 3rd party's ActiveX control within a web page.
I have a third-party ActiveX dll, and I'd like to register it programmatically at
Is there a way to determine the number of users that have active sessions
I have this code to connect to Active Directory and get all the groups
I've written an ActiveX control using ATL. I used the wizard to add support

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.