ICAAttachment

[ 
    object, 
    uuid(FA840596-05D9-4B5A-854D-BA42D256F886), 
    dual, 
    nonextensible, 
    helpstring("ICAAttachment Interface"), 
    pointer_default(unique) 
] 
interface ICAAttachment : IDispatch{ 
    [propget, id(1), helpstring("property ID")] HRESULT ID([out, retval] LONG* pVal); 
    [propget, id(2), helpstring("property Name")] HRESULT Name([out, retval] BSTR* pVal); 
    [propput, id(2), helpstring("property Name")] HRESULT Name([in] BSTR newVal); 
    [propget, id(3), helpstring("property URL")] HRESULT URL([out, retval] BSTR* pVal); 
    [propput, id(3), helpstring("property URL")] HRESULT URL([in] BSTR newVal); 
    [propget, id(4), helpstring("property Size")] HRESULT Size([out, retval] LONG* pVal); 
    [propput, id(5), helpstring("property Text")] HRESULT Text([in] BSTR newVal); 
    [propget, id(6), helpstring("property Node")] HRESULT Node([out, retval] IDispatch** pVal); 
    [id(7), helpstring("method SaveToStream")] HRESULT SaveToStream([in] IStream* pStream); 
    [id(8), helpstring("method Update")] HRESULT Update([in] IStream* pStream); 
    [id(9), helpstring("method Delete")] HRESULT Delete(void); 
    [id(10), helpstring("method Reload")] HRESULT Reload(void); 
}; 
ProgID
CyberArticleBook.CAAttachment
C/C++头文件
CyberArticleBook.h; CyberArticleBook_i.c
 

属性 ID

获得附件ID

参数

类型

  • get: [out, retval] LONG* pVal
  • put: 无

属性 Name

获得/设置附件名称

参数

类型

  • get: [out, retval] BSTR* pVal:获得附件名称
  • put: [in] BSTR newVal:设置附件名称

属性 URL

获得/设置附件来源URL

参数

类型

  • get: [out, retval] BSTR* pVal:获得附件URL
  • put: [in] BSTR newVal:设置附件URL

属性 Size

获得附件数据大小

参数

类型

  • get: [out, retval] LONG* pVal:附件大小
  • put: 无

属性 Text

获得附件文字

参数

类型

  • get: [out, retval] BSTR* pVal:获得附件文字
  • put: 无

属性 Node

获得附件所属的文章。

参数

类型

  • get: [out, retval] IDispatch** pVal:附件所属的节点(ICANode)。
  • put: 无

方法 SaveToStream

将附件数据保存到Stream里面。

参数

  • [in] IStream* pStream:Stream对象,用来接收附件数据。

返回

方法 Update

更新附件数据。

参数

  • [in] IStream* pStream:Stream对象,包含附件数据的Stream。函数将会读取Stream里面的数据,然后保存到数据库中。

返回

方法 Delete

删除附件

参数

返回

方法 Reload

重新从数据库中获得附件的数据

参数

返回