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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T22:26:54+00:00 2026-05-17T22:26:54+00:00

This is a variation on another Q of mine. I have two applications, X

  • 0

This is a variation on another Q of mine. I have two applications, X and Y. They have to share a single COM object between them. X will be sending data to this object and Y will respond on events sent from this application. At any moment, X or Y might be terminated, yet the singleton needs to stay alive until both applications are terminated.
It should be possible to create a singleton COM object this way, but what if X starts first and creates it, Y then starts and uses it, then X stops and… What happens to the singleton?
Anyways, has anyone ever tried this with Delphi?

  • 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-17T22:26:54+00:00Added an answer on May 17, 2026 at 10:26 pm

    I think you’re missing a core point of COM. COM is just a step op from general IPC, by which I mean, a COM process lives in only one process (or thread even, but that’s where the apartment story comes in). If you access one COM object from two processes, one process is actually marshalling the calls from and to the object into ‘flat data’ and posting messages to a hidden window handle to the other process.

    To be able to do what you describe you would have to worry what to do with an object when the ‘owning process’ want to shut down, and has to ‘suspend’ the object (e.g. by serializing) and ask one of the other processes to ‘resume’ the object and assume ownership and start running the object.

    I would suggest you create a third process, specifically to only run this singleton object you want to use in the other processes. This way you could let normal reference counting and COM activation do its job, and you would be using COM just the way it was supposed to work.

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

Sidebar

Related Questions

This is a slightly original variation on a common problem. I have a fairly
A typical EF+MVC system will have two or three levels of validation: For ViewModel:
I have this getResult() with slight variation in Input parameter. one Mapvalue as string
I have a variation of the benefits-of-async/await-on-ASP.NET from this question . My understanding is
I have a list of this object: public class Customer { public int Id
I would like to create two letters for a single person. One letter will
All find and execute examples are a variation of this (with /bin/rm ) :
I have this validation validates :contact_id, :presence => true, :uniqueness => {:message => 'has
Please have a look at this validation array in my cakephp app for model
I'm a student and I have a lot of free time on this vacation

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.