IPicture::get_hPal method (ocidl.h)

Retrieves a copy of the palette currently used by the picture object.

Syntax

HRESULT get_hPal(
  [out] OLE_HANDLE *phPal
);

Parameters

[out] phPal

A pointer to a variable that receives the palette handle. The variable is set to NULL on failure.

Return value

This method supports the standard return values E_FAIL and E_OUTOFMEMORY, as well as the following values.

Return code Description
S_OK
The height was returned successfully.
S_FALSE
This picture has no palette. The variable that phpal points to was set to NULL.
E_POINTER
The value of phPal is not valid. For example, it may be NULL.

Remarks

Notes to Callers

If the picture object has ownership of the picture, it also has ownership of the palette and will destroy it when the object is itself destroyed. Otherwise the caller owns the palette. The fOwn parameter to OleCreatePictureIndirect determines ownership. OleLoadPicture sets fOwn to TRUE to indicate that the picture object owns the palette.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header ocidl.h

See also

IPicture