Module name -> Dll file name

Module name -> Dll file name

Post by yan » Mon, 01 Apr 1996 04:00:00



Given a Dll file, I can find its module name of course. But if I only know
a module name, for example "kernel", how can I find the DLL file corresponds
to it, for example, "c:\windows\system\krnl386.exe"? Let's assume this module
is not currently in the memory. I would like to see a 16-bit solution.

Thanx!

 
 
 

Module name -> Dll file name

Post by Michael Gear » Mon, 01 Apr 1996 04:00:00



> Given a Dll file, I can find its module name of course. But if I only know
> a module name, for example "kernel", how can I find the DLL file corresponds
> to it, for example, "c:\windows\system\krnl386.exe"? Let's assume this module
> is not currently in the memory. I would like to see a 16-bit solution.

For a module in memory, it would be easy: use GetModuleHandle and then
GetModuleFileName.

For a module that's not currently loaded, there is no solution short of
searching the hard drive.  How could there be?



 
 
 

Module name -> Dll file name

Post by Howard Rub » Tue, 02 Apr 1996 04:00:00


Well for one thing there could be a cross reference list of entry
points and corresponding DLL file names. In fact, such a list comes with
MSVC 4.0
- Howard Rubin



>> Given a Dll file, I can find its module name of course. But if I only know
>> a module name, for example "kernel", how can I find the DLL file corresponds
>> to it, for example, "c:\windows\system\krnl386.exe"? Let's assume this module
>> is not currently in the memory. I would like to see a 16-bit solution.

>For a module in memory, it would be easy: use GetModuleHandle and then
>GetModuleFileName.

>For a module that's not currently loaded, there is no solution short of
>searching the hard drive.  How could there be?



 
 
 

Module name -> Dll file name

Post by Raymond Ch » Wed, 03 Apr 1996 04:00:00


Such a list could hardly claim to be complete, however.  The original
question was

Quote:>If I only know a module name, how can I find the DLL
>file corresponds to it?  Let's assume this module is
>not currently in memory.

Keeping a list of popular DLLs would work *if* the module name you are
looking for is on the list.  But if you're looking for the .DLL file
that corresponds to WAYCOOL, it won't be in the database, and you're
stuck with a disk search.



Quote:>Well for one thing there could be a cross reference list of entry
>points and corresponding DLL file names. In fact, such a list comes with
>MSVC 4.0
>>For a module that's not currently loaded, there is no solution short of
>>searching the hard drive.  How could there be?