Having problems registering and using a 64-bit C++ written ATL dynamic library

Viewed 506

I am having issues registering and using a dynamic library under Windows 7 x64, the 64-bit version of dll compiles but the compiler log outputs:

Error MSB3073: The command "RegSvr32 /S "...\x64\Debug\xxxxx.dll" exited with code 3.

But, when I build 32-bit version of the dll, compiler log outputs the RegSvr32 command was successful.

I already set the Linker >> General >> Register Output to No in both x86 and x64 build configurations.

I tried running 64-bit and 32-bit version of RegSvr32 (without silent mode) with 64-bit dll, but it responds with the following error:

The module "xxxxx.dll" failed to load. Make sure the binary is stored at the specified path or debug it to check for problems with the binary or dependent .DLL files. The specified module could not be found.

I checked it using dependency walker and it reported more than 100 dlls are missing so, I cannot show them here. Some of them are:

API-MS-WIN-CORE-COM-L1-1-1.DLL
API-MS-WIN-CORE-DATETIME-L1-1-1.DLL
API-MS-WIN-CORE-DEBUG-L1-1-1.DLL
API-MS-WIN-CORE-ERRORHANDLING-L1-1-1.DLL
API-MS-WIN-CORE-FILE-L1-2-1.DLL
...
WLANUTIL.DLL
WLDAP32.DLL
WTSAPI32.DLL
XMLLITE.DLL

Dependency Walker with opened dll:

Dependency Walker with opened dll

I am wondering what the reason for only 64-bit version of dll cannot register using RegSvr32.

Any help is greatly appreciated to resolve this issue.

UPDATE 1

Trying to running the application with this dynamic library results in the following error (both 32-bit and 64-bit versions) :

The program can't start because api-ms-win-core-errorhandling-l1-1-1.dll is missing from your computer. Try reinstalling the program to fix this problem.

All redistributable packages currently I have installed:

Redistributables those already installed

Is there any visual c++ redistributables I have to install to solve this?

UPDATE 2

I found More information on api-ms-win-core-errorhandling-l1-1-1.dll here and tried linking WindowsApp.lib with this dynamic library, but it even didn't resolve the issue.

UPDATE 3

I ran system file checker and it gave me following output as I thought it should:

Windows Resource Protection did not find any integrity violations.

2 Answers
Related