These are attributes telling the operating system that the parameter following the attribute is an input as well as an output parameter. In some cases, you need only one of them; and in some other cases you need both. To decide whether you need either of these attributes, you should check MSDN for the particular function you are using.
For example, consider the
[
GetWindowPlacement] function, which is declared as:
BOOL WINAPI GetWindowPlacement(
_In_ HWND hWnd,
_Inout_ WINDOWPLACEMENT *lpwndpl
);
So it is easy to see that the
lpwndpl
parameter needs to be declared in your code with both of these parameters.