|
DispGetIDsOfNames
ptinfo, rgszNames, cNames, rgdispid)
ITypeInfo * ptinfo
OLECHAR FAR* FAR* rgszNames
unsigned int cNames
DISPID FAR* rgdispid
Uses type information to convert a set of names to DISPIDs. This is the
recommended implementation of IDispatch::GetIDsOfNames.
Parameters
ptinfo
Pointer to the type information for an interface. Note that this type
information is specific to one interface and language code, so it is not necessary to
pass an IID or LCID to this function.
rgszNames
An array of name strings, which can be the same array passed to DispInvoke in the DISPPARAMS structure. If cNames is greater than one, the first name is interpreted as a method name and
subsequent names are interpreted as parameters to that method.
cNames
The number of elements in rgszNames.
rgdispid
Pointer to an array of DISPIDs to be filled in by this function. The first ID
corresponds to the method name; subsequent IDs are interpreted as parameters to
the method.
Return Value
The SCODE obtained from the returned HRESULT is one of the following:
SCODE
| Meaning
| S_OK
| The interface is supported.
| E_INVALIDARG
| One of the arguments is invalid.
| DISP_E_UNKNOWNNAME
| One or more of the given names were not known.
The returned array of DISPIDs will contain DISPID_UNKNOWN for each entry that
corresponds to an unknown name.
| Other returns
| Any of the ITypeInfo::Invoke errors may also be returned.
|
Example
This code from the Lines sample file POINTS.CPP implements the member function GetIDsOfNames for the CPoints class using DispGetIDsOfNames.
STDMETHODIMP
CPoints::GetIDsOfNames(
REFIID riid,
char FAR* FAR* rgszNames,
UINT cNames,
LCID lcid,
DISPID FAR* rgdispid)
{
return DispGetIDsOfNames(m_ptinfo, rgszNames, cNames, rgdispid);
}
See Also
CreateStdDispatch, IDispatch::GetIDsOfNames
Related LinksSoftware for Delphi and C++ Builder developers Software for Visual Studio .NET developers Software for Visual Basic 6 developers Delphi Tips&Tricks
MegaDetailed.NET
TMS Scripter Studio Pro components for Delphi/C++Builder
More Online Helps Win32 Programmer's Reference (win32.hlp) Win32 Multimedia Programmer's Reference (mmedia.hlp) Microsoft Windows Pen API Programmer's Reference (penapi.hlp) Microsoft Windows Sockets 2 Reference (sock2.hlp) Microsoft Windows Telephony API (TAPI) Programmer's Reference (sock2.hlp) Unix Manual Pages
|