Вы находитесь на странице: 1из 1

What is a handle?

A handle is simply a number (usually 32 bits in size) that refer to an entity.


The entity could be a window, an icon, a brush, a cursor, a file or any such
entity. The handles in windows are similar to the file handles used in
conventional C and MS-DOS programming.

For example, the function Open() return a handle when a file is opened
successfully. This handle can then be presented to the Read() function call to
read from that file. Notice than a handle is not a pointer. The program cannot
use the handle directly to access information about the file. Other than
passing it to a file I/O function call, the file handle is unimportant to your
programs, but the windows module that gives your program that handle knows
how to use it to refer to the entity.