How to DFCLib library in VB.Net

Options
demet_203
edited November 27, 2014 in Documentum #1

I want to convert object to Idfdocument in VB.NET

Id = m_DfClientX.getId(itemID) 'itemID string If (Id IsNot Nothing) Then sysObj = CType(session.getObject(Id), IDfSysObject) nesne = sysObj.getContent()

Dim doc As IDfDocument = CType(nesne, IDfDocument) ***exceptionnn

Exception is:'System._Object' türündeki COM nesnesi 'DFCLib.IDFDocument' arabirim türüne atanamadı. '{EFAC2D68-175B-9927-006097C27C31}' IID'sine sahip arabirim için COM bileşenindeki QueryInterface çağrısı aşağıdaki hatayla başarısız olduğundan bu işlem başarısız oldu. Böyle bir arabirim desteklenmiyor. (HRESULT özel durum döndürdü:0x80004002 (E_NOININTERFACE)).

Comments

  • michelle8
    edited November 20, 2014 #2
    Options

    Hello Demet,

    Many apologies for the late response; you have posted your question in the ECN Help space.

    I will move it to Documentum space where it is likely to generate some great responses.

  • aflowers001
    edited November 27, 2014 #3
    Options

    if nesne is the result of getContent then it is, in Java terms, a ByteArrayInputStream hence it cannot ever be converted to an IDfDocument instance. This is all in the JavaDoc.

    Is IDfDocument is a subclass/interface of IDfSysObject and as the getObject() call can return an IDfDocument try

    Id = m_DfClientX.getId(itemID) 'itemID string

    If (Id IsNot Nothing) Then sysObj = CType(session.getObject(Id), IDfDocument)

    OR

    Dim doc As IDfDocument = CType(sysObj, IDfDocument)