OleCreatePictureIndirect function (olectl.h)
Creates a new picture object initialized according to a PICTDESC structure.
WINOLECTLAPI OleCreatePictureIndirect( [in] LPPICTDESC lpPictDesc, [in] REFIID riid, [in] BOOL fOwn, [out] LPVOID *lplpvObj );
Pointer to a caller-allocated structure containing the initial state of the picture. The specified structure can be NULL to create an uninitialized object, in the event the picture needs to initialize via IPersistStream::Load.
Reference to the identifier of the interface describing the type of interface pointer to return in lplpvObj.
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.
Address of pointer variable that receives the interface pointer requested in riid. Upon successful return, this parameter contains the requested interface pointer on the newly created 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 is set to NULL.
This function returns S_OK on success. Other possible values include the following.
||The object does not support the interface specified in riid.|
||The address in pPictDesc or lplpvObj is not valid. For example, it may be NULL.|
The fOwn parameter indicates whether the picture is to own the GDI picture handle for the picture it contains, so that the picture object will destroy its picture when the object itself is destroyed. The function returns an interface pointer to the new picture object specified by the caller in the riid parameter. A QueryInterface is built into this call. The caller is responsible for calling Release through the interface pointer returned.
|Minimum supported client||Windows 2000 Professional [desktop apps only]|
|Minimum supported server||Windows 2000 Server [desktop apps only]|