代码改变世界

ImportExportFavorites 函数被微软干掉了

2007-08-19 18:22  电脑人生  阅读(209)  评论(0编辑  收藏  举报

今天运行以前写的一个导入导出IE收藏夹的程序,报错:“对象不支持该操作”

找了下原因:

HRESULT ImportExportFavorites( VARIANT_BOOL fImport,
    BSTR strImpExpPath
);
Parameters

fImport
[in] A VARIANT_BOOL that specifies one of the following possible values.
VARIANT_TRUE
Import is requested.
VARIANT_FALSE
Export is requested.
strImpExpPath
[in] A BSTR that specifies the location (URL) to import or export, depending on fImport. If a value is an empty string, a file dialog box is displayed.
Return Value

Returns S_OK if successful, or an error value otherwise.

Remarks

Note  Internet Explorer 6 for Microsoft Windows XP Service Pack 2 (SP2) and later. This method is no longer available.

原来是被MS 干掉了,汗。。。