Welcome to MSDN Blogs Sign in | Join | Help

x86 COM Interop in x64 Environment.

I encountered a problem with one of my application. It stops working when I executed it on Windows 2003 Server 64-bit. It threw an exception:

Retrieving the COM class factory for component with CLSID {GUID HERE} failed due to the following error: 80040154.

The COM interop is an x86 interop, and that causes the exception. To address this issue, I have to recompile the app and change the target platform from AnyCPU to x86. After that, it works great.

Published Thursday, April 12, 2007 6:44 PM by HelloWorld

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# re: x86 COM Interop in x64 Environment.

Hi,I got same problem like u.My Com interop is written by C++ and many c# projects reference this assembly.So I changed the target platform from AnyCPU to x86 for all the c# projects.Other problem comes,my applicatin nearly cannot run.Should all the project use the change.For example,res1 is a com assembly,and res2 reference res1 and another one res3,shoule I also change the res3 project to x86?Thanks!Any help,pls send me a mail to malio_82@126.com.

Thursday, April 19, 2007 3:07 AM by Malio

# re: x86 COM Interop in x64 Environment.

Malio,

I do not have time to investigate, but my understanding is that your app has to be 32-bit, or your COM server is recompiled as 64-bit.  Again, I have not investigate this yet.

Good luck!

Thursday, April 19, 2007 1:19 PM by HelloWorld

Leave a Comment

(required) 
required 
(required) 

  
Enter Code Here: Required
 
Page view tracker