Why is my dll not registering?

I am building a project in VS2005 and some of my DLLs are not registered. The error message I get in Visual Studio:

Project: error PRJ0019: the tool returned an error code from "Registering an ActiveX control ..."

which is very vague. When I register the DLL manually through the command line (using regsv32.exe, I get the following error:

Error LoadLibrary ("test.ocx") - this application could not be started because the application configuration is incorrect. Reinstalling the application may fix the problem.

I ran Dependency Walker ( depends.exe) in a .ocx culprit file, but it does not detect any obvious problems.

I also reassembled it, but I am still getting the same problem.

Any suggestions on how I can determine the reason for this refusal to register?

+3
source share
5 answers

Microsoft recently released an ATL security update (KB971090). It does not update on top of MSVS2005sp1, and it simultaneously compiles and runtimes. Check if your building environment has this patch.

Literature:

+3

, . DLL . , DLL ( DLL) DLL, .

: " , ". .

+3

, Process Monitor microsoft.com.

Montior , , - . , , CreateFile() DLL, OCX .. .

procmon , , regsvr32.exe, , . NAME_NOT_FOUND .

+2
+1

, :

  • regsvr32 w/fusion log enabled (fuslogvw.exe - DLL). , , , .
  • .ocx . , COM- - .
  • regsvr32 WinDbg. DllMain , .
  • If you never break into DllMain in WinDbg, set a breakpoint when loading the module for your DLL, and as soon as it gets there, you can take a step through LoadLibrary or just set a common breakpoint for the load library and check each dll after that.
0
source

Source: https://habr.com/ru/post/1720149/


All Articles