Sailormoontw
Joined: 21 Jun 2006 Posts: 2
|
Posted: Wed Jun 21, 2006 10:02 am Post subject: Browser Error |
|
|
I've got this Error:
dwt\browser\browser.d, line 186 dwt\ole\win32\olecontrolsite.d, 188
Failed to create Ole Client. result = 2147746312
Code is as follows : It's coverted from SWT Snippet 148
void main(char[][] args)
{
Display display = new Display();
Shell shell = new Shell(display);
shell.setLayout(new FillLayout());
Browser browser = null;
try
{
browser = new Browser(shell, DWT.NONE);
} catch (Exception e) {
/* The Browser widget throws an SWTError if it fails to
* instantiate properly. Application code should catch
* this SWTError and disable any feature requiring the
* Browser widget.
* Platform requirements for the SWT Browser widget are available
* from the SWT FAQ website.
*/
MessageBox.showMsg(e.toString());
}
if (browser != null) {
/* The Browser widget can be used */
browser.setUrl("http://www.eclipse.org");
}
MessageBox.showMsg("Before Shell Open");
shell.open();
MessageBox.showMsg("After Shell Open");
while (!shell.isDisposed()) {
if (!display.readAndDispatch())
display.sleep();
}
display.dispose();
} |
|