ReactOS  0.4.15-dev-3163-gf17c2c0
CEnumString Class Reference
Inheritance diagram for CEnumString:
Collaboration diagram for CEnumString:

Public Member Functions

 CEnumString ()
 
virtual ~CEnumString ()
 
VOID SetList (UINT nCount, LPWSTR *pList)
 
STDMETHODIMP QueryInterface (REFIID iid, VOID **ppv) override
 
 STDMETHODIMP_ (ULONG) AddRef() override
 
 STDMETHODIMP_ (ULONG) Release() override
 
STDMETHODIMP Next (ULONG celt, LPWSTR *rgelt, ULONG *pceltFetched) override
 
STDMETHODIMP Skip (ULONG celt) override
 
STDMETHODIMP Reset () override
 
STDMETHODIMP Clone (IEnumString **ppenum) override
 
STDMETHODIMP Expand (PCWSTR pszExpand) override
 
STDMETHODIMP GetOptions (DWORD *pdwFlag) override
 
STDMETHODIMP SetOptions (DWORD dwFlag) override
 
- Public Member Functions inherited from IEnumString
HRESULT Next ([in] ULONG celt, [out, size_is(celt), length_is(*pceltFetched)] LPOLESTR *rgelt, [out] ULONG *pceltFetched)
 
HRESULT RemoteNext ([in] ULONG celt, [out, size_is(celt), length_is(*pceltFetched)] LPOLESTR *rgelt, [out] ULONG *pceltFetched)
 
- Public Member Functions inherited from IUnknown
ULONG AddRef ()
 
ULONG Release ()
 

Protected Attributes

ULONG m_cRefs
 
UINT m_nIndex
 
UINT m_nCount
 
LPWSTRm_pList
 

Additional Inherited Members

- Public Types inherited from IEnumString
typedef IEnumStringLPENUMSTRING
 
- Public Types inherited from IUnknown
typedef IUnknownLPUNKNOWN
 

Detailed Description

Definition at line 47 of file IAutoComplete.cpp.

Constructor & Destructor Documentation

◆ CEnumString()

CEnumString::CEnumString ( )
inline

Definition at line 50 of file IAutoComplete.cpp.

50  : m_cRefs(0), m_nIndex(0), m_nCount(0), m_pList(NULL)
51  {
52  trace("CEnumString::CEnumString(%p)\n", this);
53  }
LPWSTR * m_pList
#define trace
Definition: atltest.h:70
#define NULL
Definition: types.h:112

◆ ~CEnumString()

virtual CEnumString::~CEnumString ( )
inlinevirtual

Definition at line 55 of file IAutoComplete.cpp.

56  {
57  trace("CEnumString::~CEnumString(%p)\n", this);
58  for (UINT i = 0; i < m_nCount; ++i)
59  {
61  m_pList[i] = NULL;
62  }
64  }
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:442
LPWSTR * m_pList
#define trace
Definition: atltest.h:70
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112

Member Function Documentation

◆ Clone()

STDMETHODIMP CEnumString::Clone ( IEnumString **  ppenum)
inlineoverride

Implements IEnumString.

Definition at line 138 of file IAutoComplete.cpp.

139  {
140  trace("CEnumString::Clone()\n");
141  return E_NOTIMPL;
142  }
#define trace
Definition: atltest.h:70
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ Expand()

STDMETHODIMP CEnumString::Expand ( PCWSTR  pszExpand)
inlineoverride

Definition at line 144 of file IAutoComplete.cpp.

145  {
146  trace("CEnumString::Expand(%S)\n", pszExpand);
147  s_bExpand = TRUE;
148  s_strExpand = pszExpand;
149  return S_OK;
150  }
static CStringW s_strExpand
#define TRUE
Definition: types.h:120
static BOOL s_bExpand
#define trace
Definition: atltest.h:70
#define S_OK
Definition: intsafe.h:52

◆ GetOptions()

STDMETHODIMP CEnumString::GetOptions ( DWORD pdwFlag)
inlineoverride

Definition at line 151 of file IAutoComplete.cpp.

152  {
153  trace("CEnumString::GetOption(%p)\n", pdwFlag);
154  return S_OK;
155  }
#define trace
Definition: atltest.h:70
#define S_OK
Definition: intsafe.h:52

◆ Next()

STDMETHODIMP CEnumString::Next ( ULONG  celt,
LPWSTR rgelt,
ULONG pceltFetched 
)
inlineoverride

Definition at line 108 of file IAutoComplete.cpp.

