ReactOS 0.4.15-dev-8241-g63935f8
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 494 of file recyclebin_v5_enumerator.c.

500{
501 struct RecycleBin5Enum *s = NULL;
502 SIZE_T Needed;
503
504 if (!ppUnknown)
505 return E_POINTER;
506
507 Needed = (wcslen(szPrefix) + 1) * sizeof(WCHAR);
508
509 s = CoTaskMemAlloc(sizeof(struct RecycleBin5Enum) + Needed);
510 if (!s)
511 return E_OUTOFMEMORY;
512 ZeroMemory(s, sizeof(struct RecycleBin5Enum) + Needed);
513 s->recycleBinEnumImpl.lpVtbl = &RecycleBin5EnumVtbl;
514 s->ref = 1;
515 s->recycleBin = prb;
516 wcscpy(s->szPrefix, szPrefix);
517 s->hInfo = hInfo;
518 s->pInfo = MapViewOfFile(hInfoMapped, FILE_MAP_READ, 0, 0, 0);
519 if (!s->pInfo)
520 {
523 }
524 if (s->pInfo->dwVersion != 5 || s->pInfo->dwRecordSize != sizeof(DELETED_FILE_RECORD))
525 {
526 UnmapViewOfFile(s->pInfo);
528 return E_FAIL;
529 }
530 IRecycleBin5_AddRef(s->recycleBin);
531 *ppUnknown = (IUnknown *)&s->recycleBinEnumImpl;
532
533 return S_OK;
534}
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define E_FAIL
Definition: ddrawi.h:102
#define NULL
Definition: types.h:112
#define UnmapViewOfFile
Definition: compat.h:746
#define FILE_MAP_READ
Definition: compat.h:776
#define MapViewOfFile
Definition: compat.h:745
GLdouble s
Definition: gl.h:2039
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:442
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: ifs.c:426
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define S_OK
Definition: intsafe.h:52
CONST_VTBL struct IRecycleBinEnumListVtbl RecycleBin5EnumVtbl
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
ULONG_PTR SIZE_T
Definition: typedefs.h:80
#define ZeroMemory
Definition: winbase.h:1712
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
#define HRESULT_FROM_WIN32(x)
Definition: winerror.h:92
#define E_POINTER
Definition: winerror.h:2365
__wchar_t WCHAR
Definition: xmlstorage.h:180

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().