Re: IDispatch::GetIDsOfName() and IDispatch::Invoke() Help

Tech-Archive recommends: Fix windows errors by optimizing your registry



On 8 nov, 17:07, "Igor Tandetnik" <itandet...@xxxxxxxx> wrote:
I'm not sure what this is supposed to achieve. GetIDsOfNames takes a
name of a property or method implemented by the object, and returns a
DISPID suitable for passing to IDispatch::Invoke. Apparently, Excel
Workbook object does not implement a property or method named "Excel"
nor "Excel.Application". Consult the documentation to find out which
properties and methods it does implement.

Hi Igor,

I have been reading many of your post recently.

I don't know what are the name of the methods implemented by the
object. And this is because I don't know the type of the object I
point with my pDisp pointer. I am not sure if it is an excel
application, an excel workbook, an excel ***, or anything else.

Finally I have found that "Active***" was a valid name, taken from
here (http://support.microsoft.com/kb/216686/EN-US/ ). And
successfully finished my test.

At the end, I am trying to read/write into an excel *** loaded
through a Microsoft Web Browser component installed in my Windows
Forms application. Do you think I am doing this the proper way ?

AG.

.


Quantcast