OleCreatePictureIndirect
声明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。
RemarksThe 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