Re: Search path in LoadLibrary problem ...

Tech-Archive recommends: Fix windows errors by optimizing your registry



He's saying that the DLL is implicitly linked. That is, a.dll links b.dll's
import library, rather than a.dll calling LoadLibrary() to load b.dll.

Paul T.

"Ulrich Eckhardt" <eckhardt@xxxxxxxxxxxxxx> wrote in message
news:rdfjp3-l8s.ln1@xxxxxxxxxxxxxxxxxxxxxxxxx
Petr Svoboda wrote:
I have problem with LoadLibrary function on windows CE.
I have library, a.dll that contain b.dll library (static linked).

Wait: b.dll is a DLL, a Dynamically Linked Library, you can't statically
link that. What exactly do you mean? From the rest below, I guess you
mean "implicitly linked", i.e. that the dynamic loader loads it
automatically and not that it is loaded explicitly by LoadLibrary().

"a.dll" and "b.dll" library I have in \testA\ directory
(\testA\a.dll and \testA\b.dll).

And i have main executable (main.exe) program, that run "a.dll"
library in \testB directory (\testB\main.exe). "main.exe" contain

::LoadLibrary(_T("\\testA\\a.dll"));

Result of "LoadLibrary" is failed, because a.dll windows OS found,
but b.dll not...

I think the MSDN pretty well documents the behaviour of the dynamic loader
on the different OSs (CE!=NT!=w9x). In your case, a.dll tries to find
b.dll
but fails because it is not in the searched dirs.

In windows XP (or 98, 95 ...) exist SetCurrentDir(...) function, that
solve it (SetCurrentDir(_T("\\testA"))). But on windows CE don't exist
it.

CE processes don't have a thing called 'current directory', which is why
SetCurrentDir() doesn't exist.

Uli



.



Relevant Pages

  • Re: BadImageFormatException was unhandled
    ... I have a solution with many projects and a substantial reference tree. ... I have a Windows Application project that will build but not run. ... An attempt was made to load ... Otherwise, the 64 bit main exe cannot load any 32bit DLL, include the DLL which uses managed C++ and it calls the win API, or other natvie C 32bit DLL. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Search path in LoadLibrary problem ...
    ... Petr Svoboda wrote: ... b.dll is a DLL, a Dynamically Linked Library, you can't statically ... I think the MSDN pretty well documents the behaviour of the dynamic loader ... But on windows CE don't exist it. ...
    (microsoft.public.windowsce.embedded.vc)
  • Re: Search path in LoadLibrary problem ...
    ... tobey no spam AT no instrument no spam DOT com> wrote: ... rather than a.dll calling LoadLibrary() to load b.dll. ... Result of "LoadLibrary" is failed, because a.dll windows OS found, ... I think the MSDN pretty well documents the behaviour of the dynamic loader ...
    (microsoft.public.windowsce.embedded.vc)
  • performance windows services
    ... We are using a VB.NET dll to execute a process (load and validate a file). ... The same process is sended as a thread from a windows service (also ...
    (microsoft.public.dotnet.framework)
  • Re: loading oratcl from starkit
    ... This works fine in some windows 2000, but fail in some windows 2000 ... The script fail when it try to load the oratcl44.dll, ... the dll were not copied into c:\temp. ...
    (comp.lang.tcl)