|
Hello Phil,
I've decided to attach the library as a static one. Everything seems to be working now. I hope these aren't famous last words.
Phil, thank you so much for your help! It's good to feel I'm not on an island with these issues.
Thanks again,
Jay
"Philip Borghesani" <philip_borghesani@mathworks.spam> wrote in message <hek55t$9jq$1@fred.mathworks.com>...
> There are no special requirements to use loadlibrary in a dll loaded by MATLAB but your paths may be different.
>
> Take a look at the documentation for functions LoadLibraryEx and SetDllDirectory. You may need to use an altered search path to
> find all needed dlls.
>
> Profiling mode in dependency walker (http://www.dependencywalker.com/) can be helpfull in determining what dlls are failing to load.
>
> Phil
>
> "J. Street" <jmathworks@gmail.com> wrote in message news:hehbdh$io3$1@fred.mathworks.com...
> > Hello everyone,
> >
> > I have a challenge for the advanced users that connects matlab to dlls. I'm currently using matlab to interface with a simulation
> > engine written in C++. Since I'm unable to interface matlab with complex dlls written in C++, I've written an interface dll that
> > loads the simulation engine dll.
> >
> > The problem lies in the fact that when my interface loads the simulation engine dll, using loadlibrary it returns a 126 error from
> > GetLastError(), meaning it is unable to find the module. When I load the same dll using a C++ application, it finds the
> > simulation engine through the interface dll with no problem.
> >
> > I have all of the paths pointing to the right locations for the dlls, and I explicitly load the dll with the full path and file
> > name.
> >
> > Using matlab, how can I get an interfacing dll to load another dll, in C++ using loadlibrary()?
> >
> > Thanks in advance,
> >
> > Jay
> >
>
|