Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IDispatch 1

Status
Not open for further replies.

rico90

Programmer
Jul 10, 2002
2
0
0
FR
I work with a DCOM to Java bridge and i need to construct a Com object by specifying the IDispatch number.

Can anyone help me know what is this number?

Thanks !!
 
IDispatch is an interface with few methods

GetISaOdNames
DISPID
Invoke

 
IDispatch interface is used by scripting languages that support COM but do not support V-Table binding. It is also used by programs that use late binding.

What happens is if you want to use, lets say, the print method of your object you would call your object using the IDispatch Interface.

Call IDispatch::GetIDsOfNames. This function returns a set of DISPIDs in the result that you can then use to call the IDispatch::Invoke method. The first parameter is one of the values from IDispatch::GetIDsOfNames.

In the Invoke method it is basically a big select statement and normally proxies on the data to the actual procedure that you want.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top