mirror of
https://github.com/reactos/reactos.git
synced 2024-07-07 05:05:09 +00:00
Add traces
Fix typo in EnumerateRecycleBinW svn path=/trunk/; revision=30009
This commit is contained in:
parent
e521c5d62a
commit
7af600178a
|
@ -204,14 +204,13 @@ EnumerateRecycleBinW(
|
||||||
hr = HRESULT_FROM_WIN32(GetLastError());
|
hr = HRESULT_FROM_WIN32(GetLastError());
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
IRecycleBinFile_Release(prbf);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if (prb)
|
if (prb)
|
||||||
IRecycleBin_Release(prb);
|
IRecycleBin_Release(prb);
|
||||||
if (prbel)
|
if (prbel)
|
||||||
IRecycleBinEnumList_Release(prb);
|
IRecycleBinEnumList_Release(prbel);
|
||||||
if (SUCCEEDED(hr))
|
if (SUCCEEDED(hr))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
if (HRESULT_FACILITY(hr) == FACILITY_WIN32)
|
if (HRESULT_FACILITY(hr) == FACILITY_WIN32)
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
#include "recyclebin_private.h"
|
#include "recyclebin_private.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
WINE_DEFAULT_DEBUG_CHANNEL(recyclebin);
|
||||||
|
|
||||||
struct RecycleBinGeneric
|
struct RecycleBinGeneric
|
||||||
{
|
{
|
||||||
ULONG ref;
|
ULONG ref;
|
||||||
|
@ -24,6 +26,8 @@ RecycleBinGenericVtbl_RecycleBin_QueryInterface(
|
||||||
{
|
{
|
||||||
struct RecycleBinGeneric *s = CONTAINING_RECORD(This, struct RecycleBinGeneric, recycleBinImpl);
|
struct RecycleBinGeneric *s = CONTAINING_RECORD(This, struct RecycleBinGeneric, recycleBinImpl);
|
||||||
|
|
||||||
|
TRACE("(%p, %s, %p)\n", This, debugstr_guid(riid), ppvObject);
|
||||||
|
|
||||||
if (!ppvObject)
|
if (!ppvObject)
|
||||||
return E_POINTER;
|
return E_POINTER;
|
||||||
|
|
||||||
|
@ -47,6 +51,7 @@ RecycleBinGenericVtbl_RecycleBin_AddRef(
|
||||||
{
|
{
|
||||||
struct RecycleBinGeneric *s = CONTAINING_RECORD(This, struct RecycleBinGeneric, recycleBinImpl);
|
struct RecycleBinGeneric *s = CONTAINING_RECORD(This, struct RecycleBinGeneric, recycleBinImpl);
|
||||||
ULONG refCount = InterlockedIncrement((PLONG)&s->ref);
|
ULONG refCount = InterlockedIncrement((PLONG)&s->ref);
|
||||||
|
TRACE("(%p)\n", This);
|
||||||
return refCount;
|
return refCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,8 +62,7 @@ RecycleBinGenericVtbl_RecycleBin_Release(
|
||||||
struct RecycleBinGeneric *s = CONTAINING_RECORD(This, struct RecycleBinGeneric, recycleBinImpl);
|
struct RecycleBinGeneric *s = CONTAINING_RECORD(This, struct RecycleBinGeneric, recycleBinImpl);
|
||||||
ULONG refCount;
|
ULONG refCount;
|
||||||
|
|
||||||
if (!This)
|
TRACE("(%p)\n", This);
|
||||||
return E_POINTER;
|
|
||||||
|
|
||||||
refCount = InterlockedDecrement((PLONG)&s->ref);
|
refCount = InterlockedDecrement((PLONG)&s->ref);
|
||||||
|
|
||||||
|
@ -80,6 +84,8 @@ RecycleBinGenericVtbl_RecycleBin_DeleteFile(
|
||||||
WCHAR szVolume[MAX_PATH];
|
WCHAR szVolume[MAX_PATH];
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
|
||||||
|
TRACE("(%p, %s)\n", This, debugstr_w(szFileName));
|
||||||
|
|
||||||
/* Get full file name */
|
/* Get full file name */
|
||||||
while (TRUE)
|
while (TRUE)
|
||||||
{
|
{
|
||||||
|
@ -142,6 +148,8 @@ RecycleBinGenericVtbl_RecycleBin_EmptyRecycleBin(
|
||||||
IRecycleBin *prb;
|
IRecycleBin *prb;
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
|
||||||
|
TRACE("(%p)\n", This);
|
||||||
|
|
||||||
dwLogicalDrives = GetLogicalDrives();
|
dwLogicalDrives = GetLogicalDrives();
|
||||||
if (dwLogicalDrives == 0)
|
if (dwLogicalDrives == 0)
|
||||||
return HRESULT_FROM_WIN32(GetLastError());
|
return HRESULT_FROM_WIN32(GetLastError());
|
||||||
|
@ -170,6 +178,7 @@ RecycleBinGenericVtbl_RecycleBin_EnumObjects(
|
||||||
IN IRecycleBin *This,
|
IN IRecycleBin *This,
|
||||||
OUT IRecycleBinEnumList **ppEnumList)
|
OUT IRecycleBinEnumList **ppEnumList)
|
||||||
{
|
{
|
||||||
|
TRACE("(%p, %p)\n", This, ppEnumList);
|
||||||
return RecycleBinGeneric_Enumerator_Constructor(ppEnumList);
|
return RecycleBinGeneric_Enumerator_Constructor(ppEnumList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,9 +7,11 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define COBJMACROS
|
#define COBJMACROS
|
||||||
#include "recyclebin.h"
|
#include "recyclebin_private.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
WINE_DEFAULT_DEBUG_CHANNEL(recyclebin);
|
||||||
|
|
||||||
struct RecycleBinGenericEnum
|
struct RecycleBinGenericEnum
|
||||||
{
|
{
|
||||||
ULONG ref;
|
ULONG ref;
|
||||||
|
@ -27,6 +29,8 @@ RecycleBinGenericEnum_RecycleBinEnumList_QueryInterface(
|
||||||
{
|
{
|
||||||
struct RecycleBinGenericEnum *s = CONTAINING_RECORD(This, struct RecycleBinGenericEnum, recycleBinEnumImpl);
|
struct RecycleBinGenericEnum *s = CONTAINING_RECORD(This, struct RecycleBinGenericEnum, recycleBinEnumImpl);
|
||||||
|
|
||||||
|
TRACE("(%p, %s, %p)\n", This, debugstr_guid(riid), ppvObject);
|
||||||
|
|
||||||
if (!ppvObject)
|
if (!ppvObject)
|
||||||
return E_POINTER;
|
return E_POINTER;
|
||||||
|
|
||||||
|
@ -50,6 +54,7 @@ RecycleBinGenericEnum_RecycleBinEnumList_AddRef(
|
||||||
{
|
{
|
||||||
struct RecycleBinGenericEnum *s = CONTAINING_RECORD(This, struct RecycleBinGenericEnum, recycleBinEnumImpl);
|
struct RecycleBinGenericEnum *s = CONTAINING_RECORD(This, struct RecycleBinGenericEnum, recycleBinEnumImpl);
|
||||||
ULONG refCount = InterlockedIncrement((PLONG)&s->ref);
|
ULONG refCount = InterlockedIncrement((PLONG)&s->ref);
|
||||||
|
TRACE("(%p)\n", This);
|
||||||
return refCount;
|
return refCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -60,8 +65,7 @@ RecycleBinGenericEnum_RecycleBinEnumList_Release(
|
||||||
struct RecycleBinGenericEnum *s = CONTAINING_RECORD(This, struct RecycleBinGenericEnum, recycleBinEnumImpl);
|
struct RecycleBinGenericEnum *s = CONTAINING_RECORD(This, struct RecycleBinGenericEnum, recycleBinEnumImpl);
|
||||||
ULONG refCount;
|
ULONG refCount;
|
||||||
|
|
||||||
if (!This)
|
TRACE("(%p)\n", This);
|
||||||
return E_POINTER;
|
|
||||||
|
|
||||||
refCount = InterlockedDecrement((PLONG)&s->ref);
|
refCount = InterlockedDecrement((PLONG)&s->ref);
|
||||||
|
|
||||||
|
@ -88,6 +92,8 @@ RecycleBinGenericEnum_RecycleBinEnumList_Next(
|
||||||
DWORD fetched = 0, newFetched;
|
DWORD fetched = 0, newFetched;
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
|
||||||
|
TRACE("(%p, %u, %p, %p)\n", This, celt, rgelt, pceltFetched);
|
||||||
|
|
||||||
if (!rgelt)
|
if (!rgelt)
|
||||||
return E_POINTER;
|
return E_POINTER;
|
||||||
if (!pceltFetched && celt > 1)
|
if (!pceltFetched && celt > 1)
|
||||||
|
@ -173,6 +179,7 @@ RecycleBinGenericEnum_RecycleBinEnumList_Skip(
|
||||||
IN DWORD celt)
|
IN DWORD celt)
|
||||||
{
|
{
|
||||||
struct RecycleBinGenericEnum *s = CONTAINING_RECORD(This, struct RecycleBinGenericEnum, recycleBinEnumImpl);
|
struct RecycleBinGenericEnum *s = CONTAINING_RECORD(This, struct RecycleBinGenericEnum, recycleBinEnumImpl);
|
||||||
|
TRACE("(%p, %u)\n", This, celt);
|
||||||
s->skip += celt;
|
s->skip += celt;
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
@ -183,6 +190,8 @@ RecycleBinGenericEnum_RecycleBinEnumList_Reset(
|
||||||
{
|
{
|
||||||
struct RecycleBinGenericEnum *s = CONTAINING_RECORD(This, struct RecycleBinGenericEnum, recycleBinEnumImpl);
|
struct RecycleBinGenericEnum *s = CONTAINING_RECORD(This, struct RecycleBinGenericEnum, recycleBinEnumImpl);
|
||||||
|
|
||||||
|
TRACE("(%p)\n", This);
|
||||||
|
|
||||||
if (s->current)
|
if (s->current)
|
||||||
{
|
{
|
||||||
IRecycleBinEnumList_Release(s->current);
|
IRecycleBinEnumList_Release(s->current);
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#include "recyclebin.h"
|
#include "recyclebin.h"
|
||||||
#include "sddl.h"
|
#include "sddl.h"
|
||||||
|
#include <wine/debug.h>
|
||||||
|
|
||||||
/* Defines */
|
/* Defines */
|
||||||
#define RECYCLEBIN_MAGIC 0x6e694252
|
#define RECYCLEBIN_MAGIC 0x6e694252
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
#include "recyclebin_v5.h"
|
#include "recyclebin_v5.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
WINE_DEFAULT_DEBUG_CHANNEL(recyclebin);
|
||||||
|
|
||||||
static BOOL
|
static BOOL
|
||||||
IntDeleteRecursive(
|
IntDeleteRecursive(
|
||||||
IN LPCWSTR FullName)
|
IN LPCWSTR FullName)
|
||||||
|
@ -72,6 +74,8 @@ RecycleBin5_RecycleBin5_QueryInterface(
|
||||||
{
|
{
|
||||||
struct RecycleBin5 *s = CONTAINING_RECORD(This, struct RecycleBin5, recycleBinImpl);
|
struct RecycleBin5 *s = CONTAINING_RECORD(This, struct RecycleBin5, recycleBinImpl);
|
||||||
|
|
||||||
|
TRACE("(%p, %s, %p)\n", This, debugstr_guid(riid), ppvObject);
|
||||||
|
|
||||||
if (!ppvObject)
|
if (!ppvObject)
|
||||||
return E_POINTER;
|
return E_POINTER;
|
||||||
|
|
||||||
|
@ -97,6 +101,7 @@ RecycleBin5_RecycleBin5_AddRef(
|
||||||
{
|
{
|
||||||
struct RecycleBin5 *s = CONTAINING_RECORD(This, struct RecycleBin5, recycleBinImpl);
|
struct RecycleBin5 *s = CONTAINING_RECORD(This, struct RecycleBin5, recycleBinImpl);
|
||||||
ULONG refCount = InterlockedIncrement((PLONG)&s->ref);
|
ULONG refCount = InterlockedIncrement((PLONG)&s->ref);
|
||||||
|
TRACE("(%p)\n", This);
|
||||||
return refCount;
|
return refCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -107,8 +112,7 @@ RecycleBin5_RecycleBin5_Release(
|
||||||
struct RecycleBin5 *s = CONTAINING_RECORD(This, struct RecycleBin5, recycleBinImpl);
|
struct RecycleBin5 *s = CONTAINING_RECORD(This, struct RecycleBin5, recycleBinImpl);
|
||||||
ULONG refCount;
|
ULONG refCount;
|
||||||
|
|
||||||
if (!This)
|
TRACE("(%p)\n", This);
|
||||||
return E_POINTER;
|
|
||||||
|
|
||||||
refCount = InterlockedDecrement((PLONG)&s->ref);
|
refCount = InterlockedDecrement((PLONG)&s->ref);
|
||||||
|
|
||||||
|
@ -143,6 +147,8 @@ RecycleBin5_RecycleBin5_DeleteFile(
|
||||||
DWORD ClusterSize, BytesPerSector, SectorsPerCluster;
|
DWORD ClusterSize, BytesPerSector, SectorsPerCluster;
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
|
||||||
|
TRACE("(%p, %s)\n", This, debugstr_w(szFileName));
|
||||||
|
|
||||||
if (s->EnumeratorCount != 0)
|
if (s->EnumeratorCount != 0)
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
|
|
||||||
|
@ -287,6 +293,8 @@ RecycleBin5_RecycleBin5_EmptyRecycleBin(
|
||||||
IRecycleBinFile *prbf;
|
IRecycleBinFile *prbf;
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
|
||||||
|
TRACE("(%p)\n", This);
|
||||||
|
|
||||||
while (TRUE)
|
while (TRUE)
|
||||||
{
|
{
|
||||||
hr = IRecycleBin5_EnumObjects(This, &prbel);
|
hr = IRecycleBin5_EnumObjects(This, &prbel);
|
||||||
|
@ -313,6 +321,8 @@ RecycleBin5_RecycleBin5_EnumObjects(
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
IUnknown *pUnk;
|
IUnknown *pUnk;
|
||||||
|
|
||||||
|
TRACE("(%p, %p)\n", This, ppEnumList);
|
||||||
|
|
||||||
hr = RecycleBin5_Enumerator_Constructor(This, s->hInfo, s->hInfoMapped, s->Folder, &pUnk);
|
hr = RecycleBin5_Enumerator_Constructor(This, s->hInfo, s->hInfoMapped, s->Folder, &pUnk);
|
||||||
if (!SUCCEEDED(hr))
|
if (!SUCCEEDED(hr))
|
||||||
return hr;
|
return hr;
|
||||||
|
@ -339,6 +349,8 @@ RecycleBin5_RecycleBin5_Delete(
|
||||||
DELETED_FILE_RECORD *pRecord, *pLast;
|
DELETED_FILE_RECORD *pRecord, *pLast;
|
||||||
DWORD dwEntries, i;
|
DWORD dwEntries, i;
|
||||||
|
|
||||||
|
TRACE("(%p, %s, %p)\n", This, debugstr_w(pDeletedFileName), pDeletedFile);
|
||||||
|
|
||||||
if (s->EnumeratorCount != 0)
|
if (s->EnumeratorCount != 0)
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
|
|
||||||
|
@ -399,6 +411,8 @@ RecycleBin5_RecycleBin5_Restore(
|
||||||
DELETED_FILE_RECORD *pRecord, *pLast;
|
DELETED_FILE_RECORD *pRecord, *pLast;
|
||||||
DWORD dwEntries, i;
|
DWORD dwEntries, i;
|
||||||
|
|
||||||
|
TRACE("(%p, %s, %p)\n", This, debugstr_w(pDeletedFileName), pDeletedFile);
|
||||||
|
|
||||||
if (s->EnumeratorCount != 0)
|
if (s->EnumeratorCount != 0)
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
|
|
||||||
|
@ -451,9 +465,10 @@ RecycleBin5_RecycleBin5_Restore(
|
||||||
static HRESULT STDMETHODCALLTYPE
|
static HRESULT STDMETHODCALLTYPE
|
||||||
RecycleBin5_RecycleBin5_OnClosing(
|
RecycleBin5_RecycleBin5_OnClosing(
|
||||||
IN IRecycleBin5 *This,
|
IN IRecycleBin5 *This,
|
||||||
IN IRecycleBinEnumList *prb5el)
|
IN IRecycleBinEnumList *prbel)
|
||||||
{
|
{
|
||||||
struct RecycleBin5 *s = CONTAINING_RECORD(This, struct RecycleBin5, recycleBinImpl);
|
struct RecycleBin5 *s = CONTAINING_RECORD(This, struct RecycleBin5, recycleBinImpl);
|
||||||
|
TRACE("(%p, %p)\n", This, prbel);
|
||||||
s->EnumeratorCount--;
|
s->EnumeratorCount--;
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,7 +67,7 @@ typedef struct IRecycleBin5Vtbl
|
||||||
|
|
||||||
HRESULT (STDMETHODCALLTYPE *OnClosing)(
|
HRESULT (STDMETHODCALLTYPE *OnClosing)(
|
||||||
IN IRecycleBin5 *This,
|
IN IRecycleBin5 *This,
|
||||||
IN IRecycleBinEnumList *prb5el);
|
IN IRecycleBinEnumList *prbel);
|
||||||
} IRecycleBin5Vtbl;
|
} IRecycleBin5Vtbl;
|
||||||
|
|
||||||
interface IRecycleBin5
|
interface IRecycleBin5
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
#define COBJMACROS
|
#define COBJMACROS
|
||||||
#include "recyclebin_v5.h"
|
#include "recyclebin_v5.h"
|
||||||
|
|
||||||
|
WINE_DEFAULT_DEBUG_CHANNEL(recyclebin);
|
||||||
|
|
||||||
struct RecycleBin5File
|
struct RecycleBin5File
|
||||||
{
|
{
|
||||||
ULONG ref;
|
ULONG ref;
|
||||||
|
@ -26,6 +28,8 @@ RecycleBin5File_RecycleBinFile_QueryInterface(
|
||||||
{
|
{
|
||||||
struct RecycleBin5File *s = CONTAINING_RECORD(This, struct RecycleBin5File, recycleBinFileImpl);
|
struct RecycleBin5File *s = CONTAINING_RECORD(This, struct RecycleBin5File, recycleBinFileImpl);
|
||||||
|
|
||||||
|
TRACE("(%p, %s, %p)\n", This, debugstr_guid(riid), ppvObject);
|
||||||
|
|
||||||
if (!ppvObject)
|
if (!ppvObject)
|
||||||
return E_POINTER;
|
return E_POINTER;
|
||||||
|
|
||||||
|
@ -49,6 +53,7 @@ RecycleBin5File_RecycleBinFile_AddRef(
|
||||||
{
|
{
|
||||||
struct RecycleBin5File *s = CONTAINING_RECORD(This, struct RecycleBin5File, recycleBinFileImpl);
|
struct RecycleBin5File *s = CONTAINING_RECORD(This, struct RecycleBin5File, recycleBinFileImpl);
|
||||||
ULONG refCount = InterlockedIncrement((PLONG)&s->ref);
|
ULONG refCount = InterlockedIncrement((PLONG)&s->ref);
|
||||||
|
TRACE("(%p)\n", This);
|
||||||
return refCount;
|
return refCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -59,8 +64,7 @@ RecycleBin5File_RecycleBinFile_Release(
|
||||||
struct RecycleBin5File *s = CONTAINING_RECORD(This, struct RecycleBin5File, recycleBinFileImpl);
|
struct RecycleBin5File *s = CONTAINING_RECORD(This, struct RecycleBin5File, recycleBinFileImpl);
|
||||||
ULONG refCount;
|
ULONG refCount;
|
||||||
|
|
||||||
if (!This)
|
TRACE("(%p)\n", This);
|
||||||
return E_POINTER;
|
|
||||||
|
|
||||||
refCount = InterlockedDecrement((PLONG)&s->ref);
|
refCount = InterlockedDecrement((PLONG)&s->ref);
|
||||||
|
|
||||||
|
@ -83,6 +87,8 @@ RecycleBin5File_RecycleBinFile_GetLastModificationTime(
|
||||||
DWORD dwAttributes;
|
DWORD dwAttributes;
|
||||||
HANDLE hFile;
|
HANDLE hFile;
|
||||||
|
|
||||||
|
TRACE("(%p, %p)\n", This, pLastModificationTime);
|
||||||
|
|
||||||
dwAttributes = GetFileAttributesW(s->FullName);
|
dwAttributes = GetFileAttributesW(s->FullName);
|
||||||
if (dwAttributes == INVALID_FILE_ATTRIBUTES)
|
if (dwAttributes == INVALID_FILE_ATTRIBUTES)
|
||||||
return HRESULT_FROM_WIN32(GetLastError());
|
return HRESULT_FROM_WIN32(GetLastError());
|
||||||
|
@ -107,6 +113,7 @@ RecycleBin5File_RecycleBinFile_GetDeletionTime(
|
||||||
OUT FILETIME *pDeletionTime)
|
OUT FILETIME *pDeletionTime)
|
||||||
{
|
{
|
||||||
struct RecycleBin5File *s = CONTAINING_RECORD(This, struct RecycleBin5File, recycleBinFileImpl);
|
struct RecycleBin5File *s = CONTAINING_RECORD(This, struct RecycleBin5File, recycleBinFileImpl);
|
||||||
|
TRACE("(%p, %p)\n", This, pDeletionTime);
|
||||||
*pDeletionTime = s->deletedFile.DeletionTime;
|
*pDeletionTime = s->deletedFile.DeletionTime;
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
@ -121,6 +128,8 @@ RecycleBin5File_RecycleBinFile_GetFileSize(
|
||||||
DWORD dwAttributes;
|
DWORD dwAttributes;
|
||||||
HANDLE hFile;
|
HANDLE hFile;
|
||||||
|
|
||||||
|
TRACE("(%p, %p)\n", This, pFileSize);
|
||||||
|
|
||||||
dwAttributes = GetFileAttributesW(s->FullName);
|
dwAttributes = GetFileAttributesW(s->FullName);
|
||||||
if (dwAttributes == INVALID_FILE_ATTRIBUTES)
|
if (dwAttributes == INVALID_FILE_ATTRIBUTES)
|
||||||
return HRESULT_FROM_WIN32(GetLastError());
|
return HRESULT_FROM_WIN32(GetLastError());
|
||||||
|
@ -148,6 +157,7 @@ RecycleBin5File_RecycleBinFile_GetPhysicalFileSize(
|
||||||
OUT ULARGE_INTEGER *pPhysicalFileSize)
|
OUT ULARGE_INTEGER *pPhysicalFileSize)
|
||||||
{
|
{
|
||||||
struct RecycleBin5File *s = CONTAINING_RECORD(This, struct RecycleBin5File, recycleBinFileImpl);
|
struct RecycleBin5File *s = CONTAINING_RECORD(This, struct RecycleBin5File, recycleBinFileImpl);
|
||||||
|
TRACE("(%p, %p)\n", This, pPhysicalFileSize);
|
||||||
pPhysicalFileSize->u.HighPart = 0;
|
pPhysicalFileSize->u.HighPart = 0;
|
||||||
pPhysicalFileSize->u.LowPart = s->deletedFile.dwPhysicalFileSize;
|
pPhysicalFileSize->u.LowPart = s->deletedFile.dwPhysicalFileSize;
|
||||||
return S_OK;
|
return S_OK;
|
||||||
|
@ -161,6 +171,8 @@ RecycleBin5File_RecycleBinFile_GetAttributes(
|
||||||
struct RecycleBin5File *s = CONTAINING_RECORD(This, struct RecycleBin5File, recycleBinFileImpl);
|
struct RecycleBin5File *s = CONTAINING_RECORD(This, struct RecycleBin5File, recycleBinFileImpl);
|
||||||
DWORD dwAttributes;
|
DWORD dwAttributes;
|
||||||
|
|
||||||
|
TRACE("(%p, %p)\n", This, pAttributes);
|
||||||
|
|
||||||
dwAttributes = GetFileAttributesW(s->FullName);
|
dwAttributes = GetFileAttributesW(s->FullName);
|
||||||
if (dwAttributes == INVALID_FILE_ATTRIBUTES)
|
if (dwAttributes == INVALID_FILE_ATTRIBUTES)
|
||||||
return HRESULT_FROM_WIN32(GetLastError());
|
return HRESULT_FROM_WIN32(GetLastError());
|
||||||
|
@ -179,6 +191,8 @@ RecycleBin5File_RecycleBinFile_GetFileName(
|
||||||
struct RecycleBin5File *s = CONTAINING_RECORD(This, struct RecycleBin5File, recycleBinFileImpl);
|
struct RecycleBin5File *s = CONTAINING_RECORD(This, struct RecycleBin5File, recycleBinFileImpl);
|
||||||
DWORD dwRequired;
|
DWORD dwRequired;
|
||||||
|
|
||||||
|
TRACE("(%p, %u, %p, %p)\n", This, BufferSize, Buffer, RequiredSize);
|
||||||
|
|
||||||
dwRequired = (DWORD)(wcslen(s->deletedFile.FileNameW) + 1) * sizeof(WCHAR);
|
dwRequired = (DWORD)(wcslen(s->deletedFile.FileNameW) + 1) * sizeof(WCHAR);
|
||||||
if (RequiredSize)
|
if (RequiredSize)
|
||||||
*RequiredSize = dwRequired;
|
*RequiredSize = dwRequired;
|
||||||
|
@ -197,6 +211,7 @@ RecycleBin5File_RecycleBinFile_Delete(
|
||||||
IN IRecycleBinFile *This)
|
IN IRecycleBinFile *This)
|
||||||
{
|
{
|
||||||
struct RecycleBin5File *s = CONTAINING_RECORD(This, struct RecycleBin5File, recycleBinFileImpl);
|
struct RecycleBin5File *s = CONTAINING_RECORD(This, struct RecycleBin5File, recycleBinFileImpl);
|
||||||
|
TRACE("(%p)\n", This);
|
||||||
return IRecycleBin5_Delete(s->recycleBin, s->FullName, &s->deletedFile);
|
return IRecycleBin5_Delete(s->recycleBin, s->FullName, &s->deletedFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -205,6 +220,7 @@ RecycleBin5File_RecycleBinFile_Restore(
|
||||||
IN IRecycleBinFile *This)
|
IN IRecycleBinFile *This)
|
||||||
{
|
{
|
||||||
struct RecycleBin5File *s = CONTAINING_RECORD(This, struct RecycleBin5File, recycleBinFileImpl);
|
struct RecycleBin5File *s = CONTAINING_RECORD(This, struct RecycleBin5File, recycleBinFileImpl);
|
||||||
|
TRACE("(%p)\n", This);
|
||||||
return IRecycleBin5_Restore(s->recycleBin, s->FullName, &s->deletedFile);
|
return IRecycleBin5_Restore(s->recycleBin, s->FullName, &s->deletedFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -279,6 +295,8 @@ RecycleBin5Enum_RecycleBinEnumList_QueryInterface(
|
||||||
{
|
{
|
||||||
struct RecycleBin5Enum *s = CONTAINING_RECORD(This, struct RecycleBin5Enum, recycleBinEnumImpl);
|
struct RecycleBin5Enum *s = CONTAINING_RECORD(This, struct RecycleBin5Enum, recycleBinEnumImpl);
|
||||||
|
|
||||||
|
TRACE("(%p, %s, %p)\n", This, debugstr_guid(riid), ppvObject);
|
||||||
|
|
||||||
if (!ppvObject)
|
if (!ppvObject)
|
||||||
return E_POINTER;
|
return E_POINTER;
|
||||||
|
|
||||||
|
@ -302,6 +320,7 @@ RecycleBin5Enum_RecycleBinEnumList_AddRef(
|
||||||
{
|
{
|
||||||
struct RecycleBin5Enum *s = CONTAINING_RECORD(This, struct RecycleBin5Enum, recycleBinEnumImpl);
|
struct RecycleBin5Enum *s = CONTAINING_RECORD(This, struct RecycleBin5Enum, recycleBinEnumImpl);
|
||||||
ULONG refCount = InterlockedIncrement((PLONG)&s->ref);
|
ULONG refCount = InterlockedIncrement((PLONG)&s->ref);
|
||||||
|
TRACE("(%p)\n", This);
|
||||||
return refCount;
|
return refCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -312,8 +331,7 @@ RecycleBin5Enum_RecycleBinEnumList_Release(
|
||||||
struct RecycleBin5Enum *s = CONTAINING_RECORD(This, struct RecycleBin5Enum, recycleBinEnumImpl);
|
struct RecycleBin5Enum *s = CONTAINING_RECORD(This, struct RecycleBin5Enum, recycleBinEnumImpl);
|
||||||
ULONG refCount;
|
ULONG refCount;
|
||||||
|
|
||||||
if (!This)
|
TRACE("(%p)\n", This);
|
||||||
return E_POINTER;
|
|
||||||
|
|
||||||
refCount = InterlockedDecrement((PLONG)&s->ref);
|
refCount = InterlockedDecrement((PLONG)&s->ref);
|
||||||
|
|
||||||
|
@ -343,6 +361,8 @@ RecycleBin5Enum_RecycleBinEnumList_Next(
|
||||||
DWORD dwEntries;
|
DWORD dwEntries;
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
|
||||||
|
TRACE("(%p, %u, %p, %p)\n", This, celt, rgelt, pceltFetched);
|
||||||
|
|
||||||
if (!rgelt)
|
if (!rgelt)
|
||||||
return E_POINTER;
|
return E_POINTER;
|
||||||
if (!pceltFetched && celt > 1)
|
if (!pceltFetched && celt > 1)
|
||||||
|
@ -383,6 +403,7 @@ RecycleBin5Enum_RecycleBinEnumList_Skip(
|
||||||
IN DWORD celt)
|
IN DWORD celt)
|
||||||
{
|
{
|
||||||
struct RecycleBin5Enum *s = CONTAINING_RECORD(This, struct RecycleBin5Enum, recycleBinEnumImpl);
|
struct RecycleBin5Enum *s = CONTAINING_RECORD(This, struct RecycleBin5Enum, recycleBinEnumImpl);
|
||||||
|
TRACE("(%p, %u)\n", This, celt);
|
||||||
s->dwCurrent += celt;
|
s->dwCurrent += celt;
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
@ -392,6 +413,7 @@ RecycleBin5Enum_RecycleBinEnumList_Reset(
|
||||||
IN IRecycleBinEnumList *This)
|
IN IRecycleBinEnumList *This)
|
||||||
{
|
{
|
||||||
struct RecycleBin5Enum *s = CONTAINING_RECORD(This, struct RecycleBin5Enum, recycleBinEnumImpl);
|
struct RecycleBin5Enum *s = CONTAINING_RECORD(This, struct RecycleBin5Enum, recycleBinEnumImpl);
|
||||||
|
TRACE("(%p)\n", This);
|
||||||
s->dwCurrent = 0;
|
s->dwCurrent = 0;
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue