Re: Code Needed For Getting Process Filehandle in C++



Mark,

I am afraid you need to do a bit of learning.......

Basically, there are 3 types of handles ( namely, kernel, user(i.e
window) and GDI ones), and these handle types are managed independently
from one another


User32 functions deal with Windows handles that are valid well beyond
the context of a process that creates them - they are managed by window
messaging subsystem. Therefore, the very term "process window handle
table" is just a plain nonsense.....


Kernel and GDI handles are valid only in context of a given process, so
that the term "process handle table" applies to them. However, these
tables are different from one another


Handles to file objects, dispatcher objects and miscellaneous kernel
objects (for example, registry keys) are stored in the kernel address
space in the process handle table, managed by ntoskrnl.exe, so that the
user-mode code has no chance to access it directly


GDI handles are stored in the user address space in undocumented GDI
handle table
(this is done solely for the performance reasons)

Anton Bassov




, which gives the same list
that handle.exe.
mark wrote:
"anton bassov" <soviet_bloke@xxxxxxxxxxx> wrote in message
news:1165915856.828449.38680@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I remember it was the list of file handles from the handle table in user
mode.

There is no such thing in the user address space, at least not on
NT-based system....

Yes, there is.

What you are speaking about is GDI handle table, which is irrelevant in
our discussion

No, it was the ******* USER ******* handle table, which gives the same list
that handle.exe.

.



Relevant Pages

  • Does this scsi error storm mean anything to anyone ?
    ... Kernel is a fedora 5 one with an unrelated patch to fix an autofs race ... Allocating PCI resources starting at c2000000 ... MEM window: disabled. ... PCI: Setting latency timer of device 0000:00:02.0 to 64 ...
    (Linux-Kernel)
  • Re: [RFC] Documentation: add documentation for rc-series and merge window
    ... +Rules on what kind of patches are accepted after the merge window closes. ... +These are patches targeted for the kernel rc-series of a kernel prior ... - if must fix a reported security hole ...
    (Linux-Kernel)
  • Re: APM (or ACPI) on an Acer TravelMate 280 (RH9)
    ... Red Hat Linux does not seem to like your laptop's BIOS and PCMCIA ... compile your own kernel in order to get ACPI and PCMCIA working. ... This will open a new window, in this window type in something like the ...
    (comp.os.linux.portable)
  • Re: Difference between this.CreateGraphics() and Graphics.FromHdc(hDC);
    ... I've had a read through the GDI+ FAQ. ... FromHdc using the handle from GetWindowDC will return a graphics object ... based on the whole window including the non-client area. ... Find great Windows Forms articles in Windows Forms Tips and Tricks ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Difference between this.CreateGraphics() and Graphics.FromHdc(hDC);
    ... missing paint event, and the draw flat button code can be called from ... I've had a read through the GDI+ FAQ. ... FromHdc using the handle from GetWindowDC will return a graphics object ... based on the whole window including the non-client area. ...
    (microsoft.public.dotnet.languages.csharp)