I've heard that it can create an StdPicture or IPictureDisp object, when given the handle to a Bitmap. Unfortunately I don't have the slightest clue how to use this API call. It sounds like it could be a very powerful tool in graphics programming, but I don't have the slightest clue how to use it. It would be very helpful if someone would show me how to use it. I'm using VB6, so please don't give any code samples for VB.net or newer.

The MS description of the parameters is very cryptic:

lpPictDesc [in]
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.

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

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.

lplpvObj [out]
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.
The only parameter I understand is the fOwn parameter. If I set it to FALSE, I'll have to separately destroy the Bitmap object with the DeleteObject API call. If I set it to TRUE, the Bitmap object will completely part of the StdPicture object created, and will therefore be destroyed when I use
Code:
Set MyStdPic = Nothing
to destroy my StdPicture object.

The other parameters I don't know about. I don't even know how to send the output of this API call to a given StdPicture object (such as MyStdPic in the above example code).

Please help me out here.

Thanks in advance.