ReactOS  0.4.12-dev-51-ge94618b
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 1450 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 1479 of file atlcom.h.

1480  {
1481  }

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 1456 of file atlcom.h.

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

◆ 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 1509 of file atlcom.h.

1510  {
1511  HRESULT hr = EnsureTILoaded(lcid);
1512  if (SUCCEEDED(hr))
1513  hr = m_pTypeInfo->GetIDsOfNames(rgszNames, cNames, rgDispId);
1514  return hr;
1515  }
STDMETHOD() EnsureTILoaded(LCID lcid)
Definition: atlcom.h:1456
CComPtr< ITypeInfo > m_pTypeInfo
Definition: atlcom.h:1454
LONG HRESULT
Definition: typedefs.h:77
HRESULT GetIDsOfNames([in, size_is(cNames)] LPOLESTR *rgszNames, [in] UINT cNames, [out, size_is(cNames)] MEMBERID *pMemId)
#define SUCCEEDED(hr)
Definition: intsafe.h:57

◆ 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 1494 of file atlcom.h.

1495  {
1496  if (iTInfo != 0)
1497  return DISP_E_BADINDEX;
1498  if (ppTInfo == NULL)
1499  return E_POINTER;
1500 
1501  HRESULT hr = EnsureTILoaded(lcid);
1502  *ppTInfo = m_pTypeInfo;
1503  if (*ppTInfo)
1504  (*ppTInfo)->AddRef();
1505 
1506  return hr;
1507  }
STDMETHOD() EnsureTILoaded(LCID lcid)
Definition: atlcom.h:1456
CComPtr< ITypeInfo > m_pTypeInfo
Definition: atlcom.h:1454
smooth NULL
Definition: ftsmooth.c:416
LONG HRESULT
Definition: typedefs.h:77
ULONG AddRef()
#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 1485 of file atlcom.h.

1486  {
1487  if (pctinfo == NULL)
1488  return E_POINTER;
1489 
1490  *pctinfo = 1;
1491  return S_OK;
1492  }
smooth NULL
Definition: ftsmooth.c:416
#define S_OK
Definition: intsafe.h:59
#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 1517 of file atlcom.h.

1518  {
1519  HRESULT hr = EnsureTILoaded(lcid);
1520  if (SUCCEEDED(hr))
1521  hr = m_pTypeInfo->Invoke(this, dispIdMember, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
1522  return hr;
1523  }
STDMETHOD() EnsureTILoaded(LCID lcid)
Definition: atlcom.h:1456
CComPtr< ITypeInfo > m_pTypeInfo
Definition: atlcom.h:1454
HRESULT Invoke([in] PVOID pvInstance, [in] MEMBERID memid, [in] WORD wFlags, [in, out] DISPPARAMS *pDispParams, [out] VARIANT *pVarResult, [out] EXCEPINFO *pExcepInfo, [out] UINT *puArgErr)
LONG HRESULT
Definition: typedefs.h:77
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:519
#define SUCCEEDED(hr)
Definition: intsafe.h:57

Member Data Documentation

◆ m_pTypeInfo

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

Definition at line 1454 of file atlcom.h.


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