Sorrow
December 7th, 2000, 11:06
to Malkocoglu
well, you are right... but for now I'm so lazy and i don't want to test
the PSAPI's calls to ntdll.dll

(that because I want to be sure that all PSAPI are supported by Win9x's ntdll.dll)
note that the imagebase is not always 0x400000 (see M$ programs)
to risc && Lord Soth
you're right,
and here is it a better explanation from "god" Pietrek
- Peering Inside the PE: A Tour of the Win32 Portable Executable File Format
- Matt Pietrek, March 1994
>[...]
>For the sake of convenience, Windows NT and Chicago uses
>the base address of a module as the module's instance handle (HINSTANCE).
> In Win32, calling the base address
>of a module an HINSTANCE is somewhat confusing, because
>the term "instance handle" comes from 16-bit Windows.
>Each copy of an application in 16-bit Windows gets its own separate data segment (and an associated global
>handle)
>that distinguishes it from other copies of the application, hence the term instance handle.
>In Win32, applications don't need to be distinguished from one another because they don't share the same
>address space.
>Still, the term HINSTANCE persists to keep continuity between 16-bit Windows and Win32. What's important for
>Win32 is that you can call GetModuleHandle for any DLL that your process uses to get a pointer for accessing
>the module's components.
finally I will test and write the results of this approach
thanks to all