This function asks a property bag to read a pair of named properties as a POINTS structure.


SHPropertyBag_ReadPOINTS (
    IPropertyBag *ppb,
    LPCWSTR pszPropName,
    POINTS *pValue);


The ppb argument provides the address of an IPropertyBag interface.

The pszPropName argument provides the address of a null-terminated Unicode string that names the property pair.

The pValue argument provides the address of a variable that is to receive the property values as a POINTS structure.

Return Value

The function returns zero for success, else an error code.


If any of the ppb, pszPropName and pValue arguments are NULL, the function fails, with E_INVALIDARG as the error code. The names of the two properties are formed by appending “.x” and “.y” to the base name of the pair. If this cannot be done within MAX_PATH characters, the function fails, with E_FAIL as the error code. If the function cannot read each property as a signed integer (using SHPropertyBag_ReadLONG), it fails. The LONG values of the “.x” and “.y” properties become respectively the x and y members of the POINTS after truncation to 16 bits.


The SHPropertyBag_ReadPOINTS function is exported from SHLWAPI as ordinal 525 in version 6.00.

Though this function dates from 2001, it was still not documented by Microsoft in the MSDN Library at least as late as the CD edition dated January 2004.