Link to home
Start Free TrialLog in
Avatar of pjsulin
pjsulin

asked on

Dll throws Error on non dev machine

I am having a problem with a third party dll when installing my applications on some other machines.  Note that it works fine on some machines and not on others.  My application references a dll called UNIVOPT_CSLOADER.dll which is a .NET wrapper for the C++ dll, CSUNIVOPT.  When it fails it throws this error message:  The type initializer for "CSUNIVOPT" threw an exception.  Looking at the stack trace this happens when I first try to call a function from this dll.

The dll in my application, UNIVOPT_CSLOADER, resides in my applications directory and the other dlls are in my System32 dir.  These other dlls also reside in the C:\MBRM dir, the install directory for this product, but I have renamed them and run the application to confirm that it is calling the ones in the System32 dir.

If I move this application into the C:\MBRM directory it runs fine, but if I try and move all the dlls into from the MBRM dir into my apps dir I have the same problem.  

Why would the same dll's try to load their dependant dlls from different places on different machines?
Avatar of kaylanreilor
kaylanreilor
Flag of Luxembourg image

Don't you register these dlls when you deploy your app ? Did you use tlbimp.exe to generate the .Net wrapper of your native C++ dll ?
ASKER CERTIFIED SOLUTION
Avatar of pjsulin
pjsulin

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial