Windows - Handle

Windows 95 Wallpaper Version


A handle is a pointer to a resource.

For example, if a process wants to use a particular service offered by a particular object, the process asks the object for a handle to that service.

Inside the kernel, Windows maintains a table of all the different objects that the kernel is responsible for:

  • Windows,
  • buttons,
  • icons,
  • mouse pointers,
  • menus,
  • an open file ?,
  • or a pipe (stream) ?
  • and so on,

All get an entry in the table, and each entry is assigned a unique identifier known as a HANDLE.

A HANDLE in the Win32 APIs is a:

  • token
  • abstract reference
  • identifiant

that represents a resource that is managed by the Windows kernel. An HANDLE can be seen an instance of a class with no methods who's state is only modifiable by other functions.

They provide encapsulation and abstraction from internal Win32 resources which hides a real memory address from the API user, allowing the system to reorganize physical memory transparently to the program.

The HANDLE itself is just an integral type.

Documentation / Reference

Discover More
Process Explorer Handle Open File Search
File System - File Descriptor or Handle (Open File)

A file descriptor (Unix, Linux) or a file handle (Windows) is the connection id (generally to a file) from the Operating system in order to perform IO operations (Input/Ouput of Bytes). For Wikipedia,...
Card Puncher Data Processing
IO - Diagnostic/Monitoring

Monitoring file system activity. See also: Monitoring: FileSpy Filemon is now in Process...

Share this page:
Follow us:
Task Runner