ReactOS  0.4.13-dev-464-g6b95727
CACLMulti Class Reference

#include <aclmulti.h>

Inheritance diagram for CACLMulti:
Collaboration diagram for CACLMulti:

Classes

struct  ACLMultiSublist
 

Public Member Functions

 CACLMulti ()
 
 ~CACLMulti ()
 
virtual HRESULT STDMETHODCALLTYPE Next (ULONG celt, LPOLESTR *rgelt, ULONG *pceltFetched)
 
virtual HRESULT STDMETHODCALLTYPE Skip (ULONG celt)
 
virtual HRESULT STDMETHODCALLTYPE Reset ()
 
virtual HRESULT STDMETHODCALLTYPE Clone (IEnumString **ppenum)
 
virtual HRESULT STDMETHODCALLTYPE Expand (LPCOLESTR pszExpand)
 
virtual HRESULT STDMETHODCALLTYPE Append (IUnknown *punk)
 
virtual HRESULT STDMETHODCALLTYPE Remove (IUnknown *punk)
 
- Public Member Functions inherited from ATL::CComObjectRootEx< CComMultiThreadModelNoCS >
 ~CComObjectRootEx ()
 
ULONG InternalAddRef ()
 
ULONG InternalRelease ()
 
void Lock ()
 
void Unlock ()
 
HRESULT _AtlInitialConstruct ()
 
- Public Member Functions inherited from ATL::CComObjectRootBase
 CComObjectRootBase ()
 
 ~CComObjectRootBase ()
 
void SetVoid (void *)
 
HRESULT _AtlFinalConstruct ()
 
HRESULT FinalConstruct ()
 
void InternalFinalConstructAddRef ()
 
void InternalFinalConstructRelease ()
 
void FinalRelease ()
 
- Public Member Functions inherited from IEnumString
HRESULT RemoteNext ([in] ULONG celt, [out, size_is(celt), length_is(*pceltFetched)] LPOLESTR *rgelt, [out] ULONG *pceltFetched)
 
