1.5. Handles and Objects

Windows uses the concepts of a handle and an object throughout the system services. An object is owned by the operating system and represents a system resource. For example, a thread is represented as an object. The operating system stores all information about the thread in the thread's object. The object is opaque to the programmer.

A handle points to an object. It is possible to create a single object and refer to it with several different handles. You can think of the handles as pointers that let you access the object.

The 32-bit API defines the following " kernel objects." All of them return a handle when they are created or opened:

Access tokensOpenProcessTokenChapter 13
Console ...

Get Win32 System Services: The Heart of Windows® 98 and Windows® 2000 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.