Question

I'm trying to deploy my project and create an installer. I've created a .vdproj, that has an output setup.msi When running the .msi setup wizard, i'm getting the error:

"Module xyz failed to register. HRESULT -2147024769. Contact your support personnel."

The module that failed to register is a C++ dll, while my application is a WFF-C# appliction.

Does anyone know of a solution for this problem?

Was it helpful?

Solution

The installer complains that it cannot find the exported function in the DLL to register it, the DllRegisterServer function. Very good odds that you asked the installer to register the DLL when it is not in fact a COM server. Not every C++ dll is a COM dll. Most are not.

You ought to be able to see this in the way you use the DLL in your code. You typically use a COM dll by adding a reference to the DLL or type library and you'll have an Interop.Foo.dll assembly in your build directory. Conversely, you use a non-COM dll in your code with the [DllImport] attribute.

Change the "Register" attribute for the DLL back to vsdrpDoNotRegister and try again.

OTHER TIPS

The error is 0x8007007F (in hexadecimal), translating to Windows error code 127 (0x7F) ERROR_PROC_NOT_FOUND. The issue is probably because the proc DllRegisterServer, the standard proc used to register COM types exported by that assembly, is not exported by the DLL. You may need to register an associated typelib instead.

Otherwise, see similar issues on Stack Overflow like LoadLibrary() error code 127.

There can be two reasons for that

  • The dll you are trying to register (using the setup program) is not an activeX dll and hence does not require registration. Standard dlls does not require registration. You just have to copy it in system folder or the application folder. You should try removing those instruction from your installer program which tries to register the all

  • Second reson can be as suggested by akron, you need to register an associated type lib and not the dll itself.

You can use dependency walker to find out what kind of dll it is and the other dlls with which it is linked.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top