109  {
110  if (rgelt)
111  *rgelt = NULL;
112  if (pceltFetched)
113  *pceltFetched = 0;
114  if (celt != 1 || !rgelt || !pceltFetched)
115  return E_INVALIDARG;
116  if (m_nIndex >= m_nCount)
117  return S_FALSE;
118 
119  SHStrDupW(m_pList[m_nIndex], rgelt);
120  ++m_nIndex;
121  if (!*rgelt)
122  return E_OUTOFMEMORY;
123  *pceltFetched = 1;
124  return S_OK;
125  }
LPWSTR * m_pList
HRESULT WINAPI SHStrDupW(LPCWSTR src, LPWSTR *dest)
Definition: string.c:2004
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define S_FALSE
Definition: winerror.h:2357
#define E_INVALIDARG
Definition: ddrawi.h:101
#define S_OK
Definition: intsafe.h:52
#define NULL
Definition: types.h:112

◆ QueryInterface()

STDMETHODIMP CEnumString::QueryInterface ( REFIID  iid,
VOID **  ppv 
)
inlineoverride

Implements IUnknown.

Definition at line 72 of file IAutoComplete.cpp.

73  {
74  if (iid == IID_IUnknown || iid == IID_IEnumString)
75  {
76  trace("IID_IEnumString\n");
77  AddRef();
78  *ppv = static_cast<IEnumString *>(this);
79  return S_OK;
80  }
81  if (iid == IID_IACList || iid == IID_IACList2)
82  {
83  trace("IID_IACList2\n");
84  AddRef();
85  *ppv = static_cast<IACList2 *>(this);
86  return S_OK;
87  }
88  return E_NOINTERFACE;
89  }
#define E_NOINTERFACE
Definition: winerror.h:2364
const GUID IID_IEnumString
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define trace
Definition: atltest.h:70
const GUID IID_IUnknown
ULONG AddRef()
#define S_OK
Definition: intsafe.h:52

◆ Reset()

STDMETHODIMP CEnumString::Reset ( void  )
inlineoverride

Implements IEnumString.

Definition at line 131 of file IAutoComplete.cpp.

132  {
133  trace("CEnumString::Reset\n");
134  m_nIndex = 0;
135  s_bReset = TRUE;
136  return S_OK;
137  }
#define TRUE
Definition: types.h:120
static BOOL s_bReset
#define trace
Definition: atltest.h:70
#define S_OK
Definition: intsafe.h:52

◆ SetList()

VOID CEnumString::SetList ( UINT  nCount,
LPWSTR pList 
)
inline

Definition at line 66 of file IAutoComplete.cpp.

67  {
68  m_nCount = nCount;
69  m_pList = pList;
70  }
LPWSTR * m_pList
FxChildList * pList

◆ SetOptions()

STDMETHODIMP CEnumString::SetOptions ( DWORD  dwFlag)
inlineoverride

Definition at line 156 of file IAutoComplete.cpp.

157  {
158  trace("CEnumString::SetOption(0x%lX)\n", dwFlag);
159  return S_OK;
160  }
#define trace
Definition: atltest.h:70
#define S_OK
Definition: intsafe.h:52

◆ Skip()

STDMETHODIMP CEnumString::Skip ( ULONG  celt)
inlineoverride

Implements IEnumString.

Definition at line 126 of file IAutoComplete.cpp.

127  {
128  trace("CEnumString::Skip(%lu)\n", celt);
129  return E_NOTIMPL;
130  }
#define trace
Definition: atltest.h:70
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ STDMETHODIMP_() [1/2]

CEnumString::STDMETHODIMP_ ( ULONG  )
inlineoverride

Definition at line 90 of file IAutoComplete.cpp.

91  {
92  //trace("CEnumString::AddRef\n");
93  ++m_cRefs;
94  return m_cRefs;
95  }

◆ STDMETHODIMP_() [2/2]

CEnumString::STDMETHODIMP_ ( ULONG  )
inlineoverride

Definition at line 96 of file IAutoComplete.cpp.

97  {
98  //trace("CEnumString::Release\n");
99  --m_cRefs;
100  if (m_cRefs == 0)
101  {
102  delete this;
103  return 0;
104  }
105  return m_cRefs;
106  }

Member Data Documentation

◆ m_cRefs

ULONG CEnumString::m_cRefs
protected

Definition at line 163 of file IAutoComplete.cpp.

Referenced by STDMETHODIMP_().

◆ m_nCount

UINT CEnumString::m_nCount
protected

Definition at line 164 of file IAutoComplete.cpp.

Referenced by Next(), SetList(), and ~CEnumString().

◆ m_nIndex

UINT CEnumString::m_nIndex
protected

Definition at line 164 of file IAutoComplete.cpp.

Referenced by Next(), and Reset().

◆ m_pList

LPWSTR* CEnumString::m_pList
protected

Definition at line 165 of file IAutoComplete.cpp.

Referenced by Next(), SetList(), and ~CEnumString().


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