Author: hpoussin
Date: Wed Oct 31 16:04:47 2007
New Revision: 30009
URL:
http://svn.reactos.org/svn/reactos?rev=30009&view=rev
Log:
Add traces
Fix typo in EnumerateRecycleBinW
Modified:
trunk/reactos/lib/recyclebin/recyclebin.c
trunk/reactos/lib/recyclebin/recyclebin_generic.c
trunk/reactos/lib/recyclebin/recyclebin_generic_enumerator.c
trunk/reactos/lib/recyclebin/recyclebin_private.h
trunk/reactos/lib/recyclebin/recyclebin_v5.c
trunk/reactos/lib/recyclebin/recyclebin_v5.h
trunk/reactos/lib/recyclebin/recyclebin_v5_enumerator.c
Modified: trunk/reactos/lib/recyclebin/recyclebin.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/recyclebin/recyclebin.…
==============================================================================
--- trunk/reactos/lib/recyclebin/recyclebin.c (original)
+++ trunk/reactos/lib/recyclebin/recyclebin.c Wed Oct 31 16:04:47 2007
@@ -204,14 +204,13 @@
hr = HRESULT_FROM_WIN32(GetLastError());
goto cleanup;
}
- IRecycleBinFile_Release(prbf);
}
cleanup:
if (prb)
IRecycleBin_Release(prb);
if (prbel)
- IRecycleBinEnumList_Release(prb);
+ IRecycleBinEnumList_Release(prbel);
if (SUCCEEDED(hr))
return TRUE;
if (HRESULT_FACILITY(hr) == FACILITY_WIN32)
Modified: trunk/reactos/lib/recyclebin/recyclebin_generic.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/recyclebin/recyclebin_…
==============================================================================
--- trunk/reactos/lib/recyclebin/recyclebin_generic.c (original)
+++ trunk/reactos/lib/recyclebin/recyclebin_generic.c Wed Oct 31 16:04:47 2007
@@ -10,6 +10,8 @@
#include "recyclebin_private.h"
#include <stdio.h>
+WINE_DEFAULT_DEBUG_CHANNEL(recyclebin);
+
struct RecycleBinGeneric
{
ULONG ref;
@@ -23,6 +25,8 @@
void **ppvObject)
{
struct RecycleBinGeneric *s = CONTAINING_RECORD(This, struct RecycleBinGeneric,
recycleBinImpl);
+
+ TRACE("(%p, %s, %p)\n", This, debugstr_guid(riid), ppvObject);
if (!ppvObject)
return E_POINTER;
@@ -47,6 +51,7 @@
{
struct RecycleBinGeneric *s = CONTAINING_RECORD(This, struct RecycleBinGeneric,
recycleBinImpl);
ULONG refCount = InterlockedIncrement((PLONG)&s->ref);
+ TRACE("(%p)\n", This);
return refCount;
}
@@ -57,8 +62,7 @@
struct RecycleBinGeneric *s = CONTAINING_RECORD(This, struct RecycleBinGeneric,
recycleBinImpl);
ULONG refCount;
- if (!This)
- return E_POINTER;
+ TRACE("(%p)\n", This);
refCount = InterlockedDecrement((PLONG)&s->ref);
@@ -79,6 +83,8 @@
DWORD len;
WCHAR szVolume[MAX_PATH];
HRESULT hr;
+
+ TRACE("(%p, %s)\n", This, debugstr_w(szFileName));
/* Get full file name */
while (TRUE)
@@ -142,6 +148,8 @@
IRecycleBin *prb;
HRESULT hr;
+ TRACE("(%p)\n", This);
+
dwLogicalDrives = GetLogicalDrives();
if (dwLogicalDrives == 0)
return HRESULT_FROM_WIN32(GetLastError());
@@ -170,6 +178,7 @@
IN IRecycleBin *This,
OUT IRecycleBinEnumList **ppEnumList)
{
+ TRACE("(%p, %p)\n", This, ppEnumList);
return RecycleBinGeneric_Enumerator_Constructor(ppEnumList);
}
Modified: trunk/reactos/lib/recyclebin/recyclebin_generic_enumerator.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/recyclebin/recyclebin_…
==============================================================================
--- trunk/reactos/lib/recyclebin/recyclebin_generic_enumerator.c (original)
+++ trunk/reactos/lib/recyclebin/recyclebin_generic_enumerator.c Wed Oct 31 16:04:47 2007
@@ -7,8 +7,10 @@
*/
#define COBJMACROS
-#include "recyclebin.h"
+#include "recyclebin_private.h"
#include <stdio.h>
+
+WINE_DEFAULT_DEBUG_CHANNEL(recyclebin);
struct RecycleBinGenericEnum
{
@@ -27,6 +29,8 @@
{
struct RecycleBinGenericEnum *s = CONTAINING_RECORD(This, struct RecycleBinGenericEnum,
recycleBinEnumImpl);
+ TRACE("(%p, %s, %p)\n", This, debugstr_guid(riid), ppvObject);
+
if (!ppvObject)
return E_POINTER;
@@ -50,6 +54,7 @@
{
struct RecycleBinGenericEnum *s = CONTAINING_RECORD(This, struct RecycleBinGenericEnum,
recycleBinEnumImpl);
ULONG refCount = InterlockedIncrement((PLONG)&s->ref);
+ TRACE("(%p)\n", This);
return refCount;
}
@@ -60,8 +65,7 @@
struct RecycleBinGenericEnum *s = CONTAINING_RECORD(This, struct RecycleBinGenericEnum,
recycleBinEnumImpl);
ULONG refCount;
- if (!This)
- return E_POINTER;
+ TRACE("(%p)\n", This);
refCount = InterlockedDecrement((PLONG)&s->ref);
@@ -87,6 +91,8 @@
DWORD i;
DWORD fetched = 0, newFetched;
HRESULT hr;
+
+ TRACE("(%p, %u, %p, %p)\n", This, celt, rgelt, pceltFetched);
if (!rgelt)
return E_POINTER;
@@ -173,6 +179,7 @@
IN DWORD celt)
{
struct RecycleBinGenericEnum *s = CONTAINING_RECORD(This, struct RecycleBinGenericEnum,
recycleBinEnumImpl);
+ TRACE("(%p, %u)\n", This, celt);
s->skip += celt;
return S_OK;
}
@@ -182,6 +189,8 @@
IN IRecycleBinEnumList *This)
{
struct RecycleBinGenericEnum *s = CONTAINING_RECORD(This, struct RecycleBinGenericEnum,
recycleBinEnumImpl);
+
+ TRACE("(%p)\n", This);
if (s->current)
{
Modified: trunk/reactos/lib/recyclebin/recyclebin_private.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/recyclebin/recyclebin_…
==============================================================================
--- trunk/reactos/lib/recyclebin/recyclebin_private.h (original)
+++ trunk/reactos/lib/recyclebin/recyclebin_private.h Wed Oct 31 16:04:47 2007
@@ -1,5 +1,6 @@
#include "recyclebin.h"
#include "sddl.h"
+#include <wine/debug.h>
/* Defines */
#define RECYCLEBIN_MAGIC 0x6e694252
Modified: trunk/reactos/lib/recyclebin/recyclebin_v5.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/recyclebin/recyclebin_…
==============================================================================
--- trunk/reactos/lib/recyclebin/recyclebin_v5.c (original)
+++ trunk/reactos/lib/recyclebin/recyclebin_v5.c Wed Oct 31 16:04:47 2007
@@ -10,6 +10,8 @@
#include "recyclebin_v5.h"
#include <stdio.h>
+WINE_DEFAULT_DEBUG_CHANNEL(recyclebin);
+
static BOOL
IntDeleteRecursive(
IN LPCWSTR FullName)
@@ -71,6 +73,8 @@
void **ppvObject)
{
struct RecycleBin5 *s = CONTAINING_RECORD(This, struct RecycleBin5, recycleBinImpl);
+
+ TRACE("(%p, %s, %p)\n", This, debugstr_guid(riid), ppvObject);
if (!ppvObject)
return E_POINTER;
@@ -97,6 +101,7 @@
{
struct RecycleBin5 *s = CONTAINING_RECORD(This, struct RecycleBin5, recycleBinImpl);
ULONG refCount = InterlockedIncrement((PLONG)&s->ref);
+ TRACE("(%p)\n", This);
return refCount;
}
@@ -107,8 +112,7 @@
struct RecycleBin5 *s = CONTAINING_RECORD(This, struct RecycleBin5, recycleBinImpl);
ULONG refCount;
- if (!This)
- return E_POINTER;
+ TRACE("(%p)\n", This);
refCount = InterlockedDecrement((PLONG)&s->ref);
@@ -143,6 +147,8 @@
DWORD ClusterSize, BytesPerSector, SectorsPerCluster;
HRESULT hr;
+ TRACE("(%p, %s)\n", This, debugstr_w(szFileName));
+
if (s->EnumeratorCount != 0)
return E_FAIL;
@@ -286,6 +292,8 @@
IRecycleBinEnumList *prbel;
IRecycleBinFile *prbf;
HRESULT hr;
+
+ TRACE("(%p)\n", This);
while (TRUE)
{
@@ -313,6 +321,8 @@
HRESULT hr;
IUnknown *pUnk;
+ TRACE("(%p, %p)\n", This, ppEnumList);
+
hr = RecycleBin5_Enumerator_Constructor(This, s->hInfo, s->hInfoMapped,
s->Folder, &pUnk);
if (!SUCCEEDED(hr))
return hr;
@@ -338,6 +348,8 @@
PINFO2_HEADER pHeader;
DELETED_FILE_RECORD *pRecord, *pLast;
DWORD dwEntries, i;
+
+ TRACE("(%p, %s, %p)\n", This, debugstr_w(pDeletedFileName), pDeletedFile);
if (s->EnumeratorCount != 0)
return E_FAIL;
@@ -399,6 +411,8 @@
DELETED_FILE_RECORD *pRecord, *pLast;
DWORD dwEntries, i;
+ TRACE("(%p, %s, %p)\n", This, debugstr_w(pDeletedFileName), pDeletedFile);
+
if (s->EnumeratorCount != 0)
return E_FAIL;
@@ -451,9 +465,10 @@
static HRESULT STDMETHODCALLTYPE
RecycleBin5_RecycleBin5_OnClosing(
IN IRecycleBin5 *This,
- IN IRecycleBinEnumList *prb5el)
+ IN IRecycleBinEnumList *prbel)
{
struct RecycleBin5 *s = CONTAINING_RECORD(This, struct RecycleBin5, recycleBinImpl);
+ TRACE("(%p, %p)\n", This, prbel);
s->EnumeratorCount--;
return S_OK;
}
Modified: trunk/reactos/lib/recyclebin/recyclebin_v5.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/recyclebin/recyclebin_…
==============================================================================
--- trunk/reactos/lib/recyclebin/recyclebin_v5.h (original)
+++ trunk/reactos/lib/recyclebin/recyclebin_v5.h Wed Oct 31 16:04:47 2007
@@ -67,7 +67,7 @@
HRESULT (STDMETHODCALLTYPE *OnClosing)(
IN IRecycleBin5 *This,
- IN IRecycleBinEnumList *prb5el);
+ IN IRecycleBinEnumList *prbel);
} IRecycleBin5Vtbl;
interface IRecycleBin5
Modified: trunk/reactos/lib/recyclebin/recyclebin_v5_enumerator.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/recyclebin/recyclebin_…
==============================================================================
--- trunk/reactos/lib/recyclebin/recyclebin_v5_enumerator.c (original)
+++ trunk/reactos/lib/recyclebin/recyclebin_v5_enumerator.c Wed Oct 31 16:04:47 2007
@@ -9,6 +9,8 @@
#define COBJMACROS
#include "recyclebin_v5.h"
+WINE_DEFAULT_DEBUG_CHANNEL(recyclebin);
+
struct RecycleBin5File
{
ULONG ref;
@@ -26,6 +28,8 @@
{
struct RecycleBin5File *s = CONTAINING_RECORD(This, struct RecycleBin5File,
recycleBinFileImpl);
+ TRACE("(%p, %s, %p)\n", This, debugstr_guid(riid), ppvObject);
+
if (!ppvObject)
return E_POINTER;
@@ -49,6 +53,7 @@
{
struct RecycleBin5File *s = CONTAINING_RECORD(This, struct RecycleBin5File,
recycleBinFileImpl);
ULONG refCount = InterlockedIncrement((PLONG)&s->ref);
+ TRACE("(%p)\n", This);
return refCount;
}
@@ -59,8 +64,7 @@
struct RecycleBin5File *s = CONTAINING_RECORD(This, struct RecycleBin5File,
recycleBinFileImpl);
ULONG refCount;
- if (!This)
- return E_POINTER;
+ TRACE("(%p)\n", This);
refCount = InterlockedDecrement((PLONG)&s->ref);
@@ -83,6 +87,8 @@
DWORD dwAttributes;
HANDLE hFile;
+ TRACE("(%p, %p)\n", This, pLastModificationTime);
+
dwAttributes = GetFileAttributesW(s->FullName);
if (dwAttributes == INVALID_FILE_ATTRIBUTES)
return HRESULT_FROM_WIN32(GetLastError());
@@ -107,6 +113,7 @@
OUT FILETIME *pDeletionTime)
{
struct RecycleBin5File *s = CONTAINING_RECORD(This, struct RecycleBin5File,
recycleBinFileImpl);
+ TRACE("(%p, %p)\n", This, pDeletionTime);
*pDeletionTime = s->deletedFile.DeletionTime;
return S_OK;
}
@@ -121,6 +128,8 @@
DWORD dwAttributes;
HANDLE hFile;
+ TRACE("(%p, %p)\n", This, pFileSize);
+
dwAttributes = GetFileAttributesW(s->FullName);
if (dwAttributes == INVALID_FILE_ATTRIBUTES)
return HRESULT_FROM_WIN32(GetLastError());
@@ -148,6 +157,7 @@
OUT ULARGE_INTEGER *pPhysicalFileSize)
{
struct RecycleBin5File *s = CONTAINING_RECORD(This, struct RecycleBin5File,
recycleBinFileImpl);
+ TRACE("(%p, %p)\n", This, pPhysicalFileSize);
pPhysicalFileSize->u.HighPart = 0;
pPhysicalFileSize->u.LowPart = s->deletedFile.dwPhysicalFileSize;
return S_OK;
@@ -160,6 +170,8 @@
{
struct RecycleBin5File *s = CONTAINING_RECORD(This, struct RecycleBin5File,
recycleBinFileImpl);
DWORD dwAttributes;
+
+ TRACE("(%p, %p)\n", This, pAttributes);
dwAttributes = GetFileAttributesW(s->FullName);
if (dwAttributes == INVALID_FILE_ATTRIBUTES)
@@ -179,6 +191,8 @@
struct RecycleBin5File *s = CONTAINING_RECORD(This, struct RecycleBin5File,
recycleBinFileImpl);
DWORD dwRequired;
+ TRACE("(%p, %u, %p, %p)\n", This, BufferSize, Buffer, RequiredSize);
+
dwRequired = (DWORD)(wcslen(s->deletedFile.FileNameW) + 1) * sizeof(WCHAR);
if (RequiredSize)
*RequiredSize = dwRequired;
@@ -197,6 +211,7 @@
IN IRecycleBinFile *This)
{
struct RecycleBin5File *s = CONTAINING_RECORD(This, struct RecycleBin5File,
recycleBinFileImpl);
+ TRACE("(%p)\n", This);
return IRecycleBin5_Delete(s->recycleBin, s->FullName, &s->deletedFile);
}
@@ -205,6 +220,7 @@
IN IRecycleBinFile *This)
{
struct RecycleBin5File *s = CONTAINING_RECORD(This, struct RecycleBin5File,
recycleBinFileImpl);
+ TRACE("(%p)\n", This);
return IRecycleBin5_Restore(s->recycleBin, s->FullName, &s->deletedFile);
}
@@ -279,6 +295,8 @@
{
struct RecycleBin5Enum *s = CONTAINING_RECORD(This, struct RecycleBin5Enum,
recycleBinEnumImpl);
+ TRACE("(%p, %s, %p)\n", This, debugstr_guid(riid), ppvObject);
+
if (!ppvObject)
return E_POINTER;
@@ -302,6 +320,7 @@
{
struct RecycleBin5Enum *s = CONTAINING_RECORD(This, struct RecycleBin5Enum,
recycleBinEnumImpl);
ULONG refCount = InterlockedIncrement((PLONG)&s->ref);
+ TRACE("(%p)\n", This);
return refCount;
}
@@ -312,8 +331,7 @@
struct RecycleBin5Enum *s = CONTAINING_RECORD(This, struct RecycleBin5Enum,
recycleBinEnumImpl);
ULONG refCount;
- if (!This)
- return E_POINTER;
+ TRACE("(%p)\n", This);
refCount = InterlockedDecrement((PLONG)&s->ref);
@@ -342,6 +360,8 @@
DWORD fetched = 0, i;
DWORD dwEntries;
HRESULT hr;
+
+ TRACE("(%p, %u, %p, %p)\n", This, celt, rgelt, pceltFetched);
if (!rgelt)
return E_POINTER;
@@ -383,6 +403,7 @@
IN DWORD celt)
{
struct RecycleBin5Enum *s = CONTAINING_RECORD(This, struct RecycleBin5Enum,
recycleBinEnumImpl);
+ TRACE("(%p, %u)\n", This, celt);
s->dwCurrent += celt;
return S_OK;
}
@@ -392,6 +413,7 @@
IN IRecycleBinEnumList *This)
{
struct RecycleBin5Enum *s = CONTAINING_RECORD(This, struct RecycleBin5Enum,
recycleBinEnumImpl);
+ TRACE("(%p)\n", This);
s->dwCurrent = 0;
return S_OK;
}