In http://msdn.microsoft.com/en-us/library/vstudio/ms164519(v=vs.100).aspx, there is
HRESULT VirtualProtect (
[in] void* lpAddress,
[in] SIZE_T dwSize,
[in] DWORD flNewProtect,
[out] DWORD* pflOldProtect
);
What do the [in] and [out] mean?
That's showing which parameters are "inputs" and which are "outputs". In this case, the address, size, and new protect flags are all read in, and *pflOldProtect
is written to as an output.