[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.platform.swt] Can't create Browser

I have a number of panels in an Eclipse plugin. I can't seem to create panels that contain Browser objects. I end up getting a:

org.eclipse.swt.SWTError: No more handles
	at org.eclipse.swt.SWT.error(SWT.java:2717)
	at org.eclipse.swt.SWT.error(SWT.java:2616)
	at org.eclipse.swt.SWT.error(SWT.java:2587)
	at org.eclipse.swt.browser.Browser.<init>(Browser.java:146)

But that seems to be a bogus error. The actual step that is failing is the COM.OleCreate in the OleControlSite constructor.

public OleControlSite(Composite parent, int style, String progId) {
super(parent, style);
try {
// check for licensing
appClsid = getClassID(progId);
if (appClsid == null) OLE.error(OLE.ERROR_INVALID_CLASSID);
int licinfo = getLicenseInfo(appClsid);
if (licinfo == 0) {
// Open a storage object
tempStorage = createTempStorage();
// Create ole object with storage object
int[] address = new int[1];
int result = COM.OleCreate(appClsid, COM.IIDIUnknown, COM.OLERENDER_DRAW, null, 0, tempStorage.getAddress(), address);
if (result != COM.S_OK) OLE.error(OLE.ERROR_CANNOT_CREATE_OBJECT, result);



It fails here every time. This doesn't give me enough information to know what the trouble might be.
I can run my app standalone outside of eclispe and it works fine.
I am using swt which came with Eclipse which is version win32-3062 or win32-3063.


Any ideas?

Andy