Can't create Browser [message #456247] |
Fri, 27 May 2005 14:50 |
Andy Arhelger Messages: 62 Registered: July 2009 |
Member |
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.02937 seconds