OleCreatePictureIndirect

OleCreatePictureIndirect,函式名稱,創建一個新的圖片對象初始化根據到PICTDESC結構。

基本介紹

  • 中文名:OleCreatePictureIndirect
  • 類型:函式名稱
  • 最低個人系統:Windows 2000 高級版
  • 頭檔案:OleCtl.h
概述,語法,參數,聲明,參數,Remarks,環境要求,

概述

創建一個新的圖片對象初始化根據到PICTDESC結構。

語法

HRESULT OleCreatePictureIndirect(
__in LPPICTDESC lpPictDesc,
__in REFIID riid,
__in BOOL fOwn,
__out LPVOID *lplpvObj
);

參數

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.

聲明

Declare Function OleCreatePictureIndirect Lib "oleaut32.dll" (lpDicDesc As TypeIcon, riid As CLSID, ByVal fOwn As Long, lpUnk As Object) As Long
Public Type TypeIcon
cbSize As Long
picType As PictureTypeConstants
hIcon As Long
End Type
Public Type CLSID
id(16) As Byte
End Type

參數

lpDicDesc 一個包含圖片狀態的結構
riid 接口標識符的引用,它描述了接口的類型。
fOwn 如果為真,圖片對象在對象被破壞時摧毀它的圖片。如果為FALSE,調用者負責摧毀圖片。
lpUnk 接收riid參數的接口指針。當成功返回時,該參數包含了所需的新創建對象的接口指針。如果調用成功,調用者可以使用Release 函式來釋放這個對象。如果調用失敗,該參數值為NULL。

Remarks

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.

環境要求

最低個人系統:Windows 2000 高級版
最低伺服器系統Windows 2000 Server
頭檔案:OleCtl.h
庫檔案:OleAut32.lib
DLL檔案:OleAut32.dll

相關詞條

熱門詞條

聯絡我們