ReactOS  0.4.15-dev-3193-g74513a7
ATL::IDispatchImpl< T, piid, plibid, wMajor, wMinor > Class Template Reference

#include <atlcom.h>

Inheritance diagram for ATL::IDispatchImpl< T, piid, plibid, wMajor, wMinor >:
Collaboration diagram for ATL::IDispatchImpl< T, piid, plibid, wMajor, wMinor >:

Public Member Functions

 IDispatchImpl ()
 
STDMETHOD() GetTypeInfoCount (UINT *pctinfo)
 
STDMETHOD() GetTypeInfo (UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 
STDMETHOD() GetIDsOfNames (REFIID, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
 
STDMETHOD() Invoke (DISPID dispIdMember, REFIID, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
 

Private Member Functions

STDMETHOD() EnsureTILoaded (LCID lcid)
 

Private Attributes

CComPtr< ITypeInfom_pTypeInfo
 

Detailed Description

template<class T, const IID * piid, const GUID * plibid = &CAtlModule::m_libid, WORD wMajor = 1, WORD wMinor = 0>
class ATL::IDispatchImpl< T, piid, plibid, wMajor, wMinor >

Definition at line 1451 of file atlcom.h.

Constructor & Destructor Documentation

◆ IDispatchImpl()

template<class T, const IID * piid, const GUID * plibid = &CAtlModule::m_libid, WORD wMajor = 1, WORD wMinor = 0>
ATL::IDispatchImpl< T, piid, plibid, wMajor, wMinor >::IDispatchImpl ( )
inline

Definition at line 1480 of file atlcom.h.

1481  {
1482  }

Member Function Documentation

◆ EnsureTILoaded()

template<class T, const IID * piid, const GUID * plibid = &CAtlModule::m_libid, WORD wMajor = 1, WORD wMinor = 0>
STDMETHOD() ATL::IDispatchImpl< T, piid, plibid, wMajor, wMinor >::EnsureTILoaded ( LCID  lcid)
inlineprivate

Definition at line 1457 of file atlcom.h.

1458  {
1459  HRESULT hr = S_OK;
1460  if (m_pTypeInfo != NULL)
1461  return hr;
1462 
1463  if (IsEqualCLSID(CLSID_NULL, *plibid))
1464  OutputDebugStringA("IDispatchImpl: plibid is CLSID_NULL!\r\n");
1465 
1466  // Should we assert here?
1467  if (wMajor == 0xffff && wMinor == 0xffff)
1468  OutputDebugStringA("IDispatchImpl: not fully implemented, missing functionality to load TLB from file!\r\n");
1469 
1470  CComPtr<ITypeLib> spTypeLib;
1471  hr = LoadRegTypeLib(*plibid, wMajor, wMinor, lcid, &spTypeLib);
1472  if (SUCCEEDED(hr))
1473  {
1474  hr = spTypeLib->GetTypeInfoOfGuid(*piid, &m_pTypeInfo);
1475  }
1476  return hr;
1477  }
HRESULT hr
Definition: shlfolder.c:183
if SUCCEEDED(hr)
CComPtr< ITypeInfo > m_pTypeInfo
Definition: atlcom.h:1455
#define CLSID_NULL
Definition: guiddef.h:99
LONG HRESULT
Definition: typedefs.h:79
#define S_OK
Definition: intsafe.h:52
HRESULT WINAPI LoadRegTypeLib(REFGUID rguid, WORD wVerMajor, WORD wVerMinor, LCID lcid, ITypeLib **ppTLib)
Definition: typelib.c:531
#define NULL
Definition: types.h:112
#define IsEqualCLSID(rclsid1, rclsid2)
Definition: guiddef.h:96
void WINAPI SHIM_OBJ_NAME() OutputDebugStringA(LPCSTR lpOutputString)
Definition: ignoredbgout.c:18

Referenced by ATL::IDispatchImpl< IShellFolderViewDual2, &IID_IShellFolderViewDual2 >::GetIDsOfNames(), ATL::IDispatchImpl< IShellFolderViewDual2, &IID_IShellFolderViewDual2 >::GetTypeInfo(), and ATL::IDispatchImpl< IShellFolderViewDual2, &IID_IShellFolderViewDual2 >::Invoke().

◆ GetIDsOfNames()

template<class T, const IID * piid, const GUID * plibid = &CAtlModule::m_libid, WORD wMajor = 1, WORD wMinor = 0>
STDMETHOD() ATL::IDispatchImpl< T, piid, plibid, wMajor, wMinor >::GetIDsOfNames ( REFIID  ,
LPOLESTR rgszNames,
UINT  cNames,
LCID  lcid,
DISPID rgDispId 
)
inline

Definition at line 1510 of file atlcom.h.

1511  {
1512  HRESULT hr = EnsureTILoaded(lcid);
1513  if (SUCCEEDED(hr))
1514  hr = m_pTypeInfo->GetIDsOfNames(rgszNames, cNames, rgDispId);
1515  return hr;
1516  }
HRESULT hr
Definition: shlfolder.c:183
STDMETHOD() EnsureTILoaded(LCID lcid)
Definition: atlcom.h:1457
if SUCCEEDED(hr)
CComPtr< ITypeInfo > m_pTypeInfo
Definition: atlcom.h:1455
LONG HRESULT
Definition: typedefs.h:79

◆ GetTypeInfo()

template<class T, const IID * piid, const GUID * plibid = &CAtlModule::m_libid, WORD wMajor = 1, WORD wMinor = 0>
STDMETHOD() ATL::IDispatchImpl< T, piid, plibid, wMajor, wMinor >::GetTypeInfo ( UINT  iTInfo,
LCID  lcid,
ITypeInfo **  ppTInfo 
)
inline

Definition at line 1495 of file atlcom.h.

1496  {
1497  if (iTInfo != 0)
1498  return DISP_E_BADINDEX;
1499  if (ppTInfo == NULL)
1500  return E_POINTER;
1501 
1502  HRESULT hr = EnsureTILoaded(lcid);
1503  *ppTInfo = m_pTypeInfo;
1504  if (*ppTInfo)
1505  (*ppTInfo)->AddRef();
1506 
1507  return hr;
1508  }
HRESULT hr
Definition: shlfolder.c:183
STDMETHOD() EnsureTILoaded(LCID lcid)
Definition: atlcom.h:1457
CComPtr< ITypeInfo > m_pTypeInfo
Definition: atlcom.h:1455
LONG HRESULT
Definition: typedefs.h:79
#define NULL
Definition: types.h:112
#define DISP_E_BADINDEX
Definition: winerror.h:2520
#define E_POINTER
Definition: winerror.h:2365

◆ GetTypeInfoCount()

template<class T, const IID * piid, const GUID * plibid = &CAtlModule::m_libid, WORD wMajor = 1, WORD wMinor = 0>
STDMETHOD() ATL::IDispatchImpl< T, piid, plibid, wMajor, wMinor >::GetTypeInfoCount ( UINT pctinfo)
inline

Definition at line 1486 of file atlcom.h.

1487  {
1488  if (pctinfo == NULL)
1489  return E_POINTER;
1490 
1491  *pctinfo = 1;
1492  return S_OK;
1493  }
#define S_OK
Definition: intsafe.h:52
#define NULL
Definition: types.h:112
#define E_POINTER
Definition: winerror.h:2365

◆ Invoke()

template<class T, const IID * piid, const GUID * plibid = &CAtlModule::m_libid, WORD wMajor = 1, WORD wMinor = 0>
STDMETHOD() ATL::IDispatchImpl< T, piid, plibid, wMajor, wMinor >::Invoke ( DISPID  dispIdMember,
REFIID  ,
LCID  lcid,
WORD  wFlags,
DISPPARAMS *  pDispParams,
VARIANT pVarResult,
EXCEPINFO *  pExcepInfo,
UINT puArgErr 
)
inline

Definition at line 1518 of file atlcom.h.

1519  {
1520  HRESULT hr = EnsureTILoaded(lcid);
1521  if (SUCCEEDED(hr))
1522  hr = m_pTypeInfo->Invoke(this, dispIdMember, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
1523  return hr;
1524  }
HRESULT hr
Definition: shlfolder.c:183
STDMETHOD() EnsureTILoaded(LCID lcid)
Definition: atlcom.h:1457
if SUCCEEDED(hr)
CComPtr< ITypeInfo > m_pTypeInfo
Definition: atlcom.h:1455
LONG HRESULT
Definition: typedefs.h:79
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:531

Member Data Documentation

◆ m_pTypeInfo


The documentation for this class was generated from the following file: