ReactOS 0.4.15-dev-8614-gbc76250
recyclebin_v5_enumerator.cpp File Reference
#include "recyclebin_private.h"
#include <atlstr.h>
#include <shlwapi.h>
#include <strsafe.h>
Include dependency graph for recyclebin_v5_enumerator.cpp:

Go to the source code of this file.

Classes

class  RecycleBin5File
 
class  RecycleBin5Enum
 

Functions

 STDMETHODIMP_ (ULONG) RecycleBin5File
 
static HRESULT RecycleBin5File_Constructor (_In_ IRecycleBin5 *prb, _In_ LPCWSTR Folder, _In_ PDELETED_FILE_RECORD pDeletedFile, _Out_ IRecycleBinFile **ppFile)
 
EXTERN_C HRESULT RecycleBin5Enum_Constructor (_In_ IRecycleBin5 *prb, _In_ HANDLE hInfo, _In_ HANDLE hInfoMapped, _In_ LPCWSTR szPrefix, _Out_ IUnknown **ppUnknown)
 

Function Documentation

◆ RecycleBin5Enum_Constructor()

EXTERN_C HRESULT RecycleBin5Enum_Constructor ( _In_ IRecycleBin5 prb,
_In_ HANDLE  hInfo,
_In_ HANDLE  hInfoMapped,
_In_ LPCWSTR  szPrefix,
_Out_ IUnknown **  ppUnknown 
)

Definition at line 467 of file recyclebin_v5_enumerator.cpp.

473{
474 if (!ppUnknown)
475 return E_POINTER;
476
477 *ppUnknown = NULL;
478
479 RecycleBin5Enum *pThis = new RecycleBin5Enum();
480 if (!pThis)
481 return E_OUTOFMEMORY;
482
483 HRESULT hr = pThis->Init(prb, hInfo, hInfoMapped, szPrefix);
484 if (FAILED(hr))
485 {
486 delete pThis;
487 return hr;
488 }
489
490 *ppUnknown = static_cast<IRecycleBinEnumList *>(pThis);
491 return S_OK;
492}
HRESULT Init(_In_ IRecycleBin5 *prb, _In_ HANDLE hInfo, _In_ HANDLE hInfoMapped, _In_ LPCWSTR pszPrefix)
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define NULL
Definition: types.h:112
#define S_OK
Definition: intsafe.h:52
#define FAILED(hr)
Definition: intsafe.h:51
HRESULT hr
Definition: shlfolder.c:183
#define E_POINTER
Definition: winerror.h:2365

Referenced by RecycleBin5::EnumObjects().

◆ RecycleBin5File_Constructor()

static HRESULT RecycleBin5File_Constructor ( _In_ IRecycleBin5 prb,
_In_ LPCWSTR  Folder,
_In_ PDELETED_FILE_RECORD  pDeletedFile,
_Out_ IRecycleBinFile **  ppFile 
)
static

Definition at line 276 of file recyclebin_v5_enumerator.cpp.

281{
282 if (!ppFile)
283 return E_POINTER;
284
285 *ppFile = NULL;
286
287 RecycleBin5File *pThis = new RecycleBin5File();
288 if (!pThis)
289 return E_OUTOFMEMORY;
290
291 HRESULT hr = pThis->Init(prb, Folder, pDeletedFile);
292 if (FAILED(hr))
293 {
294 delete pThis;
295 return hr;
296 }
297
298 *ppFile = static_cast<IRecycleBinFile *>(pThis);
299 return S_OK;
300}
HRESULT Init(_In_ IRecycleBin5 *prb, _In_ LPCWSTR Folder, _In_ PDELETED_FILE_RECORD pDeletedFile)

Referenced by RecycleBin5Enum::Next().

◆ STDMETHODIMP_()

STDMETHODIMP_ ( ULONG  )

Definition at line 75 of file recyclebin_v5_enumerator.cpp.

76{
77 TRACE("(%p)\n", this);
78 return InterlockedIncrement(&m_ref);
79}
#define InterlockedIncrement
Definition: armddk.h:53
#define TRACE(s)
Definition: solgame.cpp:4