- Public Member Functions inherited from IUnknown
HRESULT QueryInterface ([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
 
ULONG AddRef ()
 
ULONG Release ()
 

Private Member Functions

void release_obj (struct ACLMultiSublist *obj)
 

Private Attributes

INT fObjectCount
 
INT fCurrentObject
 
struct ACLMultiSublistfObjects
 

Additional Inherited Members

- Public Types inherited from IEnumString
typedef IEnumStringLPENUMSTRING
 
- Public Types inherited from IUnknown
typedef IUnknownLPUNKNOWN
 
- Static Public Member Functions inherited from ATL::CComObjectRootBase
static void WINAPI ObjectMain (bool)
 
static const struct _ATL_CATMAP_ENTRYGetCategoryMap ()
 
static HRESULT WINAPI InternalQueryInterface (void *pThis, const _ATL_INTMAP_ENTRY *pEntries, REFIID iid, void **ppvObject)
 
- Public Attributes inherited from ATL::CComObjectRootBase
LONG m_dwRef
 

Detailed Description

Definition at line 24 of file aclmulti.h.

Constructor & Destructor Documentation

◆ CACLMulti()

CACLMulti::CACLMulti ( )

Definition at line 33 of file aclmulti.cpp.

34 {
35  fObjectCount = 0;
36  fCurrentObject = 0;
37  fObjects = NULL;
38 }
INT fCurrentObject
Definition: aclmulti.h:40
smooth NULL
Definition: ftsmooth.c:416
INT fObjectCount
Definition: aclmulti.h:39
struct ACLMultiSublist * fObjects
Definition: aclmulti.h:41

◆ ~CACLMulti()

CACLMulti::~CACLMulti ( )

Definition at line 40 of file aclmulti.cpp.

41 {
42  int i;
43 
44  TRACE("destroying %p\n", this);
45  for (i = 0; i < fObjectCount; i++)
48 }
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:422
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
#define TRACE(s)
Definition: solgame.cpp:4
INT fObjectCount
Definition: aclmulti.h:39
struct ACLMultiSublist * fObjects
Definition: aclmulti.h:41
void release_obj(struct ACLMultiSublist *obj)
Definition: aclmulti.cpp:24

Member Function Documentation

◆ Append()

HRESULT STDMETHODCALLTYPE CACLMulti::Append ( IUnknown punk)
virtual

Definition at line 50 of file aclmulti.cpp.

51 {
52  TRACE("(%p, %p)\n", this, punk);
53  if (punk == NULL)
54  return E_FAIL;
55 
56  fObjects = static_cast<ACLMultiSublist *>(
57  CoTaskMemRealloc(fObjects, sizeof(fObjects[0]) * (fObjectCount + 1)));
58  fObjects[fObjectCount].punk = punk;
59  punk->AddRef();
61  fObjects[fObjectCount].pEnum = NULL;
63  fObjects[fObjectCount].pACL = NULL;
64  fObjectCount++;
65  return S_OK;
66 }
#define IID_PPV_ARG(Itype, ppType)
#define E_FAIL
Definition: ddrawi.h:102
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:35
ULONG AddRef()
INT fObjectCount
Definition: aclmulti.h:39
#define S_OK
Definition: intsafe.h:59
struct ACLMultiSublist * fObjects
Definition: aclmulti.h:41
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
LPVOID WINAPI CoTaskMemRealloc(LPVOID pvOld, SIZE_T size)
Definition: ifs.c:440

◆ Clone()

HRESULT STDMETHODCALLTYPE CACLMulti::Clone ( IEnumString **  ppenum)
virtual

Implements IEnumString.

Definition at line 127 of file aclmulti.cpp.

128 {
129  *ppOut = NULL;
130  /* native browseui 6.0 returns this: */
131  return E_OUTOFMEMORY;
132 }
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
smooth NULL
Definition: ftsmooth.c:416

◆ Expand()

HRESULT STDMETHODCALLTYPE CACLMulti::Expand ( LPCOLESTR  pszExpand)
virtual

Definition at line 134 of file aclmulti.cpp.

135 {
136  HRESULT res = S_OK;
137  int i;
138 
139  for (i = 0; i < fObjectCount; i++)
140  {
141  if (!fObjects[i].pACL)
142  continue;
143  res = fObjects[i].pACL->Expand(wstr);
144  if (res == S_OK)
145  break;
146  }
147  return res;
148 }
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
LONG HRESULT
Definition: typedefs.h:77
INT fObjectCount
Definition: aclmulti.h:39
#define S_OK
Definition: intsafe.h:59
struct ACLMultiSublist * fObjects
Definition: aclmulti.h:41
GLuint res
Definition: glext.h:9613

◆ Next()

HRESULT STDMETHODCALLTYPE CACLMulti::Next ( ULONG  celt,
LPOLESTR rgelt,
ULONG pceltFetched 
)
virtual

Implements IEnumString.

Definition at line 87 of file aclmulti.cpp.

88 {
89  TRACE("(%p, %d, %p, %p)\n", this, celt, rgelt, pceltFetched);
91  {
92  if (fObjects[fCurrentObject].pEnum)
93  {
94  /* native browseui 6.0 also returns only one element */
95  HRESULT ret = fObjects[fCurrentObject].pEnum->Next(1, rgelt, pceltFetched);
96  if (ret != S_FALSE)
97  return ret;
98  }
100  }
101 
102  if (pceltFetched)
103  *pceltFetched = 0;
104  *rgelt = NULL;
105  return S_FALSE;
106 }
INT fCurrentObject
Definition: aclmulti.h:40
#define S_FALSE
Definition: winerror.h:2357
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
HRESULT Next([in] ULONG celt, [out, size_is(celt), length_is(*pceltFetched)] STATPROPSETSTG *rgelt, [out] ULONG *pceltFetched)
int ret
INT fObjectCount
Definition: aclmulti.h:39
struct ACLMultiSublist * fObjects
Definition: aclmulti.h:41

◆ release_obj()

void CACLMulti::release_obj ( struct ACLMultiSublist obj)
private

Definition at line 24 of file aclmulti.cpp.

25 {
26  obj->punk->Release();
27  if (obj->pEnum)
28  obj->pEnum->Release();
29  if (obj->pACL)
30  obj->pACL->Release();
31 }

Referenced by Remove(), and ~CACLMulti().

◆ Remove()

HRESULT STDMETHODCALLTYPE CACLMulti::Remove ( IUnknown punk)
virtual

Definition at line 68 of file aclmulti.cpp.

69 {
70  int i;
71 
72  TRACE("(%p, %p)\n", this, punk);
73  for (i = 0; i < fObjectCount; i++)
74  if (fObjects[i].punk == punk)
75  {
77  MoveMemory(&fObjects[i], &fObjects[i + 1], (fObjectCount - i - 1) * sizeof(ACLMultiSublist));
78  fObjectCount--;
79  fObjects = static_cast<ACLMultiSublist *>(
81  return S_OK;
82  }
83 
84  return E_FAIL;
85 }
#define MoveMemory
Definition: winbase.h:1632
#define E_FAIL
Definition: ddrawi.h:102
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
#define TRACE(s)
Definition: solgame.cpp:4
INT fObjectCount
Definition: aclmulti.h:39
#define S_OK
Definition: intsafe.h:59
struct ACLMultiSublist * fObjects
Definition: aclmulti.h:41
void release_obj(struct ACLMultiSublist *obj)
Definition: aclmulti.cpp:24
LPVOID WINAPI CoTaskMemRealloc(LPVOID pvOld, SIZE_T size)
Definition: ifs.c:440

◆ Reset()

HRESULT STDMETHODCALLTYPE CACLMulti::Reset ( void  )
virtual

Implements IEnumString.

Definition at line 108 of file aclmulti.cpp.

109 {
110  int i;
111 
112  fCurrentObject = 0;
113  for (i = 0; i < fObjectCount; i++)
114  {
115  if (fObjects[i].pEnum)
116  fObjects[i].pEnum->Reset();
117  }
118  return S_OK;
119 }
INT fCurrentObject
Definition: aclmulti.h:40
HRESULT Reset()
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
INT fObjectCount
Definition: aclmulti.h:39
#define S_OK
Definition: intsafe.h:59
struct ACLMultiSublist * fObjects
Definition: aclmulti.h:41

◆ Skip()

HRESULT STDMETHODCALLTYPE CACLMulti::Skip ( ULONG  celt)
virtual

Implements IEnumString.

Definition at line 121 of file aclmulti.cpp.

122 {
123  /* native browseui 6.0 returns this: */
124  return E_NOTIMPL;
125 }
#define E_NOTIMPL
Definition: ddrawi.h:99

Member Data Documentation

◆ fCurrentObject

INT CACLMulti::fCurrentObject
private

Definition at line 40 of file aclmulti.h.

Referenced by CACLMulti(), Next(), and Reset().

◆ fObjectCount

INT CACLMulti::fObjectCount
private

Definition at line 39 of file aclmulti.h.

Referenced by Append(), CACLMulti(), Expand(), Next(), Remove(), Reset(), and ~CACLMulti().

◆ fObjects

struct ACLMultiSublist* CACLMulti::fObjects
private

Definition at line 41 of file aclmulti.h.

Referenced by Append(), CACLMulti(), Expand(), Next(), Remove(), Reset(), and ~CACLMulti().


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