SHPropertyBag_WritePOINTS

This function asks a property bag to write the members of a POINTS structure as values of a pair of named properties.

Declaration

HRESULT
SHPropertyBag_WritePOINTS (
    IPropertyBag *ppb,
    LPCWSTR pszPropName,
    const POINTS *pValue);

Parameters

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 the POINTS structure.

Return Value

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

Behaviour

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. The x and y members of the POINTS become respectively the LONG values of the “.x” and “.y” properties (after signed extension from 16 bits). If the function cannot write each property (using SHPropertyBag_WriteLONG), it fails.

Availability

The SHPropertyBag_WritePOINTS function is exported from SHLWAPI as ordinal 526 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.