Windows Objects

Windows Objects

Many of the API functions create objects of some sort, which you then manipulate and destroy with other API functions. For example you could create a window, move it, resize it and destroy it. Generally the function that creates the object returns a handle to it, which you pass to the other functions that use this object. There are really two kinds of objects: kernel objects and non-kernel objects. Non kernel objects are usually grouped into user objects and GDI objects.

  • Kernel Objects. These are owned and managed by the kernel, not by individual processes. All kernel objects have a name, security descriptor and a usage count. Other attributes are specific to a kind of kernel object; processes have process IDs and a base priority, semaphores have a maximum count, etc.
    Examples:
    Process              File Mapping  Event
    Thread               Heap          Timer
    Module               Pipe          Communications Device
    File                 Mailslot      Update Resource
    Change Notification  Mutex         Event Log
    Find file            Semaphore
    
  • User Objects. These objects are user-interface related. They are owned by a process, except for Windows and Hooks, which are owned by threads.
    Examples:
    Window           Accelerator Table  Hook
    Window Position  Icon               Desktop
    Window Station   Cursor             DDE Conversation
    Menu             Caret
    
  • GDI Objects: These objects deal primarily with drawing.
    Examples:
    Pen       Region              DC
    Brush     Font                Memory DC
    Palette   Metafile            Metafile DC
    Bitmap    Enhanced Metafile   Enhanced Metafile DC

你可能感兴趣的:(Windows Objects)