Thread: Problem with Regsvr32

  1. #1
    Registered User
    Join Date
    Oct 2009

    Problem with Regsvr32

    I have a project which on successful building provides an abc.dll as an output which is then registered using regsvr32.
    I built my Project in the Release configuration. The project builds successfully and then I can successfully register it using regsvr32.
    Now I build the same project on VS2008 with the Debug configuration with absolutely no changes to the code. The project builds successfully. However, regsvr32 fails to register and shows a message “Load Library (abc.dll) failed. The specified module could not be found”.
    I checked the .wll file with the software called “Dependency Walker”, which provided with a list of dlls that it uses. These are:
    • Atl90
    • msvcr90d
    • msvcp90d
    • mfc90d
    • msvcr90
    • msjava
    • coredll
    • msvcr70
    • msvcp70
    • mmvcp70
    • mmvcr70

    I copied all these dlls from C:\Program Files\Microsoft Visual Studio 9.0\VC\ce\dll\x86 and other folders on the system, and downloaded msjava.dll and coredll.dll are downloaded from an external website. And pasted all of them into the C:\Windows\system32 folder.
    After this, when I try to register the abc.dll, regsvr32 simply fails – no message at all. When I try to unregister the dll with regsvr32 /u abc.dll, it does not give any response. Any clues?
    I have not used the /s option so the suppressing of the message is not the issue.

  2. #2
    Join Date
    Oct 2007
    Inside my computer
    I suggest you undo those changes you made. Try registering other libraries - does it work? If not, then repair your filesystem. Do not go about replacing or putting stuff into your system folder unless you know what you are doing.
    Read the error message clearly, too. It says it cannot find the library, ie cannot find the file it is supposed to register. NOT that it fails in some unknown spectacular way!
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  3. #3
    Algorithm Dissector iMalc's Avatar
    Join Date
    Dec 2005
    New Zealand
    Okay you're half way there, you've got the Depends tool. What you need now is the expert tip for how to diagnose this problem:

    • Launch Depends
    • File -> Open -> Browse to and open regsvr32.exe
    • Profile -> Start Proifiling...
    • Program Arguments: "C:\MyPath\MyProblematicDLL.dll"
    • Check "Use full paths when loging file names" (I remember this helping once)
    • Click OK and watch what happens as Regsvr32 tries to register your DLL.
    • After its attempt, the tree and list views on the main window should hopefully be updated to show what was the real problem. Don't forget that you can ignore delay loaded DLLs

    See many people know to use depends and they know how to register a DLL, but not many know about the profiling feature, or they don't think to combine this with the registering of the DLL.
    My homepage
    Advice: Take only as directed - If symptoms persist, please see your debugger

    Linus Torvalds: "But it clearly is the only right way. The fact that everybody else does it some other way only means that they are wrong"

  4. #4
    Registered User
    Join Date
    Oct 2009

    Thanks a lot for the reply it was really helpful and helped us to push further, i knwo adding dlls from an external source might not be a great idea but then all i was doing was experimenting with a virtual PC so I didnt bother about crashng the system. ANyways thanks again.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need help understanding a problem
    By dnguyen1022 in forum C++ Programming
    Replies: 2
    Last Post: 04-29-2009, 04:21 PM
  2. Memory problem with Borland C 3.1
    By AZ1699 in forum C Programming
    Replies: 16
    Last Post: 11-16-2007, 11:22 AM
  3. Someone having same problem with Code Block?
    By ofayto in forum C++ Programming
    Replies: 1
    Last Post: 07-12-2007, 08:38 AM
  4. A question related to strcmp
    By meili100 in forum C++ Programming
    Replies: 6
    Last Post: 07-07-2007, 02:51 PM
  5. WS_POPUP, continuation of old problem
    By blurrymadness in forum Windows Programming
    Replies: 1
    Last Post: 04-20-2007, 06:54 PM