There are times when I see lots of code using this HANDLER type. What is it and what is it for? Where I find tutorials that teach you how to use it.
There are times when I see lots of code using this HANDLER type. What is it and what is it for? Where I find tutorials that teach you how to use it.
HANDLE can be anything from an integer index to a pointer to a resource in kernel space. The idea is that they provide an abstraction of a feature, so you do not need to know much about the feature itself to use it.
For example, HWND in the Win32 API is a HANDLE type for a window. By itself, it is useless: you can not gather any information from it. But move on to the correct API functions, and you can perform a number of different tricks with it. Internally, you can think of HWND as just an index in the GUI window table (which may not be how it's implemented, but it makes the spell sense).
There are no tutorials on this and neither is our goal.
The question speaks in HANDLER, which does not seem to be the case. The context indicates that you want to know about the type HANDLE
or the concept of handle , which is different from handler .
HANDLE
is not a C or C ++ type, it's from the API Windows. This type is just a pointer to void
, that is, it can be anything. But this is implementation detail. Almost all types that start with H
in this documentation are handles .
There are several different manipulatives. Not everyone has this name. A% C default (for manipulating files) is still a handle . FP
is one of the most used windows for taking care of the window.
The handle concept is more generic . It is an object that holds information relevant to accessing an external resource. It indicates what the feature is (an operating system or service identifier or a pointer).
A handler is the agent that will use an object, which will do some required action, usually in programming is its code written for the purpose of executing something over a handle .