请输入您要查询的百科知识:

 

词条 OleCreatePictureIndirect
释义

概述

创建一个新的图片对象初始化根据到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。

Remark

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

随便看

 

百科全书收录4421916条中文百科知识,基本涵盖了大多数领域的百科知识,是一部内容开放、自由的电子版百科全书。

 

Copyright © 2004-2023 Cnenc.net All Rights Reserved
更新时间:2024/11/15 12:37:43