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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T22:30:45+00:00 2026-06-06T22:30:45+00:00

Is it possible to create the single instance of COM object, and be sure

  • 0

Is it possible to create the single instance of COM object, and be sure all subsequent calls from any client will be made to this single instance only?

  • 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-06T22:30:46+00:00Added an answer on June 6, 2026 at 10:30 pm

    Note that you will have to to make your COM object run Out-of-process (exposed by an EXE).

    Do you really need the very same COM object used everywhere? Or do just want to control the same underlying resources from a single control point?

    COM doesn’t support the Singleton pattern directly, but it doesn’t stricktly forbid it either. It’s just that there is no registry setting that says “always serve the same object”. In fact, the standard COM instantiation mechanism requires that a truly new object be returned each time you call it (this mechanism is what new operators and CreateInstance() use internally) . That means that to make a proper COM singleton, you cannot let your clients create it themselves. This can all be done, but it’s tricky and rarely necessary.

    Your best bet – funny enough – is to NOT have a COM Singleton at all. Let the client create as many different objects as it wants. Instead of a single COM object, allow multiple COM objects but make those objects “shims” which communicate with a single – internal – object implementation. Don’t expose the internal singleton implementation directly as a COM object at all. You will avoid a lot of headaches.

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

Sidebar

Related Questions

Possible Duplicates: What is the correct way to create a single instance application? What
Possible Duplicates: What is the correct way to create a single instance application? Prevent
Possible Duplicate: What is the correct way to create a single instance application? How
Possible Duplicate: What is the correct way to create a single instance application? How
Does anyone know if it is possible to create a single connection string that
Using PDF, is it possible to create a single form element with multiple fields
Is it possible to create multiple layer masks over a single layer using Actionscript3?
Hi it'd like to know if it's at all possible create a parametric equalizer
Possible Duplicate: Create an alert on any view controller after Facebook request:didFailWithError: I have
Is it possible to create an extension method that returns the instance that is

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.