Re: IDispatch::GetIDsOfName() and IDispatch::Invoke() Help
- From: "Igor Tandetnik" <itandetnik@xxxxxxxx>
- Date: Thu, 8 Nov 2007 11:07:32 -0500
heyji2@xxxxxxxxx wrote:
DISPID id;
LPOLESTR Name=L"Excel";
hr = pDisp->GetIDsOfNames(IID_NULL,&Name,1,LOCALE_USER_DEFAULT,&id);
if(FAILED(hr))
{
// I always get here. I am not sure the Name "Excel" is
correct or what to put here ? "Excel.Application" ,...?
toolStripStatusLabel1->Text = "GetIDsOfNames failed";
}
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.
--
With best wishes,
Igor Tandetnik
With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925
.
- Follow-Ups:
- References:
- Prev by Date: IDispatch::GetIDsOfName() and IDispatch::Invoke() Help
- Next by Date: Re: com in service
- Previous by thread: IDispatch::GetIDsOfName() and IDispatch::Invoke() Help
- Next by thread: Re: IDispatch::GetIDsOfName() and IDispatch::Invoke() Help
- Index(es):
Relevant Pages
|