Unable to register dll using regsvr32:The module "*.dll" failed to load - matlab

There is a similar question from stackoverflow. But I didn't find that the answer is helpful. I also used Google searched the websites, I have watched here and here.
I have tried the method they told to solve this problem but not got a satisfied answer.
My operating system is 32-bit Window 7. Noncircle.dll is generated by Matlab version 2010a in another machine which installed Matlab. I tried to add Noncircle.dll as a reference in a project written in C#(I didn't install Matlab on my computer), but Visual-Studio 2010 told me the error:
So I doubt that Noncircle.dll maybe have to be registered. So I put Noncircle.dll in C:\Windows\System32 and started Cmd.exe as a administrator and typed:
regsvr32 Noncircle.dll
Then I got an error:
"The module "Noncircle.dll" failed to load.Make sure the binary is sorted at the
specified path or debug it to check for problems with the binary or depenedent
.DLL files.The specified module coudl not be found."
Could you give me some hints, Thanks in advance!
Updated on 2012/10/18
But if I have installed Matlab version 2010a on my machine, this problem is solved.

I just had the same issue.
If you're running 64-bit Windows and you've placed the 32-bit DLL in Windows\System32\ then it'll give you this error.
Simply place the DLL into Windows\SysWOW64\ and register it from there.
Here's where I found the fix:
http://csi-windows.com/blog/all/73-windows-64-bit/378-fixing-qregsvr32-the-module-failed-to-load-the-specified-module-could-not-be-foundq

First of all try to use RegDllView, to see whether there is actually a COM server registered in the system.
Also check whether this DLL is a COM component.

I know its too late... but I am adding my solution for others because I faced the same error after following above mentioned answers:
"I just had the same issue.
If you're running 64-bit Windows and you've placed the 32-bit DLL in Windows\System32\ then it'll give you this error.
Simply place the DLL into Windows\SysWOW64\ and register it from there."
If you are facing same error after placing DDL to SysWOW64, then you need to turn on MSMQ feature.
Go to Start ->
Search "Turn Windows features on or off" ->
Find "Microsoft Message Queue(MSMQ) Server" and Enable it.
Now, register the same DLL again and this time it will be registered

Related

How do I find the source line of a crashing DLL giving the DLL's name and the address of the fault?

The official way to do this appears to be to use WinDbg. That should be able to give me the information I need, very easily. However, I don't have WinDbg, and my attempts to install it have failed for no known reason. So, is there another way to find my bad line of code? Or, is there a way other than using Microsoft's Windows SDK installer to get WinDbg?
My DLL is an unmanaged DLL (no CLR) built using Visual Studio 2012.

gtk+ without msys2 mingw

