我有documentum開發人員版本6.6。我想在C#中使用DFC獲取文檔內容(將內容讀入流)。我用下面的C#.NET代碼如何在C中使用DFC獲取文檔內容#
IDfId id = collection.getId("r_object_id");
IDfDocument doc = (IDfDocument) session.getObject(id);
但它拋出以下異常。
Exception: Unable to cast COM object of type 'System.__ComObject' to interface type 'DFCLib.IDfDocument'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{EFAC2D68-175B-11D2-9927-006097C27C31}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
我也試過下面的方法(它運行成功),但我不知道如何將內容讀入流或內存流。
IDfId id = collection.getId("r_object_id");
IDfSysObject sysObject = (IDfSysObject) session.getObject(id);