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

  • Home
  • SEARCH
  • 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 1073451
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T20:59:38+00:00 2026-05-16T20:59:38+00:00

Current configuration is: The main application is unmanaged. It contains DLL, containing TLB, which

  • 0

Current configuration is:

  1. The main application is unmanaged.
  2. It contains DLL, containing TLB, which describes functions, exposed to COM model.
  3. To support ASMX web services, it loads .NET framework, and starts ASP.NET domain that serves web service calls.
  4. To serve web service calls, it needs data from the main application. So, we’re
    generating Interop assembly from TLB (using tlbimp.exe), and web service assemblies use this Interop to communicate with COM objects in the main application.

Everything works ok until we’ve encountered problem with versions. When 2 versions of application (containing 2 versions of TLB) were installed on the same computer, both versions of TLB (for example, 2.0 and 2.1) are registered, and lower version stops to work. ProcessMonitor shows that, when trying to call web service of version 2.0 instance, it looks into registry for TLB’s GUID, reads all sub-keys with version numbers, takes the last version (2.1) and starts reading its contents. After that, it reads DLL of version 2.1, and fails to make COM calls inside its own process – as far as I understand, due to problems in marshaling.

How can I make the Interop that would not require presence of TLB (at least, presence of registered TLB) to make in-process COM calls?

Thanks in advance.

  • 1 1 Answer
  • 1 View
  • 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-16T20:59:39+00:00Added an answer on May 16, 2026 at 8:59 pm

    Well, here’s the way the problem was solved.

    .NET seems to load TLB to build new apartment for each ASP.NET thread (everything happens when new thread first time tries to access some COM interface). It seems to use CoMarshalInterThreadInterfaceInStream and CoGetInterfaceAndReleaseStream functions for this purpose. I’m not able to prove that, but calling these functions causes the same effect: querying system registry and loading TLB of the highest compatible version (the same major version, highest minor version). CoGetInterfaceAndReleaseStream behavior isn’t affected by manifest.

    So, the real problem is that our project does not follow rules Microsoft recommends for version numbering: COM interfaces having the same major version should be compatible.

    The only solution found was splicing: to get address of LoadTypeLib function (OleAut32.dll), and set JMP instruction in its beginning. JMP goes to our implementation, that checks name of TLB being loaded, and if it’s one of known TLBs – redirects reading to local directory.

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

Sidebar

Related Questions

Current Application Server Configuration: IIS 6.0 Windows 2003 Server Standard Edition SP2 .NET Framework
I have one main class main, which I use to store the configuration and
I recently switched to upstream for my git push configuration (meaning only the current
I am building a logging DLL that will simplify EntLib 5 Logging Application Block.
I have an application that is driven by a configuration XML: various app properties
I'm building an application with a self-contained HTTP server which can be either accessed
This is my current project structure: pom.xml /src /main /resources hibernate.cfg.xml /META-INF persistence.xml I
Environment: Let's say I have a main application that: Listen for requests for tasks
I've created a WPF application and obfuscated the main .exe with an external tool.
Is there a macro I can use for checking the current configuration type in

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.