Registering a DLL RRS feed

  • Question

  • I have created a activex control that is used in JScript. The activex dll uses external C libraries.

    The problem is that I cannot regiter this DLL. When I try to regiter it gives me a error saying that

    "LoadLibrary("MyLibrary.dll") failed. The specific module could not be found."

    Can anyone give me a reason why it is failing.


    Wednesday, November 8, 2006 6:02 AM


  • Most likely MyLibrary.dll is either not in the environment's PATH, or another DLL that it is dependent on is not in the PATH.  For the latter case, if you open MyLibrary.dll using the depends.exe tool (comes with Visual Studio) then you'll be able to see what other modules it requires that its not finding.

    Either way, at least in my opinion, unless you have a good reason not to (like it would be impossible to do), it's a good idea to provide a full path to the DLL you want to load to prevent the possibility that you load one with the same name that has somehow founds its way into a place on your system such that it gets found first while searching for which MyLibrary.dll to load.
    Thursday, November 9, 2006 2:47 AM