Method Returning collection of Object


  • Anonymous


    I am trying to write a com program to call below GetSlideInfo method. I am getting IJIComObject for 4A6512DA-10EC-415E-B31A-7F54414C5BBE but this interface does not support IDispatch so I used below code. This com application is old and not a single developer is available to provide more information, so from the below info I have to write the code to call that method and retrieve the data. Please help me because I did not find single example to deal with such complex structure.


    IJIComObject excelObject = comServer.createInstance();

    IJIComObject comInterface = excelObject.queryInterface("4A6512DA-10EC-415E-B31A-7F54414C5BBE");

    //Set up a call, this following object carries your parameters back and forth between the COM server and the Java App.
    JICallBuilder callBuilder = new JICallBuilder();
    //The same object can be used for many calls, please make sure you reinit before usage/call.
    //JIString j = new JIString("10001");
    callBuilder.addInParamAsString("10001", JIFlags.FLAG_REPRESENTATION_STRING_BSTR);
    callBuilder.addOutParamAsObject(IJIComObject.class, JIFlags.FLAG_NULL);
    //Execute the call on the obtained interface.
    Object results =;

    Interface Definitions.

    5.2 IVistaIF Interface
    Identification: IVistaIF Interface
    Function: Provides slide information to the VIAS, in response to a key code
    Interfaces: Interface GUID: {4A6512DA-10EC-415E-B31A-7F54414C5BBE}

    The IVistaIF Interface provides the following methods:

    • GetSlideInfo, which accepts a BSTR keycode, and returns an object implementing the ISlideInfoCollection interface.  The ISlideInfoCollection object contains ISlideInfo objects corresponding to the specified keycode.  Excepting failure, this method will always return a valid ISlideInfoCollection object, even if it is empty.
    • RemoveSlideInfo, which accepts a long type slide identifier (see ISlideInfo) and returns nothing.  After a call to this method, the slide information corresponding to the specified identifier will be removed from the VLM (and not again returned from GetSlideInfo)
    5.2.1 ISlideInfoCollection Interface
    Identification: ISlideInfoCollection Interface
    Function: Collection of objects implementing ISlideInfo, returned from IVistaIF
    Interfaces: Interface GUID: {A883BD38-E94E-49F0-8987-EFD7CF50C29B}

    The ISlideInfoCollection interface provides the following method:

    • _NewEnum, which returns an IEnumXXXX object that can be used to enumerate the ISlideInfo objects in the collection.
    5.2.2 ISlideInfo Interface
    Identification: ISlideInfo Interface
    Function: Stores information describing a slide
    Interfaces: Interface GUID: {1D7C8E65-833C-40C2-9A5F-4D8A9BDC2BA8}

    The ISlideInfo interface provides no methods.