ReactOS  0.4.14-dev-342-gdc047f9
recyclebin_v5.h File Reference
#include <pshpack1.h>
#include <poppack.h>
Include dependency graph for recyclebin_v5.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _DELETED_FILE_RECORD
 
struct  IRecycleBin5Vtbl
 

Typedefs

typedef struct _DELETED_FILE_RECORD DELETED_FILE_RECORD
 
typedef struct _DELETED_FILE_RECORDPDELETED_FILE_RECORD
 
typedef interface IRecycleBin5 IRecycleBin5
 
typedef struct IRecycleBin5Vtbl IRecycleBin5Vtbl
 

Functions

HRESULT RecycleBin5Enum_Constructor (IN IRecycleBin5 *prb, IN HANDLE hInfo, IN HANDLE hInfoMapped, IN LPCWSTR szPrefix, OUT IUnknown **ppUnknown)
 

Variables

EXTERN_C const IID IID_IRecycleBin5
 

Typedef Documentation

◆ DELETED_FILE_RECORD

◆ IRecycleBin5

Definition at line 27 of file recyclebin_v5.h.

◆ IRecycleBin5Vtbl

◆ PDELETED_FILE_RECORD

Function Documentation

◆ RecycleBin5Enum_Constructor()

HRESULT RecycleBin5Enum_Constructor ( IN IRecycleBin5 prb,
IN HANDLE  hInfo,
IN HANDLE  hInfoMapped,
IN LPCWSTR  szPrefix,
OUT IUnknown **  ppUnknown 
)

Definition at line 443 of file recyclebin_v5_enumerator.c.

449 {
450  struct RecycleBin5Enum *s = NULL;
451  SIZE_T Needed;
452 
453  if (!ppUnknown)
454  return E_POINTER;
455 
456  Needed = (wcslen(szPrefix) + 1) * sizeof(WCHAR);
457 
458  s = CoTaskMemAlloc(sizeof(struct RecycleBin5Enum) + Needed);
459  if (!s)
460  return E_OUTOFMEMORY;
461  ZeroMemory(s, sizeof(struct RecycleBin5Enum) + Needed);
462  s->recycleBinEnumImpl.lpVtbl = &RecycleBin5EnumVtbl;
463  s->ref = 1;
464  s->recycleBin = prb;
465  wcscpy(s->szPrefix, szPrefix);
466  s->hInfo = hInfo;
467  s->pInfo = MapViewOfFile(hInfoMapped, FILE_MAP_READ, 0, 0, 0);
468  if (!s->pInfo)
469  {
470  CoTaskMemFree(s);
472  }
473  if (s->pInfo->dwVersion != 5 || s->pInfo->dwRecordSize != sizeof(DELETED_FILE_RECORD))
474  {
475  UnmapViewOfFile(s->pInfo);
476  CoTaskMemFree(s);
477  return E_FAIL;
478  }
479  IRecycleBin5_AddRef(s->recycleBin);
480  *ppUnknown = (IUnknown *)&s->recycleBinEnumImpl;
481 
482  return S_OK;
483 }
CONST_VTBL struct IRecycleBinEnumListVtbl RecycleBin5EnumVtbl
#define HRESULT_FROM_WIN32(x)
Definition: winerror.h:92
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:420
#define MapViewOfFile
Definition: compat.h:410
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
#define ZeroMemory
Definition: winbase.h:1642
#define E_FAIL
Definition: ddrawi.h:102
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
smooth NULL
Definition: ftsmooth.c:416
#define FILE_MAP_READ
Definition: compat.h:435
__wchar_t WCHAR
Definition: xmlstorage.h:180
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
GLdouble s
Definition: gl.h:2039
ULONG_PTR SIZE_T
Definition: typedefs.h:78
#define S_OK
Definition: intsafe.h:59
#define E_POINTER
Definition: winerror.h:2365
#define UnmapViewOfFile
Definition: compat.h:411
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: ifs.c:404
size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)

Referenced by RecycleBin5_RecycleBin5_EnumObjects().

Variable Documentation

◆ IID_IRecycleBin5

EXTERN_C const IID IID_IRecycleBin5

Definition at line 28 of file recyclebin_v5.h.

Referenced by RecycleBin5_RecycleBin5_QueryInterface().