mfc >> LoadLibrary fails with message "Module Not Found"

by Scott McPhillips [MVP] » Fri, 28 Nov 2003 18:36:18 GMT

santosh wrote:

> Hi All ,
> I am facing a problem with LoadLibrary wherein , when i try to load my
> custom dll XYZ.dll from system32 it works fine. If i place the same
> dll in Program Files/Custom Folder/XYZ.dll and try to load it ,
> LoadLibrary fails with error number 0x7E meaning Moudule Not Found.
>
> I try to find out the dependencies , with Depends.exe and my custom
> dll XYZ.dll depends on dlls only from System32 meaning it doesn't
> depend on any other custom dlls.
>
> What might be the problem???
> Any help is greatly appreciated...
>
> -Santosh
> //KRLoadLibraryFails

Did you use the full path to the DLL in your call to LoadLibrary?

--
Scott McPhillips [VC++ MVP]



Similar Threads

1. LoadLibrary fails with message "Module Not Found"

2. LoadLibrary(): can't find a DLL - FOUND!

It seems like the reason for this behavior was including a file that had 
this definition:
enum StatusType { UNDEFINED, VALID, INVALID };

After changing it to
    enum StatusType { ST_UNDEFINED, ST_VALID, ST_INVALID };
everything works just fine...

Thanks for your help!

Inna


"Inna Belov" < XXXX@XXXXX.COM > wrote in message 
news:42b0b178$ XXXX@XXXXX.COM ...
>>> The value is 3221225614.
>>
>> That is an exception code, specifically STATUS_FLOAT_DIVIDE_BY_ZERO.  I 
>> find
>> it odd that GetLastError() would be returning an exception code.
>>
>> LoadLibrary(), not ShowMessage(), is the one causing the divide-by-zero
>> exception.
>
> So, does it mean that this exception occurs inside DLL? while loading?
>
>
>> Always use absolute paths, even for files in the same folder.  There is 
>> no
>> guarantee that the current directory will be the same value at different
>> times.  It can change dynamically during the process's lifetime.
>
> Good point. But it doesn't help in this case... :(
>
> 


3. Problem with manifest, the specified module could not be found - CSharp/C#

4. RegAsm : error RA0000 : the specified module could not be found

Hi all,

I have an assembly dll. while trying to register it using regasm

regasm x:\source\qryserver\NVserver\bin\debug\NVServer.dll.

I had successfully registered the same on other machines, I registered
this some time back even opn my machine, but now I formatted my machine
and when I tried to register this it is failing.

I have VS.Net2005 running, with framework 2.0 . The framework is also
placed in the path .

when I try to see the attributes of regasm it is showing it fine. The
dll is also placed correctly in the assembly.

Pls let me know where I am missing.

Thanks in advance.

Regards,
Suresh

5. System.IO.FileNotFoundException: The specified module could not be found - CSharp/C#

6. newbie Error: The specified module could not be found

I'm using VC6.0 and I'm trying to make a DLL.
I do a regsvr32 and I get error:

LoadLibrary failed ..."The specified module could not be found"

I used Depends and it said I needed DWMAPI.DLL
( I thought that was for Windows Vista).

I do NOT have Vista.
I tried on an NT4 and XP.


TIA
Steve

7. shared lib: could not find module

8. 'Create (intfObj)' The specified Module could Not Be Found

When my program starts it creates a COM object like this,  main->cTC2000 = 
CocTC2000::Create();

If the target program is not on the computer the error message, " 'Create 
(intfObj)' The specified Module could Not Be Found."  occurs.

Only some of my software users have the target program so I need my software 
to handle the failed COM object creation and keep running. Even if I use, 
try{ }catch(Exception&){ } the error message occurs.

The only solution I ran across involved manually changing one of the Borland 
files which I do not want to do. Is there any other solution to this 
problem?


Thanks again
Larry Johnson.