ReactOS 0.4.15-dev-5667-ged97270
recyclebin_v5_enumerator.c
Go to the documentation of this file.
1/*
2 * PROJECT: Recycle bin management
3 * LICENSE: GPL v2 - See COPYING in the top level directory
4 * FILE: lib/recyclebin/recyclebin_v5_enumerator.c
5 * PURPOSE: Enumerates contents of a MS Windows 2000/XP/2003 recyclebin
6 * PROGRAMMERS: Copyright 2006-2007 Hervé Poussineau (hpoussin@reactos.org)
7 */
8
10
12{
16 IRecycleBinFile recycleBinFileImpl;
18};
19
22 IN IRecycleBinFile *This,
23 OUT DWORD *pAttributes);
24
27 IN IRecycleBinFile *This,
29 OUT void **ppvObject)
30{
32
33 TRACE("(%p, %s, %p)\n", This, debugstr_guid(riid), ppvObject);
34
35 if (!ppvObject)
36 return E_POINTER;
37
39 *ppvObject = &s->recycleBinFileImpl;
41 *ppvObject = &s->recycleBinFileImpl;
42 else if (IsEqualIID(riid, &IID_IExtractIconA) || IsEqualIID(riid, &IID_IExtractIconW))
43 {
47 else
48 return S_FALSE;
49 }
50 else
51 {
52 *ppvObject = NULL;
53 return E_NOINTERFACE;
54 }
55
56 IUnknown_AddRef(This);
57 return S_OK;
58}
59
62 IN IRecycleBinFile *This)
63{
65 ULONG refCount = InterlockedIncrement((PLONG)&s->ref);
66 TRACE("(%p)\n", This);
67 return refCount;
68}
69
70static VOID
72 struct RecycleBin5File *s)
73{
74 TRACE("(%p)\n", s);
75
76 IRecycleBin5_Release(s->recycleBin);
78}
79
82 IN IRecycleBinFile *This)
83{
85 ULONG refCount;
86
87 TRACE("(%p)\n", This);
88
89 refCount = InterlockedDecrement((PLONG)&s->ref);
90
91 if (refCount == 0)
93
94 return refCount;
95}
96
99 IN IRecycleBinFile *This,
100 OUT FILETIME *pLastModificationTime)
101{
103 HRESULT hr;
106
107 TRACE("(%p, %p)\n", This, pLastModificationTime);
108
109 dwAttributes = GetFileAttributesW(s->FullName);
114 else
118
119 if (GetFileTime(hFile, NULL, NULL, pLastModificationTime))
120 hr = S_OK;
121 else
124 return hr;
125}
126
129 IN IRecycleBinFile *This,
130 OUT FILETIME *pDeletionTime)
131{
133 TRACE("(%p, %p)\n", This, pDeletionTime);
134 *pDeletionTime = s->deletedFile.DeletionTime;
135 return S_OK;
136}
137
140 IN IRecycleBinFile *This,
141 OUT ULARGE_INTEGER *pFileSize)
142{
144 HRESULT hr;
147
148 TRACE("(%p, %p)\n", This, pFileSize);
149
150 dwAttributes = GetFileAttributesW(s->FullName);
154 {
155 pFileSize->QuadPart = 0;
156 return S_OK;
157 }
158
162 pFileSize->u.LowPart = GetFileSize(hFile, &pFileSize->u.HighPart);
163 if (pFileSize->u.LowPart != INVALID_FILE_SIZE)
164 hr = S_OK;
165 else
168 return hr;
169}
170
173 IN IRecycleBinFile *This,
174 OUT ULARGE_INTEGER *pPhysicalFileSize)
175{
177 TRACE("(%p, %p)\n", This, pPhysicalFileSize);
178 pPhysicalFileSize->u.HighPart = 0;
179 pPhysicalFileSize->u.LowPart = s->deletedFile.dwPhysicalFileSize;
180 return S_OK;
181}
182
185 IN IRecycleBinFile *This,
186 OUT DWORD *pAttributes)
187{
190
191 TRACE("(%p, %p)\n", This, pAttributes);
192
193 dwAttributes = GetFileAttributesW(s->FullName);
196
197 *pAttributes = dwAttributes;
198 return S_OK;
199}
200
203 IN IRecycleBinFile *This,
207{
209 DWORD dwRequired;
210
211 TRACE("(%p, %u, %p, %p)\n", This, BufferSize, Buffer, RequiredSize);
212
213 dwRequired = (DWORD)(wcslen(s->deletedFile.FileNameW) + 1) * sizeof(WCHAR);
214 if (RequiredSize)
215 *RequiredSize = dwRequired;
216
217 if (BufferSize == 0 && !Buffer)
218 return S_OK;
219
220 if (BufferSize < dwRequired)
221 return E_OUTOFMEMORY;
222 CopyMemory(Buffer, s->deletedFile.FileNameW, dwRequired);
223 return S_OK;
224}
225
228 IN IRecycleBinFile *This,
232{
233 HRESULT hr;
234
236 DWORD dwRequired;
238 SHFILEINFOW shFileInfo;
239
240 TRACE("(%p, %u, %p, %p)\n", This, BufferSize, Buffer, RequiredSize);
241
243 if (!SUCCEEDED(hr))
244 return hr;
245
246 hr = SHGetFileInfoW(s->FullName, dwAttributes, &shFileInfo, sizeof(shFileInfo), SHGFI_TYPENAME | SHGFI_USEFILEATTRIBUTES);
247 if (!SUCCEEDED(hr))
248 return hr;
249
250 dwRequired = (DWORD)(wcslen(shFileInfo.szTypeName) + 1) * sizeof(WCHAR);
251 if (RequiredSize)
252 *RequiredSize = dwRequired;
253
254 if (BufferSize == 0 && !Buffer)
255 return S_OK;
256
257 if (BufferSize < dwRequired)
258 return E_OUTOFMEMORY;
259 CopyMemory(Buffer, shFileInfo.szTypeName, dwRequired);
260 return S_OK;
261}
262
265 IN IRecycleBinFile *This)
266{
268 TRACE("(%p)\n", This);
269 return IRecycleBin5_Delete(s->recycleBin, s->FullName, &s->deletedFile);
270}
271
274 IN IRecycleBinFile *This)
275{
277 TRACE("(%p)\n", This);
278 return IRecycleBin5_Restore(s->recycleBin, s->FullName, &s->deletedFile);
279}
280
281CONST_VTBL struct IRecycleBinFileVtbl RecycleBin5FileVtbl =
282{
295};
296
297static HRESULT
299 IN IRecycleBin5 *prb,
300 IN LPCWSTR Folder,
301 IN PDELETED_FILE_RECORD pDeletedFile,
302 OUT IRecycleBinFile **ppFile)
303{
304 struct RecycleBin5File *s = NULL;
306 SIZE_T Needed;
307
308 if (!ppFile)
309 return E_POINTER;
310
311 Extension = wcsrchr(pDeletedFile->FileNameW, '.');
312 if (Extension < wcsrchr(pDeletedFile->FileNameW, '\\'))
313 Extension = NULL;
314 Needed = wcslen(Folder) + 13;
315 if (Extension)
316 Needed += wcslen(Extension);
317 Needed *= sizeof(WCHAR);
318
319 s = CoTaskMemAlloc(sizeof(struct RecycleBin5File) + Needed);
320 if (!s)
321 return E_OUTOFMEMORY;
322 ZeroMemory(s, sizeof(struct RecycleBin5File) + Needed);
323 s->recycleBinFileImpl.lpVtbl = &RecycleBin5FileVtbl;
324 s->ref = 1;
325 s->deletedFile = *pDeletedFile;
326 s->recycleBin = prb;
327 IRecycleBin5_AddRef(s->recycleBin);
328 *ppFile = &s->recycleBinFileImpl;
329 wsprintfW(s->FullName, L"%s\\D%c%lu%s", Folder, pDeletedFile->dwDriveNumber + 'a', pDeletedFile->dwRecordUniqueId, Extension);
331 {
333 return E_FAIL;
334 }
335
336 return S_OK;
337}
338
340{
346 IRecycleBinEnumList recycleBinEnumImpl;
348};
349
352 IN IRecycleBinEnumList *This,
353 IN REFIID riid,
354 OUT void **ppvObject)
355{
357
358 TRACE("(%p, %s, %p)\n", This, debugstr_guid(riid), ppvObject);
359
360 if (!ppvObject)
361 return E_POINTER;
362
364 *ppvObject = &s->recycleBinEnumImpl;
366 *ppvObject = &s->recycleBinEnumImpl;
367 else
368 {
369 *ppvObject = NULL;
370 return E_NOINTERFACE;
371 }
372
373 IUnknown_AddRef(This);
374 return S_OK;
375}
376
379 IN IRecycleBinEnumList *This)
380{
382 ULONG refCount = InterlockedIncrement((PLONG)&s->ref);
383 TRACE("(%p)\n", This);
384 return refCount;
385}
386
387static VOID
389 struct RecycleBin5Enum *s)
390{
391 TRACE("(%p)\n", s);
392
393 IRecycleBin5_OnClosing(s->recycleBin, &s->recycleBinEnumImpl);
394 UnmapViewOfFile(s->pInfo);
395 IRecycleBin5_Release(s->recycleBin);
397}
398
401 IN IRecycleBinEnumList *This)
402{
404 ULONG refCount;
405
406 TRACE("(%p)\n", This);
407
408 refCount = InterlockedDecrement((PLONG)&s->ref);
409
410 if (refCount == 0)
412
413 return refCount;
414}
415
418 IRecycleBinEnumList *This,
419 IN DWORD celt,
420 IN OUT IRecycleBinFile **rgelt,
421 OUT DWORD *pceltFetched)
422{
425 INFO2_HEADER *pHeader = s->pInfo;
426 DELETED_FILE_RECORD *pDeletedFile;
427 DWORD fetched = 0, i;
428 DWORD dwEntries;
429 HRESULT hr;
430
431 TRACE("(%p, %u, %p, %p)\n", This, celt, rgelt, pceltFetched);
432
433 if (!rgelt)
434 return E_POINTER;
435 if (!pceltFetched && celt > 1)
436 return E_INVALIDARG;
437
438 FileSize.u.LowPart = GetFileSize(s->hInfo, &FileSize.u.HighPart);
439 if (FileSize.u.LowPart == 0)
441 dwEntries = (DWORD)((FileSize.QuadPart - sizeof(INFO2_HEADER)) / sizeof(DELETED_FILE_RECORD));
442
443 i = s->dwCurrent;
444 pDeletedFile = (DELETED_FILE_RECORD *)(pHeader + 1) + i;
445 for (; i < dwEntries && fetched < celt; i++)
446 {
447 hr = RecycleBin5File_Constructor(s->recycleBin, s->szPrefix, pDeletedFile, &rgelt[fetched]);
448 if (SUCCEEDED(hr))
449 fetched++;
450 pDeletedFile++;
451 }
452
453 s->dwCurrent = i;
454 if (pceltFetched)
455 *pceltFetched = fetched;
456 if (fetched == celt)
457 return S_OK;
458 else
459 return S_FALSE;
460}
461
464 IN IRecycleBinEnumList *This,
465 IN DWORD celt)
466{
468 TRACE("(%p, %u)\n", This, celt);
469 s->dwCurrent += celt;
470 return S_OK;
471}
472
475 IN IRecycleBinEnumList *This)
476{
478 TRACE("(%p)\n", This);
479 s->dwCurrent = 0;
480 return S_OK;
481}
482
483CONST_VTBL struct IRecycleBinEnumListVtbl RecycleBin5EnumVtbl =
484{
491};
492
495 IN IRecycleBin5 *prb,
496 IN HANDLE hInfo,
497 IN HANDLE hInfoMapped,
498 IN LPCWSTR szPrefix,
499 OUT IUnknown **ppUnknown)
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}
EXTERN_C HRESULT WINAPI SHCreateFileExtractIconW(_In_ LPCWSTR pszFile, _In_ DWORD dwFileAttributes, _In_ REFIID riid, _Outptr_ void **ppv)
#define InterlockedIncrement
Definition: armddk.h:53
#define InterlockedDecrement
Definition: armddk.h:52
const GUID IID_IUnknown
#define STDMETHODCALLTYPE
Definition: bdasup.h:9
Definition: bufpool.h:45
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define E_INVALIDARG
Definition: ddrawi.h:101
#define E_FAIL
Definition: ddrawi.h:102
#define NULL
Definition: types.h:112
#define CloseHandle
Definition: compat.h:739
#define UnmapViewOfFile
Definition: compat.h:746
#define wcsrchr
Definition: compat.h:16
#define OPEN_EXISTING
Definition: compat.h:775
#define INVALID_HANDLE_VALUE
Definition: compat.h:731
#define GENERIC_READ
Definition: compat.h:135
#define CreateFileW
Definition: compat.h:741
#define FILE_MAP_READ
Definition: compat.h:776
#define MapViewOfFile
Definition: compat.h:745
#define FILE_SHARE_READ
Definition: compat.h:136
DWORD WINAPI GetFileAttributesW(LPCWSTR lpFileName)
Definition: fileinfo.c:652
DWORD WINAPI GetFileSize(HANDLE hFile, LPDWORD lpFileSizeHigh)
Definition: fileinfo.c:331
BOOL WINAPI GetFileTime(IN HANDLE hFile, OUT LPFILETIME lpCreationTime OPTIONAL, OUT LPFILETIME lpLastAccessTime OPTIONAL, OUT LPFILETIME lpLastWriteTime OPTIONAL)
Definition: fileinfo.c:896
unsigned long DWORD
Definition: ntddk_ex.h:95
_Inout_opt_ PUNICODE_STRING Extension
Definition: fltkernel.h:1092
_Must_inspect_result_ _Out_ PLARGE_INTEGER FileSize
Definition: fsrtlfuncs.h:108
GLdouble s
Definition: gl.h:2039
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
FxContextHeader * pHeader
Definition: handleapi.cpp:604
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)
REFIID riid
Definition: atlbase.h:39
#define S_OK
Definition: intsafe.h:52
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define debugstr_guid
Definition: kernel32.h:35
#define FILE_FLAG_BACKUP_SEMANTICS
Definition: disk.h:41
_In_ HANDLE hFile
Definition: mswsock.h:90
#define FILE_SHARE_WRITE
Definition: nt_native.h:681
#define FILE_SHARE_DELETE
Definition: nt_native.h:682
#define FILE_ATTRIBUTE_DIRECTORY
Definition: nt_native.h:705
#define DWORD
Definition: nt_native.h:44
#define L(x)
Definition: ntvdm.h:50
#define CONST_VTBL
Definition: objbase.h:222
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
#define REFIID
Definition: guiddef.h:118
#define ANY_SIZE
Definition: recyclebin.h:20
EXTERN_C const IID IID_IRecycleBinFile
Definition: recyclebin.h:252
EXTERN_C const IID IID_IRecycleBinEnumList
Definition: recyclebin.h:253
interface IRecycleBin5 IRecycleBin5
Definition: recyclebin_v5.h:27
struct _DELETED_FILE_RECORD DELETED_FILE_RECORD
static HRESULT STDMETHODCALLTYPE RecycleBin5File_RecycleBinFile_GetFileName(IN IRecycleBinFile *This, IN SIZE_T BufferSize, IN OUT LPWSTR Buffer, OUT SIZE_T *RequiredSize)
static HRESULT STDMETHODCALLTYPE RecycleBin5File_RecycleBinFile_GetPhysicalFileSize(IN IRecycleBinFile *This, OUT ULARGE_INTEGER *pPhysicalFileSize)
static HRESULT STDMETHODCALLTYPE RecycleBin5Enum_RecycleBinEnumList_Reset(IN IRecycleBinEnumList *This)
static HRESULT STDMETHODCALLTYPE RecycleBin5File_RecycleBinFile_GetFileSize(IN IRecycleBinFile *This, OUT ULARGE_INTEGER *pFileSize)
static HRESULT STDMETHODCALLTYPE RecycleBin5File_RecycleBinFile_Delete(IN IRecycleBinFile *This)
static HRESULT STDMETHODCALLTYPE RecycleBin5File_RecycleBinFile_Restore(IN IRecycleBinFile *This)
static HRESULT STDMETHODCALLTYPE RecycleBin5File_RecycleBinFile_GetTypeName(IN IRecycleBinFile *This, IN SIZE_T BufferSize, IN OUT LPWSTR Buffer, OUT SIZE_T *RequiredSize)
static VOID RecycleBin5File_Destructor(struct RecycleBin5File *s)
static VOID RecycleBin5Enum_Destructor(struct RecycleBin5Enum *s)
static HRESULT STDMETHODCALLTYPE RecycleBin5File_RecycleBinFile_QueryInterface(IN IRecycleBinFile *This, IN REFIID riid, OUT void **ppvObject)
static ULONG STDMETHODCALLTYPE RecycleBin5File_RecycleBinFile_Release(IN IRecycleBinFile *This)
static HRESULT STDMETHODCALLTYPE RecycleBin5Enum_RecycleBinEnumList_QueryInterface(IN IRecycleBinEnumList *This, IN REFIID riid, OUT void **ppvObject)
static HRESULT STDMETHODCALLTYPE RecycleBin5Enum_RecycleBinEnumList_Next(IRecycleBinEnumList *This, IN DWORD celt, IN OUT IRecycleBinFile **rgelt, OUT DWORD *pceltFetched)
HRESULT RecycleBin5Enum_Constructor(IN IRecycleBin5 *prb, IN HANDLE hInfo, IN HANDLE hInfoMapped, IN LPCWSTR szPrefix, OUT IUnknown **ppUnknown)
static HRESULT STDMETHODCALLTYPE RecycleBin5File_RecycleBinFile_GetDeletionTime(IN IRecycleBinFile *This, OUT FILETIME *pDeletionTime)
static HRESULT STDMETHODCALLTYPE RecycleBin5File_RecycleBinFile_GetLastModificationTime(IN IRecycleBinFile *This, OUT FILETIME *pLastModificationTime)
static HRESULT STDMETHODCALLTYPE RecycleBin5Enum_RecycleBinEnumList_Skip(IN IRecycleBinEnumList *This, IN DWORD celt)
CONST_VTBL struct IRecycleBinEnumListVtbl RecycleBin5EnumVtbl
static ULONG STDMETHODCALLTYPE RecycleBin5Enum_RecycleBinEnumList_Release(IN IRecycleBinEnumList *This)
static HRESULT RecycleBin5File_Constructor(IN IRecycleBin5 *prb, IN LPCWSTR Folder, IN PDELETED_FILE_RECORD pDeletedFile, OUT IRecycleBinFile **ppFile)
static ULONG STDMETHODCALLTYPE RecycleBin5Enum_RecycleBinEnumList_AddRef(IN IRecycleBinEnumList *This)
static HRESULT STDMETHODCALLTYPE RecycleBin5File_RecycleBinFile_GetAttributes(IN IRecycleBinFile *This, OUT DWORD *pAttributes)
static ULONG STDMETHODCALLTYPE RecycleBin5File_RecycleBinFile_AddRef(IN IRecycleBinFile *This)
CONST_VTBL struct IRecycleBinFileVtbl RecycleBin5FileVtbl
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
DWORD_PTR WINAPI SHGetFileInfoW(LPCWSTR path, DWORD dwFileAttributes, SHFILEINFOW *psfi, UINT sizeofpsfi, UINT flags)
Definition: shell32_main.c:414
#define SHGFI_TYPENAME
Definition: shellapi.h:164
#define SHGFI_USEFILEATTRIBUTES
Definition: shellapi.h:178
HRESULT hr
Definition: shlfolder.c:183
#define TRACE(s)
Definition: solgame.cpp:4
IRecycleBinEnumList recycleBinEnumImpl
DELETED_FILE_RECORD deletedFile
IRecycleBinFile recycleBinFileImpl
WCHAR FullName[ANY_SIZE]
WCHAR szTypeName[80]
Definition: shellapi.h:373
ULONG_PTR SIZE_T
Definition: typedefs.h:80
#define IN
Definition: typedefs.h:39
int32_t * PLONG
Definition: typedefs.h:58
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
uint32_t ULONG
Definition: typedefs.h:59
#define OUT
Definition: typedefs.h:40
LONGLONG QuadPart
Definition: typedefs.h:114
struct _LARGE_INTEGER::@2268 u
DWORD dwAttributes
Definition: vdmdbg.h:34
#define INVALID_FILE_ATTRIBUTES
Definition: vfdcmd.c:23
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ ULONG _Out_ PVOID _Out_ PULONG RequiredSize
Definition: wdfdevice.h:4439
_In_ WDFMEMORY _Out_opt_ size_t * BufferSize
Definition: wdfmemory.h:254
#define ZeroMemory
Definition: winbase.h:1670
DWORD WINAPI GetLastError(void)
Definition: except.c:1040
#define CopyMemory
Definition: winbase.h:1668
#define INVALID_FILE_SIZE
Definition: winbase.h:548
_In_ void _In_ PCCERT_CONTEXT _In_opt_ LPFILETIME _In_ DWORD _In_ DWORD _Outptr_opt_ void ** ppvObject
Definition: wincrypt.h:6082
#define S_FALSE
Definition: winerror.h:2357
#define E_NOINTERFACE
Definition: winerror.h:2364
#define HRESULT_FROM_WIN32(x)
Definition: winerror.h:92
#define E_POINTER
Definition: winerror.h:2365
int WINAPIV wsprintfW(_Out_ LPWSTR, _In_ _Printf_format_string_ LPCWSTR,...)
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185