Solved

Cannot Create Simple 32-Bit COM Component on 64-Bit Windows

Posted on 2014-04-09
2
965 Views
1 Endorsement
Last Modified: 2014-04-10
Hi.  I have an ATL/MFC COM simple object written in Visual C++ 6.0.  This COM object has a single method, Test(), that simply calls the MFC MessageBox() method to display a "hello world" message.

I am trying to use this COM object on 64-bit Windows 7.  I put the file for this COM object, TestLibrary.dll, into the SysWOW64 folder and ran as an administrator the command "regsvr32 C:\Windows\SysWOW64\TestLibrary.dll", which resulted in the following message: "DllRegisterServer in C:\Windows\SysWOW64\TestLibrary.dll succeeded."   When I try to create the COM object, for example in Microsoft Excel, however, I get the following error message: "Run-time error '429': ActiveX component can't create object."  Do you have any ideas as to why I cannot create the COM object on 64-bit Windows?  It works flawlessly on 32-bit Windows.

Thank you.
1
Comment
Question by:deatc
2 Comments
 
LVL 40

Accepted Solution

by:
Jacques Bourgeois (James Burger) earned 300 total points
ID: 39990389
If you are using the 64-bit version of Excel, you will have problems communicating with many 32-bit dlls. This is why Office usually installs the 32-bit version by default, even on 64-bit computer.

This is not a problem with Office, this is a normal problem with 64 bit applications, that use values that are too big for 32-bit dlls and applications.
0
 
LVL 86

Assisted Solution

by:jkr
jkr earned 200 total points
ID: 39990477
There is a little caveat with 'regsvr32.exe' on Win64 - the you need to specify the FULL path when calling it to register 32bit DLLs, i.e.

C:\Windows\SysWOW64\regsvr32.exe C:\Windows\SysWOW64\TestLibrary.dll

Open in new window


BTW, 'C:\Windows\SysWOW64\regsvr32.exe' might not be the accurate full path to that executable, this is a 32 bit laptop 'm posting from and I can't verify this therefore, but  am sure you'll find out the right one :o)
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now