Enumerate COM object (IDispatch) methods using ATL?
问题 Using ATL (VS2008) how can I enumerate the available methods available on a given IDispatch interface ( IDispatch* )? I need to search for a method with a specific name and, once I have the DISPID , invoke the method (I know the parameters the method takes.) Ideally I would like to do this using smart COM pointers ( CComPtr<> ). Is this possible? 回答1: You can't enumerate all the available methods unless the object implements IDispatchEx. However, if you know the name of the method you want to