ICANode

[ 
    object, 
    uuid(E74AC0ED-D1D2-4BA8-8A0B-B95AC00744C6), 
    dual, 
    nonextensible, 
    helpstring("ICANode Interface"), 
    pointer_default(unique) 
] 
interface ICANode : IDispatch{ 
    [propget, id(1), helpstring("property ID")] HRESULT ID([out, retval] LONG* pVal); 
    [propget, id(2), helpstring("property ParentID")] HRESULT ParentID([out, retval] LONG* pVal); 
    [propput, id(2), helpstring("property ParentID")] HRESULT ParentID([in] LONG newVal); 
    [propget, id(3), helpstring("property ParentNode")] HRESULT ParentNode([out, retval] IDispatch** pVal); 
    [propput, id(3), helpstring("property ParentNode")] HRESULT ParentNode([in] IDispatch* newVal); 
    [propget, id(4), helpstring("property Type")] HRESULT Type([out, retval] LONG* pVal); 
    [propget, id(5), helpstring("property Pos")] HRESULT Pos([out, retval] ULONG* pVal); 
    [propput, id(5), helpstring("property Pos")] HRESULT Pos([in] ULONG newVal); 
    [propget, id(6), helpstring("property DateCreated")] HRESULT DateCreated([out, retval] DATE* pVal); 
    [propput, id(6), helpstring("property DateCreated")] HRESULT DateCreated([in] DATE newVal); 
    [propget, id(7), helpstring("property DateModified")] HRESULT DateModified([out, retval] DATE* pVal); 
    [propput, id(7), helpstring("property DateModified")] HRESULT DateModified([in] DATE newVal); 
    [propget, id(8), helpstring("property DateAccessed")] HRESULT DateAccessed([out, retval] DATE* pVal); 
    [propput, id(8), helpstring("property DateAccessed")] HRESULT DateAccessed([in] DATE newVal); 
    [propget, id(9), helpstring("property Unread")] HRESULT Unread([out, retval] VARIANT_BOOL* pVal); 
    [propput, id(9), helpstring("property Unread")] HRESULT Unread([in] VARIANT_BOOL newVal); 
    [propget, id(10), helpstring("property HasAttachment")] HRESULT HasAttachment([out, retval] VARIANT_BOOL* pVal); 
    [propget, id(11), helpstring("property Color")] HRESULT Color([out, retval] BSTR* pVal); 
    [propput, id(11), helpstring("property Color")] HRESULT Color([in] BSTR newVal); 
    [propget, id(12), helpstring("property BgColor")] HRESULT BgColor([out, retval] BSTR* pVal); 
    [propput, id(12), helpstring("property BgColor")] HRESULT BgColor([in] BSTR newVal); 
    [propget, id(13), helpstring("property Color2")] HRESULT Color2([out, retval] LONG* pVal); 
    [propput, id(13), helpstring("property Color2")] HRESULT Color2([in] LONG newVal); 
    [propget, id(14), helpstring("property BgColor2")] HRESULT BgColor2([out, retval] LONG* pVal); 
    [propput, id(14), helpstring("property BgColor2")] HRESULT BgColor2([in] LONG newVal); 
    [propget, id(15), helpstring("property IconIndex")] HRESULT IconIndex([out, retval] ULONG* pVal); 
    [propput, id(15), helpstring("property IconIndex")] HRESULT IconIndex([in] ULONG newVal); 
    [propget, id(16), helpstring("property Size")] HRESULT Size([out, retval] ULONG* pVal); 
    [propget, id(17), helpstring("property Title")] HRESULT Title([out, retval] BSTR* pVal); 
    [propput, id(17), helpstring("property Title")] HRESULT Title([in] BSTR newVal); 
    [propget, id(18), helpstring("property Owner")] HRESULT Owner([out, retval] BSTR* pVal); 
    [propget, id(19), helpstring("property FileType")] HRESULT FileType([out, retval] BSTR* pVal); 
    [propput, id(19), helpstring("property FileType")] HRESULT FileType([in] BSTR newVal); 
    [propget, id(20), helpstring("property Author")] HRESULT Author([out, retval] BSTR* pVal); 
    [propput, id(20), helpstring("property Author")] HRESULT Author([in] BSTR newVal); 
    [propget, id(21), helpstring("property Keywords")] HRESULT Keywords([out, retval] BSTR* pVal); 
    [propput, id(21), helpstring("property Keywords")] HRESULT Keywords([in] BSTR newVal); 
    [propget, id(22), helpstring("property Label1")] HRESULT Label1([out, retval] BSTR* pVal); 
    [propput, id(22), helpstring("property Label1")] HRESULT Label1([in] BSTR newVal); 
    [propget, id(23), helpstring("property Label2")] HRESULT Label2([out, retval] BSTR* pVal); 
    [propput, id(23), helpstring("property Label2")] HRESULT Label2([in] BSTR newVal); 
    [propget, id(24), helpstring("property Label3")] HRESULT Label3([out, retval] BSTR* pVal); 
    [propput, id(24), helpstring("property Label3")] HRESULT Label3([in] BSTR newVal); 
    [propget, id(25), helpstring("property Label4")] HRESULT Label4([out, retval] BSTR* pVal); 
    [propput, id(25), helpstring("property Label4")] HRESULT Label4([in] BSTR newVal); 
    [propget, id(26), helpstring("property Label5")] HRESULT Label5([out, retval] BSTR* pVal); 
    [propput, id(26), helpstring("property Label5")] HRESULT Label5([in] BSTR newVal); 
    [propget, id(27), helpstring("property URL")] HRESULT URL([out, retval] BSTR* pVal); 
    [propput, id(27), helpstring("property URL")] HRESULT URL([in] BSTR newVal); 
    [propget, id(28), helpstring("property Comments")] HRESULT Comments([out, retval] BSTR* pVal); 
    [propput, id(28), helpstring("property Comments")] HRESULT Comments([in] BSTR newVal); 
    [propget, id(29), helpstring("property Text")] HRESULT Text([out, retval] BSTR* pVal); 
    [propget, id(30), helpstring("property Article")] HRESULT Article([out, retval] IDispatch** pVal); 
    [propget, id(31), helpstring("property HasPassword")] HRESULT HasPassword([out, retval] VARIANT_BOOL* pVal); 
    [propput, id(32), helpstring("property Password")] HRESULT Password(BSTR bstrPassword); 
    [propget, id(33), helpstring("property Children")] HRESULT Children([out, retval] IDispatch** pVal); 
    [propget, id(34), helpstring("property Attachments")] HRESULT Attachments([out, retval] IDispatch** pVal); 
    [propget, id(35), helpstring("property ProfileName")] HRESULT ProfileName([out, retval] BSTR* pVal); 
    [propget, id(36), helpstring("property SaveItem")] HRESULT SaveItem([out, retval] BSTR* pVal); 
    [propget, id(37), helpstring("property Book")] HRESULT Book([out, retval] IDispatch** pVal); 
    [id(38), helpstring("method SetNewPassword")] HRESULT SetNewPassword([in] BSTR bstrNewPassword, [in] long nFlags); 
    [id(39), helpstring("method InitArticle")] HRESULT InitArticle([in] BSTR bstrText, [in] BSTR bstrURL, [in] IDispatch* pProfile); 
    [id(40), helpstring("method MoveTo")] HRESULT MoveTo([in] IDispatch* pDispNodeTo, [in] VARIANT_BOOL bCopy, [out, retval] IDispatch** pDispNewNode); 
    [id(41), helpstring("method MoveToRecycleBin")] HRESULT MoveToRecycleBin(void); 
    [id(42), helpstring("method Delete")] HRESULT Delete(void); 
    [id(43), helpstring("method Reload")] HRESULT Reload(void); 
    [id(44), helpstring("method ReloadFromFile")] HRESULT ReloadFromFile([in] BSTR bstrFileName); 
    [id(45), helpstring("method FindChildNode")] HRESULT FindChildNode([in] BSTR bstrNodeTitle, [out,retval] IDispatch** ppChildDisp); 
    [id(46), helpstring("method NeedPassword")] HRESULT NeedPassword(void); 
    [id(47), helpstring("method AddAttachment")] HRESULT AddAttachment([in] BSTR bstrFileName, [out,retval] IDispatch** ppAttachmentDisp); 
    [id(48), helpstring("method IsIn")] HRESULT IsIn([in] LONG nFolderID); 
    [id(49), helpstring("method InitArticleIndirect")] HRESULT InitArticleIndirect([in] VARIANT vArticle, [in] VARIANT vAttachments); 
    [id(50), helpstring("method SetPasswordStorage")] HRESULT SetPasswordStorage([in] VARIANT vPasswordStorage); 
    [id(51), helpstring("method DecryptOther")] HRESULT DecryptOther([in] VARIANT vPasswordStorage); 
    [id(52), helpstring("method GetPrevSiblingNode")] HRESULT GetPrevSiblingNode([out,retval] IDispatch** ppNodeDisp); 
    [id(53), helpstring("method GetNextSiblingNode")] HRESULT GetNextSiblingNode([out,retval] IDispatch** ppNodeDisp); 
    [id(54), helpstring("method GetTitlePath")] HRESULT GetTitlePath([in] VARIANT_BOOL bIncludeSelf, [in] VARIANT_BOOL bIncludeBookName, [out,retval] BSTR* pbstrPath); 
    [id(55), helpstring("method GetArticleData")] HRESULT GetArticleData([in] IUnknown* pStreamUnk); 
    [id(56), helpstring("method SetArticleData")] HRESULT SetArticleData([in] IUnknown* pStreamUnk); 
    [propget, id(57), helpstring("property Attribute")] HRESULT Attribute([in] BSTR bstrAttributeName, [out, retval] BSTR* pVal); 
    [propput, id(57), helpstring("property Attribute")] HRESULT Attribute([in] BSTR bstrAttributeName, [in] BSTR newVal); 
    [propget, id(58), helpstring("property NodeGUID")] HRESULT NodeGUID([out, retval] BSTR* pVal); 
    [id(59), helpstring("method FindChildNodeEx")] HRESULT FindChildNodeEx([in] BSTR bstrNodeTitle, [in] long nFlags, [out,retval] IDispatch** ppChildDisp); 
    [id(60), helpstring("method MoveToEx")] HRESULT MoveToEx([in] IDispatch* pDispProgress, [in] IDispatch* pDispNodeTo, [in] VARIANT_BOOL bCopy, [out, retval] IDispatch** pDispNewNode); 
    [id(61), helpstring("method DeleteEx")] HRESULT DeleteEx([in] IDispatch* pDispProgress); 
    [id(62), helpstring("method MoveToRecycleBinEx")] HRESULT MoveToRecycleBinEx([in] IDispatch* pDispProgress); 
    [propget, id(63), helpstring("property ExtInfo")] HRESULT ExtInfo([in] BSTR bstrName, [out, retval] BSTR* pVal); 
    [propput, id(63), helpstring("property ExtInfo")] HRESULT ExtInfo([in] BSTR bstrName, [in] BSTR newVal); 
    [id(64), helpstring("method RemoveAttribute")] HRESULT RemoveAttribute([in] BSTR bstrAttributeName); 
    [id(65), helpstring("method RemoveExtInfo")] HRESULT RemoveExtInfo([in] BSTR bstrName); 
}; 
 
