HANDLE
typedef PVOID HANDLE;
Remarks
A HANDLE is a general-purpose identifier used by a system to identify an open object. These objects include files, memory, processes, threads, and other system resources. Most functions in the Windows API that operate on system resources take one or more handles as parameters.
A handle is a value that an application uses to access an object. The value is typically an index into a system table of objects, or it can be a pointer to an object structure. The operating system manages the objects and their associated handles. Applications should not assume anything about the value of a handle, except that it can be used to refer to the object.
When an application no longer needs a handle, it should close it by calling the appropriate close function (e.g., CloseHandle). This releases the handle and any associated resources, allowing the system to reuse them.
Note
While HANDLE is defined as PVOID
(a pointer to void), it is crucial to treat handles as opaque types. Direct manipulation or casting of handles to other types is generally not supported and can lead to undefined behavior.