ATL Dll Fails to register with XP
I created a simple COM object with ATL VS 2008. I can successfully register the dll in my machine and use it.
However, I tried to register the dll with a XP installed machine with no VS 2008 installed. But this does not seem to be work.
Then, I installed the VC 2008 redistributable SP1, and tried. Still the registration is failed.
Then, I did a static build of the dll and tried with the same machine and still with no success.
Can you please help me to figure out what is happening here ?
Thank you
EDIT
I found that ATL dll can be redistributed with following runtime libraries
\VC\redist\x86\Microsoft.VC90.ATL\
atl90.dll, Microsoft.VC90.ATL.manifestAny idea where to put these files in a client machine ?
EDIT
After been tried number of ways, finally I did a static build for both ATL and MFC. Amazingly it worked. But I have not used any of MFC libraries inside ATL dll, Could some开发者_运维百科one please explain, why MFC libraries are needed ?
In the Visual studio tools folder should be a tool called depends.exe
Use it to load your ATL dll on the machine where it is failing, it should tell you if you have any missing dlls.
You might need to make sure you have the correct vc2008 runtime installed, I have 4 on my machine:
- 9.0.21022,
- 9.0.30729,
- 9.0.30929.17,
- 9.0.3.30729.4148.
you can check the .manifest file for which version your dll depends on. and also make sure to ship the .manifest file along with the dll unless you know how not to depend on it.
精彩评论