ProgID
CyberArticleBook.CANode
C/C++头文件
CyberArticleBook.h; CyberArticleBook_i.c
 

属性 ID

获得节点ID

参数

类型

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

属性 ParentID

获得/设置父节点ID。相当于移动节点

参数

类型

  • get: [out, retval] LONG* pVal
  • put: [in] long newVal

属性 ParentNode([out, retval] IDispatch** pVal)

获得/设置父节点。相当于移动节点

参数

类型

  • get: [out, retval] IDispatch** pVal
  • put: [in] IDispatch* pVal

属性 Type

获得节点属性。0:文件夹;1:文章

参数

类型

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

属性 Pos([out, retval] ULONG* pVal)

获得/设置节点的排列顺序

参数

类型

  • get: [out, retval] ULONG* pVal
  • put: [in] ULONG newVal

属性 DateCreated

获得/设置节点创建日期时间

参数

类型

  • get: [out, retval] DATE* pVal
  • put: [in] DATE newVal

属性 DateModified

获得/设置节点修改日期时间

参数

类型

  • get: [out, retval] DATE* pVal
  • put: [in] DATE newVal

属性 DateAccessed

获得/设置节点访问日期时间

参数

类型

  • get: [out, retval] DATE* pVal
  • put: [in] DATE newVal

