Creates a new picture object initialized according to a PICTDESC structure, which can be NULL to create an uninitialized object if the caller wishes to have the picture initialize itself through IPersistStream::Load. 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.
STDAPI OleCreatePictureIndirect(
PICTDESC* pPictDesc,
//Pointer to the structure of parameters for picture
REFIID riid, //Reference to the identifier of the interface
BOOL fOwn, //Whether the picture is to be destroyed
VOID** ppvObj //Address of output variable that receives the
// interface pointer requested in riid
);
This function supports the standard return values E_INVALIDARG, E_OUTOFMEMORY, and E_UNEXPECTED, as well as the following:
Windows NT: Use version 4.0 or later.
Windows: Use Windows 95 or later.
Windows CE: Unsupported.
Header: Declared in olectl.h.
Import Library: Included as a resource in olepro32.dll.