I suppose the OS is Vista and you are using VS 2005.
You need to be logged as administrator to modify the registry.Try to run Visual Studio as administrator or try to register the library manually with regsvr32.exe.
I am unable to load my test.dll using LoadLibrary() API. I get error code 126 (Module not found)using GetLastError().
By Dependency Walker, I have come to know that my test.dll depends on "xerces-c_2_7.dll" and "Xalan-C_1_10.dll". These dlls were already present on the same path as the exe.Still I am getting the error.
So I tried to load both the above mentioned third party dlls using LoadLibrary() which returned handle as 0x10000000. By GetLastError() I am getting error code 6 (Invalid Handle).
Can anyone please guide me on why I am getting the Invalid Handle error?
Thanks all for replying. I could able to solve the issue. The problem was not with those two third party dlls. test.dll requires some MFC & Visual Studio specific dlls (mfc90d.dll, msvcp71d.dll, msvcp90d.dll, msvcr90.dll, msvcr90d.dll, msvcr71d.dll).