Функция OleCreatePictureIndirect

Declare Function OleCreatePictureIndirect Lib "olepro32.dll" (PicDesc As PicBmp, RefIID As GUID, ByVal fPictureOwnsHandle As Long, IPic As IPicture) As Long
OleCreatePictureIndirect создает новый растровый OLE-объект, используя дескриптор картинки

Возвращаемое значение

Функция возвращает одно из следующих значений:
S_OKНовый растровый объект успешно создан
E_NOINTERFACEОбъект не поддерживает интерфейс, заданный в RefIID
E_POINTERАдрес в PicDesc или в IPic не действителен. Например, может быть 0

Параметры

PicDesc
Pointer to a caller-allocated structure containing the initial state of the picture
RefIID
Reference to the identifier of the interface describing the type of interface pointer to return in ppvObj
fPictureOwnsHandle
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
IPic
Address of pointer variable that receives the interface pointer requested in riid. Upon successful return, *ppvObj 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 of *ppvObj is set to NULL

Пример

смотри примеры icon.zip и fromdll.zip

Смотри также

OleLoadPicture

Категория

Графика