Solved

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

Posted on 2014-04-09
2
985 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

773 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