ReactOS 0.4.16-dev-252-g9ccafe8
CicIMCCLock< T_DATA > Class Template Reference

#include <cicimc.h>

Inheritance diagram for CicIMCCLock< T_DATA >:
Collaboration diagram for CicIMCCLock< T_DATA >:

Public Member Functions

 CicIMCCLock (HIMCC hIMCC)
 
 ~CicIMCCLock ()
 
void unlock ()
 
 operator T_DATA * () const
 
T_DATA & get () const
 
- Public Member Functions inherited from CIC_IMCC_LOCK< T_DATA >
 CIC_IMCC_LOCK (HIMCC hIMCC)
 

Protected Member Functions

HRESULT _LockIMCC (HIMCC hIMCC, T_DATA **pptr)
 
HRESULT _UnlockIMCC (HIMCC hIMCC)
 

Additional Inherited Members

- Public Attributes inherited from CIC_IMCC_LOCK< T_DATA >
HIMCC m_hIMCC
 
HRESULT m_hr
 
- Protected Attributes inherited from CIC_IMCC_LOCK< T_DATA >
T_DATA * m_pIMCC
 

Detailed Description

template<typename T_DATA>
class CicIMCCLock< T_DATA >

Definition at line 43 of file cicimc.h.

Constructor & Destructor Documentation

◆ CicIMCCLock()

template<typename T_DATA >
CicIMCCLock< T_DATA >::CicIMCCLock ( HIMCC  hIMCC)
inline

Definition at line 46 of file cicimc.h.

47 {
48 this->m_hr = _LockIMCC(this->m_hIMCC, &this->m_pIMCC);
49 }
T_DATA * m_pIMCC
Definition: cicimc.h:28
HIMCC m_hIMCC
Definition: cicimc.h:31
HRESULT m_hr
Definition: cicimc.h:32
HRESULT _LockIMCC(HIMCC hIMCC, T_DATA **pptr)
Definition: cicimc.h:74

◆ ~CicIMCCLock()

template<typename T_DATA >
CicIMCCLock< T_DATA >::~CicIMCCLock ( )
inline

Definition at line 50 of file cicimc.h.

51 {
52 unlock();
53 }
void unlock()
Definition: cicimc.h:55

Member Function Documentation

◆ _LockIMCC()

template<typename T_DATA >
HRESULT CicIMCCLock< T_DATA >::_LockIMCC ( HIMCC  hIMCC,
T_DATA **  pptr 
)
inlineprotected

Definition at line 74 of file cicimc.h.

75 {
76 if (!hIMCC)
77 return E_INVALIDARG;
78 *pptr = (T_DATA*)::ImmLockIMCC(hIMCC);
79 return (*pptr ? S_OK : E_FAIL);
80 }
#define E_INVALIDARG
Definition: ddrawi.h:101
#define E_FAIL
Definition: ddrawi.h:102
LPVOID WINAPI ImmLockIMCC(HIMCC imcc)
Definition: utils.c:1198
#define S_OK
Definition: intsafe.h:52

Referenced by CicIMCCLock< T_DATA >::CicIMCCLock().

◆ _UnlockIMCC()

template<typename T_DATA >
HRESULT CicIMCCLock< T_DATA >::_UnlockIMCC ( HIMCC  hIMCC)
inlineprotected

Definition at line 81 of file cicimc.h.

82 {
83 if (!::ImmUnlockIMCC(hIMCC))
84 return (::GetLastError() ? E_FAIL : S_OK);
85 return S_OK;
86 }
BOOL WINAPI ImmUnlockIMCC(HIMCC imcc)
Definition: utils.c:1208
DWORD WINAPI GetLastError(void)
Definition: except.c:1042

Referenced by CicIMCCLock< T_DATA >::unlock().

◆ get()

◆ operator T_DATA *()

template<typename T_DATA >
CicIMCCLock< T_DATA >::operator T_DATA * ( ) const
inline

Definition at line 64 of file cicimc.h.

65 {
66 return this->m_pIMCC;
67 }

◆ unlock()

template<typename T_DATA >
void CicIMCCLock< T_DATA >::unlock ( )
inline

Definition at line 55 of file cicimc.h.

56 {
57 if (this->m_pIMCC)
58 {
59 _UnlockIMCC(this->m_hIMCC);
60 this->m_pIMCC = NULL;
61 }
62 }
HRESULT _UnlockIMCC(HIMCC hIMCC)
Definition: cicimc.h:81
#define NULL
Definition: types.h:112

Referenced by CicBridge::CreateInputContext(), and CicIMCCLock< T_DATA >::~CicIMCCLock().


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