Header annotations are added to many header files ( windows ). These are nothing but a way to specify how a function uses its parameters and returns value. This helps programmers to know if they are using Windows API in correct way. If you are using code analysis in Visual Studio then, you will see the compiler warnings if the functions are not used as specified by header annotations.
Header annotations are of two types.
Buffer Annotations
These are used to specify the pointers used in the function’s. They help to detect the buffer overrun. They generally specify the size and the length of the buffer.
ex.
_bcount
_ecount
_dref
_in
_out
_inout
Advanced Annotations
This type of annotations provides additional information about parameters and return values used in the functions.
For ex.
__nullnullterminated
__nullterminated
__callback
__checkReturn