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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T05:09:37+00:00 2026-06-17T05:09:37+00:00

Is it possible to create two different plugins in the same dll, one for

  • 0

Is it possible to create two different plugins in the same dll, one for communication and the other as a canvas?

I know that i can do it in the same class but I want the first to be windowless (I need only one per browser) and the other one is windowed (I may create up to 4 of them in the same browser).

I want to be able to select between them, some thing like this.

<object id="plugin0" type="application/x-communication" width="0" height="0">
<param name="onload1" value="pluginLoaded" />

<object id="plugin1" type="application/x-canvas" width="320" height="240">
<param name="onload2" value="pluginLoaded" />

Can I create the canvas object dynamically from the communication object using FB::DOM and get the JSAPIAUTO pointer to pass the binary data between them directly?

NpAPI does not support byte array and I tried to use base64 string but it is very slow.

  • 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-06-17T05:09:38+00:00Added an answer on June 17, 2026 at 5:09 am

    Yes you can have a single DLL with multiple “plugins”. Actually it is just one plugin, but it can handle multiple mimetypes. If you look at the FBTestPlugin example you’ll see that it actually handles three different mimetypes. Those plugins can optionally share the same JSAPI interface, but they all are in the same memory space so you can (carefully!) use globals to share information.

    Assuming your “canvas” object is an instance of your own plugin you could use some sort of identifier and a global map to pass a value to the other plugin instance to tell it which block of memory to use, etc. You can’t pass a JSAPI object from one to the other through javascript and get the raw C++ object back (at least not in all cases) but you can pass identifiers around that let you find the things you’re looking for.

    You can find the notes on how to do multiple mimetype support in the firebreath repo in the FBTestPlugin project. I’ll post them here as well, though it’s possible some of these details may change later.


    Modified original FBTestPlugin as follows to support multiple mimetypes
    in a single codebase:

    1. Edit PluginConfig.cmake, add multiple entries for the following
      entries: FBSTRING_MIMEType, ACTIVEX_PROGID, FBControl_GUID, and
      FBSTRING_PluginDescription. Make sure that you provide unique values for
      all entries, including the GUIDs in FBControl_GUID.

    2. Edit Factory.cpp, modify PluginFactory::createPlugin() and add code
      to check mimetype and create the appropriate object. Also add
      “mimetype” as a parameter to
      “boost::make_shared(mimetype)”. The new code can construct
      the “standard” FBTestPlugin plugin, or a new “SimpleMath” plugin from
      either the FBTestPlugin or FBTestMathPlugin C++ objects.

    3. In FBTestPlugin.h, modify the FBTestPlugin constructor to take
      “const std::string& mimetype” as an argument. Add “std::string
      m_mimetype;” as a private variable to FBTestPlugin.

    4. In FBTestPlugin.cpp, modify the FBTestPlugin constructor to take
      “const std::string& mimetype” as an argument and to set m_mimetype from
      the mimetype parameter. Modify createJSAPI() to return
      “boost::make_shared(m_host)”
      instead of
      “boost::make_shared(FB::ptr_cast(shared_from_this()), m_host)”
      depending on the mimetype. Include “SimpleMath.h”.
      Modify the plugin text in the drawing code depending on the mimetype for visual feedback to user.

    5. Modify SimpleMathAPI.h and SimpleMathAPI.cpp to add “self” property
      and “GetSelf()” method, both of which return shared_from_this().

    6. Copy FBTestPlugin.* to FBTestMathPlugin.* and change object name.
      Simplify FBTestMathPlugin by removing the LeakFinder. Modify
      createJSAPI() to return only the SimpleMathAPI object. Modify the
      plugin text in the drawing code for visual feedback to user.

    7. Modified test code in test.html to test multiple mimetypes. Create
      three plugins, and test math functions using all three.

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

Sidebar

Related Questions

Is it possible to create one model that stands for two different objects? for
Is it possible to create two icons (that link to different functionality) for a
Is it possible to create two indexes with names different on the same column?
I would like to know if its possible to create two triggers, one on
Is it possible to create a view from tables from two different databases? Like:
I need to create one installer which will install components on two different machines.
I have an application that can display items in two different ways, in rows
Is it possible to use two different databases for the same project in Ruby
I want to create a shared library which can be loaded in two different
Is it possible to create a factory or proxy that can decide if thread

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.