On Windows, trying something with gtk+. I have downloaded Msys2, along with gtk+3.0.
Successfully compiled all the gtk+3.0 examples in the msys2 mingw-w64 terminal.
Now I want to move a bit further to try work without the msys environment.
I opened up cmd and navigated to where the example executables are compiled. Then I fired them up by typing "example.exe".
libgio-2.0-0.dll missing, not surprised. I go back to check the PATH environment of the msys environment, PATH=/mingw64/bin/:/usr/local/bin:/usr/bin/:/bin:/c/Windows/System32:..blablabla
So in the cmd environment I did set PATH=%PATH%;pathto/mingw64/bin; and run example.exe again.
This time it gave a very strange error cannot find entrypoint inflateValidate (in dll libpng16-16.dll)
So I checked, indeed there was no inflateValidate function in the dll. it seemed to me that something thought the function is in the dll and tried to call it but because it doesn't exist so it failed. What I don't understand is that why did it not fail in the msys environment but failed in the windows environment. And does that bring any impact to me if I am going to ship any gtk application? I thought simply distributing the relevant dll would be enough.
I have tried instead of adding the mingw64/bin path to the PATH variable, but copying the required dll the the execute location 1 by 1, but at the end it still gave the same error.
I have also tried to search for other libpng*.dll in my computer, none of them contained the inflateValidate function.
If anyone know whats going on please shed some light to the question.
I might be very late to the party but I ran into the same issue yesterday (missing the inflateValidate symbol) and after checking the contents of the zlib1.dll file could ascertain that the function is just not there.
I downloaded another version (specifically this one https://sourceforge.net/projects/uqm-mods/files/latest/download, though I am in no way affiliated to this project) and saw that the inflateValidate symbol was indeed declared, so I suppose that the zlib bundled with your files is not up to date with the libpng requirements.
This solved my problem. I hope it solves yours too.

Error in start up MATLAB 2014a (32bit)

After setting up the program ,I meet a fatal error on Startup matlab .As following :
Failed to start the Java Virtual machine - JNI error: -3
I want to know where is error and how to solve it .Please help me ,Thanks !
PS: My OS is windows 7 (32bit) ,and jdk 1.8(32bit) is set up successfully (Certainly PATH and CLASSPATH is set OK).
When you launch the application, does that error display in a dialog box, or within the MATLAB console? Does MATLAB launch if you use the '-nojvm' flag (in your shortcut path or from within a Command Prompt window)? If not, does it launch if you use a '-nodisplay' flag?
Definitely make sure you don't have a 'matlab_java' environment variable set, and if you are able to launch MATLAB, you should run the following commands:
>> rehash toolboxcache;
>> restoredefaultpath;
>> savepath;
After running the commands, restart MATLAB. When MATLAB launches, do you still see the error?
If you aren't able to get MATLAB to run, can you look within your %temp% directory for an error log? I don't recall the specific naming convention, but you should be able to find it based on it's timestamp.
Hope this helps, and if it doesn't, try calling the MathWorks Installation and Licensing team. As long as you have a real license, they'll help you.
Disclaimer: I'm a former member of the recommended team above, but have no current affiliation with MathWorks.

A Java Development Kit must be available in order to run Eclipse

I was able to run Eclipse until I tried to install another compiler, suggested by a online tutorial for C++. Now I'm getting the 'No virtual machine was found error'. I know I'm suppose to match the versions of the programs but I can't seem to figure it out. I thought I had downloaded 64 bit version of each program in Eclipse and JDK but I don't know how to verify it. I go to each file and try to get the info but I must be looking in the wrong places. I have copied the file location of JDK and pasted it in the Advanced System Settings in Environment Variables. In the Systems Variables for User on the variable line I typed "path", on the value line I pasted the location: C:\Program Files\Java\jdk1.8.0_05\bin. I have even uninstalled both programs several times and reinstalled them. I've been at it for several hours now with no success. Any suggestions, anybody. Thank you.

Error: Invalid MEX file, the specified module could not be found

I have compiled Mex file successfully on my laptop. But when I am running it, it says Invalid mex file 'c:\newfolder\filename.mexw32' The specified module could not be found.
System specification:
OS: windows 7
MATLAB 2010a
Microsoft Visual Studio 2008.
The same mex file is compiled and run successfully on my PC under XP SP3.
This MathWorks support link suggests two possible reasons to your problem:
You do not have all of the necessary libraries that the MEX-function is dependent upon.
You are running a MEX-file on a different version of MATLAB than it was compiled on.
Either way, to locate the source of this error it says that you need to list all dependent library files and verify their existence in the system you're trying to run the MEX file on, and also recommends the Dependecy Walker as the tool to to do that.
Do you you the mex file on another system than the one it is created on?
If so, then you need to install the Microsoft Visual C++ Redistributable on that machine.
I had this problem also when upgrading from Matlab2010a/VS2008 to Matlab2013a/VS2010.
All my environment variables were sent correctly.
A reboot fixed problems with OpenCV dlls not being found, I assume that it was still trying to link to the OpenCV dlls for VS2008 (even though I had changed the path). However still my mex file could not find libmex.dll.
When I installed Matlab2013a, I did not uninstall the old version (in case I wanted to go back).
However that was the cause of my problem.
Once I uninstalled the old version of Matlab and rebooted again, the problem was gone.
I had a similar problem. I was only linking against 1 'lib' so I simply copied that lib into the same folder as the mexw64 and it worked.
I have not poked around for the correct place to tell MATLAB to add the lib's real location to whatever path it's looking at.