Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Which IDispatch interface OleAutomation "auto" selects
Which IDispatch interface OleAutomation "auto" selects [message #440018] Wed, 21 July 2004 01:39 Go to next message
Devon Berry is currently offline Devon BerryFriend
Messages: 9
Registered: July 2009
Junior Member
Hello,

I am trying to grasp SWT's OLE automation. Much of the documentation
related to using the OleAutomation object refers to getting IDispatch
property and method values from the type library. Upon using the OLE/COM
object viewer to browse the type libraries, I have noted that most of the
OLE servers expose several dispinterfaces. How does the SWT OleAutomation
class select the interface that it is exposing properites and events for?

Case in point:
Internet explorer (ProgramID: Shell.Explorer)
IDispatch Interfaces (Interfaces that support ole automation):
- IWebBrowser
- IShellWindows
- IShellFavoritesNameSpace
....etc.

Devon
Re: Which IDispatch interface OleAutomation "auto" selects [message #440028 is a reply to message #440018] Wed, 21 July 2004 10:57 Go to previous message
Tiberiu Caprita is currently offline Tiberiu CapritaFriend
Messages: 68
Registered: July 2009
Member
Hi Devon,

You should see a dispinterface as a Object that exposes Properties /
Methods / Events.

OleAutomation gives to you the IDispatch you requested. The IDispatch you
get is a matter of the COM application you called. You should consult the
help for that application (eventually you can guess from the string name
and looking in the type library for the default return of coclass).

By example, asking for a Word.Document you get a Document Object
(properties, methods,events of Document). Asking for Word.Aplication you
get a Word Application Object.
You can use Object properties/methods to obtain OleAutomations (IDispatch)
for other Objects.
You can catch (with swt oles) only Events set as [default] for
dispinterface.

Regards,
Tiberiu
I understand that asking a Shell.Explorer you get a IWebBrowser2

Devon Berry wrote:

> Hello,

> I am trying to grasp SWT's OLE automation. Much of the documentation
> related to using the OleAutomation object refers to getting IDispatch
> property and method values from the type library. Upon using the OLE/COM
> object viewer to browse the type libraries, I have noted that most of the
> OLE servers expose several dispinterfaces. How does the SWT OleAutomation
> class select the interface that it is exposing properites and events for?

> Case in point:
> Internet explorer (ProgramID: Shell.Explorer)
> IDispatch Interfaces (Interfaces that support ole automation):
> - IWebBrowser
> - IShellWindows
> - IShellFavoritesNameSpace
> ....etc.

> Devon
Previous Topic:Table Column - color and other properties
Next Topic:Display shells
Goto Forum:
  


Current Time: Fri Apr 19 07:59:22 GMT 2024

Powered by FUDForum. Page generated in 0.03116 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top