IPicture::get_Handle

Returns the Windows GDI handle of the picture managed within this picture object to a specified location.

HRESULT get_Handle(
  OLE_HANDLE* phandle  //Receives a pointer to GDI handle
);
 

Parameters

phandle
[out] Pointer to the caller's OLE_HANDLE variable that receives the handle. The caller is responsible for this handle upon successful return. 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.
E_POINTER
The address in phandle is not valid. For example, it may be NULL.

Remarks

Notes to Callers

The picture object may retain ownership of the picture; however, the caller can be assured that the picture will remain valid until either the caller specifically destroys the picture or the picture object is itself destroyed. The fOwn parameter to OleCreatePictureIndirect determines ownership when the picture object is created. OleLoadPicture forces fOwn to TRUE.

QuickInfo

  Windows NT: Use version 4.0 or later.
  Windows: Use Windows 95 or later.
  Windows CE: Unsupported.
  Header: Declared in ocidl.h.