Viewer as Eclipse Plugin

The PDF-XChange Viewer for End Users
+++ FREE +++

Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan

martin2
User
Posts: 29
Joined: Thu May 29, 2008 9:06 am

Viewer as Eclipse Plugin

Post by martin2 »

Hi,

we would be very interested in embedding the viewer in an Eclipse application. Eclipse generally supports the embedding of Active-X controls. But when we try to open the control we get an error: Failed to create Ole Client. result = -2147467262 (aka: "No such interface supported").

Has anybody tried to do this, has any idea on how to change things or are there any plans from Tracker to support Eclipse embedding (which would be a unique selling point compared to Adobe which have the same problem).

Here is the code I used to check the embedding in Eclipse 3.2.1

import org.eclipse.swt.SWT;
import org.eclipse.swt.ole.win32.OLE;
import org.eclipse.swt.ole.win32.OleControlSite;
import org.eclipse.swt.ole.win32.OleFrame;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;

public class Test {

public static void main(String[] args) {
Display display = new Display();
Shell shell = new Shell(display);
OleFrame frame = new OleFrame(shell, SWT.NONE);
frame.setSize(800, 600);
shell.setVisible(true);

OleControlSite controlSite = new OleControlSite(frame, SWT.NONE, "PDFXCviewAx.CoPDFXCview.1");
controlSite.doVerb(OLE.OLEIVERB_INPLACEACTIVATE);
controlSite.doVerb(OLE.OLEIVERB_UIACTIVATE);
while (!shell.isDisposed()) {
if (!display.readAndDispatch())
display.sleep();
}
}
}
martin2
User
Posts: 29
Joined: Thu May 29, 2008 9:06 am

Re: Viewer as Eclipse Plugin

Post by martin2 »

Sorry - this was the wrong forum. To all that are interested in the problem too: I reposted the topic in the "PDF-XChange Viewer SDK" forum.