Exception while establsihing connection

Hi,
I am using LibreOffice SDK 4.0.2, But it throws an error while establishing connection with LibreOffice like ‘Handle is not initialized’, But it was worked while i am using LibreOffice 3.5… Can anyone suggest me a solution for this bug…

Hi @Kavi – Can you provide some more context about what you were doing? Maybe point us at some sample docs or a repo with some code?

Hi, I am trying to capture PPT screen and convert into image using LibreOffice SDK dll like cli_basetypes.dll, It is working fine when i installed LibreOffice 3.5 on my machine, But it throws an exception after upgraded to 4.0.2, Check the code below… using System;
using unoidl.com.sun.star.lang;
using unoidl.com.sun.star.frame;
using unoidl.com.sun.star.text;
using unoidl.com.sun.star.drawing;
using unoidl.com.sun.star.presentation;
using unoidl.com.sun.star.document;

XComponentLoader aLoader;
private unoidl.com.sun.star.uno.XComponentContext m_xContext;
private unoidl.com.sun.star.lang.XMultiServiceFactory mxMSFactory;
private XDrawPagesSupplier msSupplier;
private XDrawPages mspages;
private SlideShowEventListener ssevent;
private XSlideShowController objController;
public System.Data.DataTable dtBookMark;
private XPresentation2 pre;
XComponent xComponent; public PPTHelper()
{
Dispose();
}

public PPTHelper(string FileName)
{
// Connect to a running office and get the service manager
mxMSFactory = Connect(); – Here is the Exception(Handle is not initialized)

    // Create a new presentation
    msSupplier = InitDocument(FileName);

    //Get drawing pages
    mspages = msSupplier.getDrawPages();
}

Hiya @Kavi – I just moved the code to an Answer so we can look at it in one continuous block:

using System;
using unoidl.com.sun.star.lang;
using unoidl.com.sun.star.frame;
using unoidl.com.sun.star.text;
using unoidl.com.sun.star.drawing;
using unoidl.com.sun.star.presentation;
using unoidl.com.sun.star.document;

XComponentLoader aLoader;
private unoidl.com.sun.star.uno.XComponentContext m_xContext;
private unoidl.com.sun.star.lang.XMultiServiceFactory mxMSFactory;
private XDrawPagesSupplier msSupplier;
private XDrawPages mspages;
private SlideShowEventListener ssevent;
private XSlideShowController objController;
public System.Data.DataTable dtBookMark;
private XPresentation2 pre;
XComponent xComponent;
public PPTHelper() { Dispose(); }

public PPTHelper(string FileName) { // Connect to a running office and get the service manager
  mxMSFactory = Connect(); -- Here is the Exception(Handle is not initialized)

    // Create a new presentation
    msSupplier = InitDocument(FileName);

    //Get drawing pages
    mspages = msSupplier.getDrawPages();
}

@Sweetshark - Quick question about the SDK under 4.0.2, if you’ve got a moment.

Thanks

Hi, We are developing a project which extract’s an image from ppt slide, For that we are using LibreOffice SDK, It is working fine while using LibreOffice 3.5 but after upgraded to LibreOffice 4.0 It throws an exception(Handle is not initialized) while establshing a connection…