属性 Unread

获得/设置节点是否已读

参数

类型

  • get: [out, retval] VARIANT_BOOL* pVal
  • put: [in] VARIANT_BOOL newVal

属性 HasAttachment

获得文章是否有附件

参数

类型

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

属性 Color

获得/设置节点的文字颜色。HTML格式(#XXXXXX)

参数

类型

  • get: [out, retval] BSTR* pVal
  • put: [in] BSTR newVal

属性 BgColor

获得/设置节点的背景色。HTML格式(#XXXXXX)

参数

类型

  • get: [out, retval] BSTR* pVal
  • put: [in] BSTR newVal

属性 Color2

获得/设置节点文字颜色。Windows RGB值

参数

类型

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

属性 BgColor2([out, retval] LONG* pVal)

获得/设置节点背景颜色。Windows RGB值

参数

类型

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

属性 IconIndex

获得/设置节点图标

参数

类型

  • get: [out, retval] ULONG* pVal
  • put: [in] ULONG newVal

属性 Size

获得文章数据的大小

参数

类型

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

属性 Title

获得/设置节点标题

参数

类型

  • get: [out, retval] BSTR* pVal
  • put: [in] BSTR newVal

属性 Owner()

获得节点的所有者(创建节点的Windows用户名)

参数

类型

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

属性 FileType

获得/设置节点的文件类型(扩展名,例如.htm, .png, .jpg等)

参数

类型

  • get: ([out, retval] BSTR* pVal)
  • put: [in] BSTR newVal

属性 Author

获得/设置文章的作者

参数

类型

  • get: [out, retval] BSTR* pVal
  • put: [in] BSTR newVal

属性 Keywords

获得/设置文章的关键字

参数

类型

  • get: [out, retval] BSTR* pVal
  • put: [in] BSTR newVal

属性 Label1

获得/设置节点的Label1

参数

类型

  • get: [out, retval] BSTR* pVal
  • put: [in] BSTR newVal

属性 Label2

获得/设置节点的Label2

参数

类型

  • get: [out, retval] BSTR* pVal
  • put: [in] BSTR newVal

属性 Label3

获得/设置节点的Label3

参数

类型

  • get: [out, retval] BSTR* pVal
  • put: [in] BSTR newVal

属性 Label4

获得/设置节点的Label4

参数

类型

  • get: [out, retval] BSTR* pVal
  • put: [in] BSTR newVal

属性 Label5

获得/设置节点的Label5

参数

类型

  • get: [out, retval] BSTR* pVal
  • put: [in] BSTR newVal

属性 URL

获得/设置文章的URL

参数

类型

  • get: [out, retval] BSTR* pVal
  • put: [in] BSTR newVal

属性 Comments

获得/设置文章的Comments

参数

类型

  • get: [out, retval] BSTR* pVal
  • put: [in] BSTR newVal

属性 Text

获得文章的Text

参数

类型

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

属性 Article

获得文章对象(ICAArticle)

参数

类型

  • get: [out, retval] IDispatch** pVal  (ICAArticle)
  • put: 无

属性 HasPassword([out, retval] VARIANT_BOOL* pVal)

判断文章是否被加密。

参数

类型

  • get: [out, retval] VARIANT_BOOL* pVal。VARIANT_TRUE:被加密;VARIANT_FALSE:没有加密
  • put: 无

属性 Password

设置用于解密文章的密码

参数

类型

  • get: [out, retval] BSTR bstrPassword
  • put: 无

属性 Children

获得文件夹的子节点

参数

类型

  • get: [out, retval] IDispatch** pVal (ICANodeCollection)
  • put: 无

属性 Attachments

获得文章的所有附件

参数

类型

  • get: [out, retval] IDispatch** pVal (ICAAttachmentCollection)
  • put: 无

属性 ProfileName

获得用来保存文章的配置文件名

参数

类型

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

属性 SaveItem

获得文章保存的类型

参数

类型

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

属性 Book([out, retval] IDispatch** pVal)

获得节点所在的书籍

参数

类型

  • get: [out, retval] IDispatch* pVal (ICABook)
  • put: 无

方法 SetNewPassword

设置用来加密文章的新密码。如果文章已经被加密,需要首先通过Password设置原有的密码,才可以更改密码。

参数

  • [in] BSTR bstrNewPassword:新密码
  • [in] long nFlags:加密选项

返回

注意

//nFlags可能的值
#define HASPASSWORD_ARTICLE       0x01 
#define HASPASSWORD_TITLE         0x02 
#define HASPASSWORD_URL           0x04 

方法 InitArticle

用来设置文章数据。

参数

  • [in] BSTR bstrText:文章HTML文字
  • [in] BSTR bstrURL:文章URL
  • [in] IDispatch* pProfile:用来保存文件的配置文件(ICAProfile)

返回

方法 MoveTo

将节点移动/复制到其他文件夹

参数

  • [in] IDispatch* pDispNodeTo:目录文件夹
  • [in] VARIANT_BOOL bCopy:是否是复制操作:VARIANT_TRUE:复制,VARIANT_FALSE:移动

返回

  • [out, retval] IDispatch** pDispNewNode

方法 MoveToRecycleBin

将节点移动到回收站。如果已经在回收站,则删除节点。

参数

返回

方法 Reload

重新从书籍中获得(刷新)节点所有数据

参数

返回

方法 ReloadFromFile

从XML文件中获得节点数据

参数

  • [in] BSTR bstrFileName:文件名

返回

方法 FindChildNode(, )

通过节点标题路径查找子节点。标题之间通过反斜杠(\)分割。

参数

  • [in] BSTR bstrNodeTitle:标题路径

返回

  • [out,retval] IDispatch** ppChildDisp:返回查找到的节点

方法 NeedPassword(void)

判断是否需要密码。C++或其它高级语言使用,通过返回值S_OK(需要密码)或者S_FALSE(不需要密码)判断

参数

返回

方法 AddAttachment

为文章添加附件

参数

  • [in] BSTR bstrFileName:附件文件名

返回

  • [out,retval] IDispatch** ppAttachmentDisp:新增的附件(ICAAttachment)

方法 IsIn

判断节点是否在某一个文件夹内。C++或其它高级语言使用,通过返回值S_OK(在某一个文件夹内)或者S_FALSE(不在)判断

参数

  • [in] LONG nFolderID:文件夹ID

返回

方法 InitArticleIndirect

直接初始化文章

参数

保留

返回

保留

方法 SetPasswordStorage

设置密码存储器

参数

保留

返回

保留

方法 DecryptOther

解密文章标题,URL。

参数

保留

返回

保留

方法 GetPrevSiblingNode

获得当前节点同级的前一个节点。

参数

返回

  • [out,retval] IDispatch** ppNodeDisp:前一个节点(ICANode)

方法 GetNextSiblingNode

获得当前节点同级的后一个节点。

参数

返回

  • [out,retval] IDispatch** ppNodeDisp:后一个节点(ICANode)

方法 GetTitlePath

获得当前节点在书籍中的标题路径。通过反斜杠(\)分割标题。

参数

  • [in] VARIANT_BOOL bIncludeSelf:是否包含自身标题
  • [in] VARIANT_BOOL bIncludeBookName:是否包含书籍名

返回

  • [out,retval] BSTR* pbstrPath:标题路径。

方法 GetArticleData

直接读取文章数据到IStream对象里面。文章数据是一个ZIP压缩包。保存成文件后,可以通过解压缩软件(WinZIP, WinRAR等)解压缩。

参数

  • [in] IUnknown* pStreamUnk:IStream对象,用来接收文章数据

返回

方法 SetArticleData

直接设置文章数据到数据库里面。文章数据是一个ZIP压缩包。保存成文件后,可以通过解压缩软件(WinZIP, WinRAR等)解压缩。

参数

  • [in] IUnknown* pStreamUnk:IStream对象,用来保存文章数据。ICANode直接从里面获得数据,保存到数据库中。

返回

属性 Attribute

获得/设置节点自定义属性。属性名不超过50个字符,属性值不超过255个字符。

参数

  • [in] BSTR bstrAttributeName:属性名。

类型

  • get: [out, retval] BSTR* pVal
  • put: [in] BSTR newVal

属性 NodeGUID

获得节点的GUID

参数

类型

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

方法 FindChildNodeEx

通过标题查找子节点。

参数

  • [in] BSTR bstrNodeTitle:子节点标题
  • [in] long nFlags:选项:

返回

  • [out,retval] IDispatch** ppChildDisp:返回找到的字节点。
说明:
//nFlags值
#define FCN_EX_FIND_FOLDER        0x01         //查找文件夹
#define FCN_EX_FIND_ARTICLE       0x02         //查找文章

方法 MoveToEx

保留

方法 DeleteEx

保留

方法 MoveToRecycleBinEx

保留

属性 ExtInfo

获得/设置节点自定义扩展信息。属性名不超过50个字符,扩展信息长度没有限制。

参数

  • [in] BSTR bstrName:信息名。

类型

  • get: [out, retval] BSTR* pVal
  • put: [in] BSTR newVal

方法 RemoveAttribute

删除节点扩展信息

参数

  • [in] BSTR bstrAttributeName:属性名

返回

方法 RemoveExtInfo

删除节点扩展信息

参数

  • [in] BSTR bstrName:信息名

返回