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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T13:51:41+00:00 2026-06-01T13:51:41+00:00

I am working on Windows client application using c#, have two projects in my

  • 0

I am working on Windows client application using c#, have two projects in my VS 2010 solution, the start-up project and a class library which uses third party COM interop DLL.My desktop is 64 bit and all the client machines are 64 bit as well.

If I keep the start-up project as any cpu in (build settings) and x86 for the second project which invokes the COM DLL, I am getting the following error:

Could not load file or assembly ... or one of its dependencies. An attempt was made load a program with an incorrect format.

If I keep both the projects as Any cpu, I am getting the following error:

Retrieving the COM class factory for component with CLSID .. failed due to the following error:

Any idea how to resolve the issue without converting the solution (all projects) to x86.

  • 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-01T13:51:43+00:00Added an answer on June 1, 2026 at 1:51 pm

    Well, I suggest you to look at DLL surrogates. This trick will definitely solve your problem, but only as long as you may change the registration info of the DLL inrpoc server in the registry.
    If the class is configured to use a surrogate, it will run in a separate process. COM allows one to use an out-of-proc 32bit COM server from a 64bit application.

    All you need to change is shown below:

    Look at the following entry in the registry:

    HKCR\CLSID\{CLSID_CoClass}
    

    And look if it has the AppID field. If it does, just visit this registry key:

    HKLM\Software\Classes\AppID\{APPID}
    

    and add the DllSurrogate string key with no value.

    If the class doesn’t have an assosiated AppID, you may create it yourself. Then you may use your 32 -bit inproc library from the 64bit targeted .net application.

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

Sidebar

Related Questions

I'm working with a windows form application in C#. I'm using a socket client
I'm working with a windows form application in C#. I'm using a socket client
I am working on Windows Server 2003 (IIS6), which has two asp.net sites running
I'm using .NET 3.5 and WCF for developing a server-client application. Binding=BasicHttp. I'm working
I've been creating a an application with C# using W2k8+IIS7/SQLExpress 2008/Web Service/Windows Client. I'll
I'm working on Windows phone client for one service with Oauth1 API. In API
I have modified a working Windows service that had always been starting beforehand. After
I m working on windows form application. I need to show amount in words
I am working with Windows Forms, is it possible to create a window which
I have hosted my WCF windows service on WINDOWS 7 OS and have client

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.