A | B | C |  D | E | F |  G | H | I |  J | K | L |  M | N | O |  P | Q | R |  S | T | U |  V | W | X |  Y | Z


Creates a new picture object initialized according to a PICTDESC structure.

Declare Function OleCreatePictureIndirect Lib "olepro32.dll" (PicDesc As PicBmp, RefIID As GUID, ByVal fPictureOwnsHandle As Long, IPic As IPicture) As Long

Operating Systems Supported
Requires Windows NT 4.0 or later; Requires Windows 95 or later


Parameter Information
- pPictDesc
[in] Pointer to a caller-allocated structure containing the initial state of the picture.

- riid
[in] Reference to the identifier of the interface describing the type of interface pointer to return in ppvObj.

- fOwn
[in] If TRUE, the picture object is to destroy its picture when the object is destroyed. If FALSE, the caller is responsible for destroying the picture.

- ppvObj
[out] Indirect pointer to the initial interface pointer on the new object. If the call is successful, the caller is responsible for calling Release through this interface pointer when the new object is no longer needed. If the call fails, the value of ppvObj is set to NULL.

Return Values
This function supports the standard return values E_INVALIDARG, E_OUTOFMEMORY, and E_UNEXPECTED, as well as the following:


The new picture object was created successfully.


The object does not support the interface specified in riid.


The address in pPictDesc or ppvObj is not valid. For example, it may be NULL.

Last update: 07 April 2006