# IPicture::get_hPal

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

HRESULT get_hPal(

OLE_HANDLE* phpal | //Receives a pointer to palette handle
); |

Parameters

phpal
  [out] Pointer to the caller’s OLE_HANDLE variable to receive the palette handle. The variable is set to NULL on failure.

Return Values

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

S_OK
  The handle was returned successfully.
S_FALSE
  This picture has no palette. The parameter *phpal is set to NULL.
E_POINTER
  The address in 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.