I have documentum developer edition 6.6. I want to get document content (read content into stream) using DFC in c#. I have used following C#.net code
IDfId id = collection.getId("r_object_id");
IDfDocument doc = (IDfDocument) session.getObject(id);
but it throws following exception.
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)).
I also tried following method(it runs successfully) but i don't know how to read content into stream or memory stream.
IDfId id = collection.getId("r_object_id");
IDfSysObject sysObject = (IDfSysObject) session.getObject(id);