64Bit-Unable to Register COM dll using regsvr32.exe on WinXP64 bit and AMD64bit machine

Hi,
Im executing the following command:
c:\regsvr32 mydll.dll.

Following error occurs:
"mydll.dll was loaded, but the DllRegisterServer entry point was not found. This file cannot be registered."

NOTE:
1. mydll.dll is a 64bit ATL COM dll built using Visual C++ 2005.
2. this error occurs both with debug and release version of mydll.dll

Any pointers to successfully register my ATL COM dll would of much help.
Thanks in advance.

-shailesh.d.g

[492 byte] By [shailesh.d.g] at [2007-12-16]
# 1
I think the DLL is missing the "DllRegisterServer" entry-point...
Please look with depends.exe (http://www.dependencywalker.com/) into the DLL if the entry-point is available!

Greetings
Jochen

JochenKalmbach at 2007-9-8 > top of Msdn Tech,Visual C++,Visual C++ General...
# 2
Hi Jochen,
The DLL has the 'DllRegisterServer' entry point. Actually I got the solution for this problem. In Visual Studio 2005, the VC++ compiler doesnot add the .def file name in the project settings by default. On giving a name of the .def file in the project settings, the DLL exports the 'DllRegsiterServer' entry point to the outside world.

Regards,
shailesh.d.gBig Smile

shailesh.d.g at 2007-9-8 > top of Msdn Tech,Visual C++,Visual C++ General...
# 3
A 32-bit process cannot load a 64-bit DLL. Look for a regsvr64 (just a guess) to register a 64-bit COM DLL.
CarlDaniel at 2007-9-8 > top of Msdn Tech,Visual C++,Visual C++ General...
# 4
Hi shailesh.d.g,

I think I'm having the same problem as you. Can you explain in more detail how did you solve the problem? I think my .def file is actually included in the project.

I read in somewhere that DLL's that have been created in .NET cannot be registered using regsvr32. Does anyone know how to do that?

Thanks!

Jing

Jing at 2007-9-8 > top of Msdn Tech,Visual C++,Visual C++ General...
# 5
Hi Carl!

The names for the EXEs are still the same. So regsvr32.exe is the right exe. There is only a difference in the directory:
x64-EXEs are stored in: \Windows\system32
x86-EXEs are stored in: \Windows\syswow64

(confusing, isn′t it?)

Greetings
Jochen

JochenKalmbach at 2007-9-8 > top of Msdn Tech,Visual C++,Visual C++ General...
# 6

Hi all,

I got the same problem but can't solve it.

First my application was developed for win32 (but build on win64) and all was ok.

Now we are migrating the application to win64. All is still ok, but an OCX is not registered, since it is now build for the x64 platform (VS 2005)

I tried to register it with both the versions of regsvr32.exe, I verified that the .def file is added in the "Module Definition File" property, but I still cannot use the control I developed. I get a message saying that the control is not registered :^\

Has anybody an idea?

Thank you.

[EDIT] Problem solved. I don't know why, but after several launches of the software, the control is now activated O_o.

I cannot explain why it did not work the previous times...

Gwennael at 2007-9-8 > top of Msdn Tech,Visual C++,Visual C++ General...