Geoff Chappell - Software Analyst
SKETCH OF HOW RESEARCH MIGHT CONTINUE AND RESULTS BE PRESENTED
HRESULT SHWindowsPolicyGetValue ( REFGUID rpolid, PVOID pvData, DWORD *pcbData);
The rpolid argument provides by reference a GUID for the policy whose value is wanted. The supported policy identifiers are listed separately, since there are very many.
The pvData argument provides the address of a buffer that is to receive data that is the policy’s value. This argument can be NULL to mean that there is no buffer and that the data is not wanted.
The pcbData argument provides the address of a variable that plays different roles on input and output. On input, the variable provides the size of the buffer, in bytes. This size is ignored if pvData is NULL, because there is then no buffer. On output, the variable receives the size of the data, in bytes. This argument can be NULL to mean that the size of the buffer is zero (if a buffer is even given) and that the size of the data is not wanted.
The function returns zero for success, else an error code.
Of particular interest are the cases in which the value is accessible but has more data than can fit in the given buffer, including because there is no buffer:
The SHWindowsPolicyGetValue function is exported from SHLWAPI as ordinal 560 in version 6.0 from Windows XP SP2 and Windows Server 2003 SP1, and higher.