Just to be a little more detailed on other possible reasons for this failure.
If you look at the LoadLibrary docuementation it state's the following:
Unless the full path to the module is
specified, Windows Embedded CE
searches the following path for the
module:
. The absolute path specified by the lpLibFileName parameter.
. The .exe launch directory.
. The Windows directory.
. ROM DLL files.
. An OEM-specified search path.
The following registry subkey
specifies a search path to use with
LoadLibrary and CreateProcess: Copy
Code
HKEY_LOCAL_MACHINE\Loader
SystemPath=multi_sz:\\path1\\
\\path2\\
The path is only searched if the path
of the file being looked for is not
explicitly specified.
So that can help in understanding why it may not be able to find the dll.
If the cause is not being able to find the DLL then here is a link to a article on other common causes for this problem to show up:
The possible causes of this are:
- The dll isn't a built for Windows CE
This happens when taking a dll from Big Windows (NT, XP, Vista) and
trying to use it on a Windows CE
device.
- The dll isn't built for the processor family
This happens when taking a DLL that was built for a different
processor than the target processor
- Another dll that the dll needs to load isn't available
This happens when the DLL that you are loading then loads another DLL
and there is a failure when that DLL
tries to load another DLL that fails.
- If a function that is needed isn't in the dll.
This happens if the dll on the system isn't the same as the the one
that was being built when the lib that
you linked to was created. It is
sometimes a symptom of using the wrong
SDK for your target.
I find my most common problem that I get is that another DLL it depends on isn't available or a function in that other DLL isn't available.