Windows Handle
In windows OS, every resource is an “object” identified and referenced by handle of type HANDLE.
In 32 bit machine, it is a 32 bit value. HANDLE is just a typedef of void pointer.
This type is declared in WinNT.h as typedef PVOID HANDLE;
Usually, the HANDLE is wrapped in an instance of a class. CWnd is a good example; it contains HWND which is a handle to a window. Here CWnd brings the object oriented concept. For exapmle to show a window,
pWnd->ShowWindow( SW_SHOW ); this is exactly same as ::ShowWindow( pWnd->m_hWnd, SW_SHoW );
Kernal objects must be manipulated by HANDLES contains:
files, thread, memory,events,mutexes,semaphores,pipes,processes
No comments yet.
Leave a comment
-
Archives
- September 2008 (1)
- August 2008 (4)
- July 2008 (5)
-
Categories
-
RSS
Entries RSS
Comments RSS