| Summary: | [OLE] Word.application does not kill WINWORD process. | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Krzysztof Kazmierczyk <kazm> |
| Component: | SWT | Assignee: | Platform-SWT-Inbox <platform-swt-inbox> |
| Status: | CLOSED INVALID | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | eclipse.felipe, kazm |
| Version: | 4.0 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
| Bug Depends on: | |||
| Bug Blocks: | 321000 | ||
|
Description
Krzysztof Kazmierczyk
try this:
Display display = new Display();
final Shell shell = new Shell(display);
OleFrame frame = new OleFrame(shell, SWT.NONE);
for (int i = 0; i < 5; i++) {
OleClientSite clientSite = new OleClientSite(frame, SWT.NONE, "Word.Application");
OleAutomation automation = new OleAutomation(clientSite);
int id = automation.getIDsOfNames(new String[] {"Quit"})[0];
automation.invoke(id);
automation.dispose();
clientSite.dispose();
}
frame.dispose();
shell.dispose();
display.dispose();
apparently this is how word works: see http://www.ms-news.net/f3262/word-saveas-ole-container-not-killing-process-2621451.html
(In reply to comment #1) > try this: > Display display = new Display(); > final Shell shell = new Shell(display); > OleFrame frame = new OleFrame(shell, SWT.NONE); > for (int i = 0; i < 5; i++) { > OleClientSite clientSite = new OleClientSite(frame, SWT.NONE, > "Word.Application"); > OleAutomation automation = new OleAutomation(clientSite); > int id = automation.getIDsOfNames(new String[] {"Quit"})[0]; > automation.invoke(id); > automation.dispose(); > clientSite.dispose(); > } > frame.dispose(); > shell.dispose(); > display.dispose(); > > apparently this is how word works: see > http://www.ms-news.net/f3262/word-saveas-ole-container-not-killing-process-2621451.html OK that works for me now. Thanks Felipe :) Should we close it as invalid? I think so. I double checked that SWT is releasing all OLE components. Calling this "Quit" method is a MS Word thing, so makes sense that the application has to call it. |