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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T12:10:19+00:00 2026-05-30T12:10:19+00:00

I am writing an application based on a COM object from a third party

  • 0

I am writing an application based on a COM object from a third party (no source), included in my application references. The COM object creates a mirror of certain accounting data so it can be read in another format (Proprietary format->MSSQL). The application is a wrapper for the COM object to allow for interaction within; the COM object itself routinely checks the proprietary files to see if they’ve been updated, then copies them if they have.

We have many clients, each with their own account for the proprietary format. We’re in the middle of converting from a previous application, and once it’s done we will have ~50 clients running this way. I already have an application that works for only one client, and I don’t think it would be conducive to have 50 copies of the application running constantly, especially when the COM seems to have a slow memory leak (argh). As such, the program I’m trying to write will take various clients grouped in one manner or another and run the COM for each in the background, while foreground allows for additional interaction and, if need be, restarting the COM object.

At first I tried to use Threads/BackgroundWorker, and that seemed to work alright, but after some finagling it turns out that, despite the COM object being declared New on each class created for a client, all clients are sharing the same COM instance, so only the latest-loaded client will ever do anything.

While it could certainly be that I’m just doing it wrong (if I could be, please say so! I’ll post my code if it would be helpful), it seems that I need to have a way to load a separate instance of the .DLL for each client in the program; sadly, this is a higher level than where I’m at. I’ve been reading into Application Domains and Reflection, but from what little I’ve been able to find out it doesn’t seem that I can easily call methods and may not be able to use Events (which I rely on to update information in the application.)

tl;dr: What is the best way to load separate instances of a DLL such that I can manipulate the information and listen to events from the COM object?

  • 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-30T12:10:21+00:00Added an answer on May 30, 2026 at 12:10 pm

    I would suggest loading into the separate AppDomains. This would give you a pretty good level of isolation and reliability over the entire system. Most important point – handling of the failures, using AppDomains you would be able unloading any particular AppDomain in case of unhandled error. Otherwise issue in one component (DLL) potentially could crash entire system with multiple components loaded into separate threads/assemblies.

    Useful Links:

    • The Benefits of Isolating Applications
    • Application Domains and Threads
    • Thread.GetDomain Method
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I am writing an application using ajax getting from a xml based api.
BACKGROUND I am writing a screen capture application My code is based derived from
I'm writing a statistics based application off a SQLite database. There is a table
I am writing a GUI based application where I read a string of values
I'm writing a web based application that will have its own authorization/authentication mechanism (traditional
If we are writing about power-wise option - is using a console-based application in
Does anyone have any guidance or recommendations for writing a MIDI-based application in C#
I am writing an application based on wxWidgets library. I had some classes which
I am writing a web based application using Ruby on Rails. In one of
I'm writing an updater for an msaccess based application that has several linked .accdb

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.