ReactOS 0.4.16-dev-88-ga65b6ae
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 1509 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 1538 of file atlcom.h.

1539 {
1540 }

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

1516 {
1517 HRESULT hr = S_OK;
1518 if (m_pTypeInfo != NULL)
1519 return hr;
1520
1521 if (IsEqualCLSID(CLSID_NULL, *plibid))
1522 OutputDebugStringA("IDispatchImpl: plibid is CLSID_NULL!\r\n");
1523
1524 // Should we assert here?
1525 if (wMajor == 0xffff && wMinor == 0xffff)
1526 OutputDebugStringA("IDispatchImpl: not fully implemented, missing functionality to load TLB from file!\r\n");
1527
1528 CComPtr<ITypeLib> spTypeLib;
1529 hr = LoadRegTypeLib(*plibid, wMajor, wMinor, lcid, &spTypeLib);
1530 if (SUCCEEDED(hr))
1531 {
1532 hr = spTypeLib->GetTypeInfoOfGuid(*piid, &m_pTypeInfo);
1533 }
1534 return hr;
1535 }
CComPtr< ITypeInfo > m_pTypeInfo
Definition: atlcom.h:1513
#define NULL
Definition: types.h:112
HRESULT WINAPI LoadRegTypeLib(REFGUID rguid, WORD wVerMajor, WORD wVerMinor, LCID lcid, ITypeLib **ppTLib)
Definition: typelib.c:531
void WINAPI SHIM_OBJ_NAME() OutputDebugStringA(LPCSTR lpOutputString)
Definition: ignoredbgout.c:18
#define S_OK
Definition: intsafe.h:52
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define CLSID_NULL
Definition: guiddef.h:99
#define IsEqualCLSID(rclsid1, rclsid2)
Definition: guiddef.h:96
HRESULT hr
Definition: shlfolder.c:183

Referenced by ATL::IDispatchImpl< T, piid, plibid, wMajor, wMinor >::GetIDsOfNames(), ATL::IDispatchImpl< T, piid, plibid, wMajor, wMinor >::GetTypeInfo(), and ATL::IDispatchImpl< T, piid, plibid, wMajor, wMinor >::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 1568 of file atlcom.h.

1569 {
1570 HRESULT hr = EnsureTILoaded(lcid);
1571 if (SUCCEEDED(hr))
1572 hr = m_pTypeInfo->GetIDsOfNames(rgszNames, cNames, rgDispId);
1573 return hr;
1574 }
STDMETHOD() EnsureTILoaded(LCID lcid)
Definition: atlcom.h:1515

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

1554 {
1555 if (iTInfo != 0)
1556 return DISP_E_BADINDEX;
1557 if (ppTInfo == NULL)
1558 return E_POINTER;
1559
1560 HRESULT hr = EnsureTILoaded(lcid);
1561 *ppTInfo = m_pTypeInfo;
1562 if (*ppTInfo)
1563 (*ppTInfo)->AddRef();
1564
1565 return hr;
1566 }
#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 1544 of file atlcom.h.

1545 {
1546 if (pctinfo == NULL)
1547 return E_POINTER;
1548
1549 *pctinfo = 1;
1550 return S_OK;
1551 }

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

1577 {
1578 HRESULT hr = EnsureTILoaded(lcid);
1579 if (SUCCEEDED(hr))
1580 hr = m_pTypeInfo->Invoke(this, dispIdMember, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
1581 return hr;
1582 }
_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: