SourceHttp://www.0xaa55.com/forum.php?mod=viewthread&tid=1401&extra=page%3D1
Windows uses a common handle to manipulate resources, and the corresponding objects are maintained by the operating system,
objects: User objects, GDI objects, and kernel objects;user objects are used for Windows management, GDI objects for drawing, kernel objects for memory, process, and IPC,
Windows core programming writes that the method of identifying kernel objects is to see if there are security_descriptor parameters
Resources for user objects include: shortcut keys, cursors, tags, DDE transforms, hooks, icons, menus, windows, etc.
GDI objects include: bitmaps, brushes, brushes, device contexts, primitives, fonts, color palettes, regions, and so on
kernel objects include: access tokens, devices, consoles, desktops, events, files, file mappings, heaps, jobs, oil slots, modules, mutexes, pipelines, semaphores, sockets, threads, timers, etc.
user objects, each object can have only one handle, does not allow inter-process replication and inheritance handles, and a session's process cannot reference the handle of another session process. The maximum number of user handles per session is capped (200,18000),
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Nt\currentversion\windows\userprocesshandlequota
GDI objects, each object can have only one handle, the handle to the GDI object is private to the process, and only the process that created the object can use the object handle, the maximum number of handles the user handle has (256,16384),
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Nt\currentversion\windows\gdiprocesshandlequota
The kernel object handle is process-owned, that is, the process either opens an existing object, or creates an object to get the kernel object handle, which can be copied and inherited, with a maximum of 2^24 per process handle, whereas the handle is in paged memory, so the actual handle count is related to available memory.
From for notes (Wiz)
Objects in Windows