97 if (!(FindData.cFileName[0] ==
'.' &&
98 (FindData.cFileName[1] ==
'\0' || (FindData.cFileName[1] ==
'.' && FindData.cFileName[2] ==
'\0'))))
100 wcscpy(pFilePart, FindData.cFileName);
188 TRACE(
"(%p)\n",
this);
194 TRACE(
"(%p)\n",
this);
204 TRACE(
"(%p)\n",
this);
215 DWORD dwBufferLength = 0;
219 WCHAR szUniqueId[64];
245 else if (
len < dwBufferLength)
249 dwBufferLength =
len;
263 if (dwBufferLength < 2 || szFullName[1] !=
':')
345 DeletedFileName +=
L"\\D";
347 DeletedFileName += szUniqueId;
377 if (
MoveFileW(szFullName, DeletedFileName))
393 TRACE(
"(%p)\n",
this);
397 IRecycleBinEnumList *prbel;
402 IRecycleBinFile *prbf;
403 hr = prbel->Next(1, &prbf,
NULL);
416 TRACE(
"(%p, %p)\n",
this, ppEnumList);
423 IRecycleBinEnumList *prbel;
444 TRACE(
"(%p, %s, %p)\n",
this,
debugstr_w(pDeletedFileName), pDeletedFile);
462 for (
i = 0;
i < dwEntries;
i++)
475 pLast = pRecord + (dwEntries -
i - 1);
504 TRACE(
"(%p, %s, %p)\n",
this,
debugstr_w(pDeletedFileName), pDeletedFile);
522 for (
i = 0;
i < dwEntries;
i++)
529 ERR(
"SHFileOperationW failed with 0x%x\n",
res);
536 pLast = pRecord + (dwEntries -
i - 1);
560 TRACE(
"(%p, %p)\n",
this, prbel);
573 LPCSTR DesktopIniContents =
"[.ShellClassInfo]\r\nCLSID={645FF040-5081-101B-9F08-00AA002F954E}\r\n";
574 INFO2_HEADER Info2Contents[] = { { 5, 0, 0, 0x320, 0 } };
587 wcscpy(BufferName, Folder);
588 Separator =
wcsstr(&BufferName[3],
L"\\");
639 BytesToWrite =
strlen(DesktopIniContents);
661 BytesToWrite =
sizeof(Info2Contents);
682 , m_hInfoMapped(
NULL)
683 , m_EnumeratorCount(0)
689 DWORD FileSystemFlags;
ACPI_SIZE strlen(const char *String)
#define InterlockedIncrement
#define InterlockedDecrement
int GetLength() const noexcept
CStringT Left(int nCount) const
bool Initialize(LPCWSTR Str)
CZZWStr & operator=(const CZZWStr &)=delete
CZZWStr(const CZZWStr &)=delete
STDMETHODIMP Restore(_In_ LPCWSTR pDeletedFileName, _In_ DELETED_FILE_RECORD *pDeletedFile) override
STDMETHODIMP Delete(_In_ LPCWSTR pDeletedFileName, _In_ DELETED_FILE_RECORD *pDeletedFile) override
STDMETHODIMP_(ULONG) Release() override
STDMETHODIMP EmptyRecycleBin() override
STDMETHODIMP OnClosing(_In_ IRecycleBinEnumList *prbel) override
STDMETHODIMP QueryInterface(_In_ REFIID riid, _Out_ void **ppvObject) override
STDMETHODIMP DeleteFile(_In_ LPCWSTR szFileName) override
STDMETHODIMP_(ULONG) AddRef() override
HRESULT Init(_In_ LPCWSTR VolumePath)
STDMETHODIMP EnumObjects(_Out_ IRecycleBinEnumList **ppEnumList) override
#define ERROR_NOT_ENOUGH_MEMORY
#define ERROR_INSUFFICIENT_BUFFER
BOOL WINAPI GetTokenInformation(HANDLE TokenHandle, TOKEN_INFORMATION_CLASS TokenInformationClass, LPVOID TokenInformation, DWORD TokenInformationLength, PDWORD ReturnLength)
BOOL WINAPI OpenProcessToken(HANDLE ProcessHandle, DWORD DesiredAccess, PHANDLE TokenHandle)
BOOL WINAPI ConvertSidToStringSidW(PSID Sid, LPWSTR *StringSid)
#define INVALID_HANDLE_VALUE
#define CreateFileMappingW(a, b, c, d, e, f)
#define GetCurrentProcess()
#define ERROR_NOT_SUPPORTED
#define HeapFree(x, y, z)
#define WideCharToMultiByte
#define ERROR_INVALID_NAME
static DWORD DWORD * dwLength
static void cleanup(void)
BOOL WINAPI DeleteFileW(IN LPCWSTR lpFileName)
BOOL WINAPI CreateDirectoryW(IN LPCWSTR lpPathName, IN LPSECURITY_ATTRIBUTES lpSecurityAttributes)
BOOL WINAPI RemoveDirectoryW(IN LPCWSTR lpPathName)
BOOL WINAPI GetDiskFreeSpaceW(IN LPCWSTR lpRootPathName, OUT LPDWORD lpSectorsPerCluster, OUT LPDWORD lpBytesPerSector, OUT LPDWORD lpNumberOfFreeClusters, OUT LPDWORD lpTotalNumberOfClusters)
DWORD WINAPI GetFileAttributesW(LPCWSTR lpFileName)
BOOL WINAPI SetFileAttributesW(LPCWSTR lpFileName, DWORD dwFileAttributes)
BOOL WINAPI SetEndOfFile(HANDLE hFile)
DWORD WINAPI GetFileSize(HANDLE hFile, LPDWORD lpFileSizeHigh)
HANDLE WINAPI FindFirstFileW(IN LPCWSTR lpFileName, OUT LPWIN32_FIND_DATAW lpFindFileData)
BOOL WINAPI FindClose(HANDLE hFindFile)
BOOL WINAPI FindNextFileW(IN HANDLE hFindFile, OUT LPWIN32_FIND_DATAW lpFindFileData)
BOOL WINAPI MoveFileW(IN LPCWSTR lpExistingFileName, IN LPCWSTR lpNewFileName)
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
BOOL WINAPI GetVolumeInformationW(IN LPCWSTR lpRootPathName, IN LPWSTR lpVolumeNameBuffer, IN DWORD nVolumeNameSize, OUT LPDWORD lpVolumeSerialNumber OPTIONAL, OUT LPDWORD lpMaximumComponentLength OPTIONAL, OUT LPDWORD lpFileSystemFlags OPTIONAL, OUT LPWSTR lpFileSystemNameBuffer OPTIONAL, IN DWORD nFileSystemNameSize)
DWORD WINAPI GetFullPathNameW(IN LPCWSTR lpFileName, IN DWORD nBufferLength, OUT LPWSTR lpBuffer, OUT LPWSTR *lpFilePart)
BOOL WINAPI SystemTimeToFileTime(IN CONST SYSTEMTIME *lpSystemTime, OUT LPFILETIME lpFileTime)
VOID WINAPI GetSystemTime(OUT LPSYSTEMTIME lpSystemTime)
void WINAPI SHFree(LPVOID pv)
LPVOID WINAPI SHAlloc(SIZE_T len)
LPWSTR WINAPI PathFindExtensionW(LPCWSTR lpszPath)
static void *static void *static LPDIRECTPLAY IUnknown * pUnk
#define ROUND_UP(n, align)
struct _FileName FileName
_Must_inspect_result_ _In_opt_ PFLT_INSTANCE _Out_ PHANDLE _In_ ACCESS_MASK _In_ POBJECT_ATTRIBUTES _Out_ PIO_STATUS_BLOCK _In_opt_ PLARGE_INTEGER _In_ ULONG FileAttributes
_Inout_opt_ PUNICODE_STRING Extension
#define FILE_PERSISTENT_ACLS
_Must_inspect_result_ _Out_ PLARGE_INTEGER FileSize
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
FxContextHeader * pHeader
HLOCAL NTAPI LocalFree(HLOCAL hMem)
VOID WINAPI CoTaskMemFree(LPVOID ptr)
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
_CRTIMP wchar_t *__cdecl _ultow(_In_ unsigned long _Value, _Pre_notnull_ _Post_z_ wchar_t *_Dest, _In_ int _Radix)
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
_CONST_RETURN wchar_t *__cdecl wcsstr(_In_z_ const wchar_t *_Str, _In_z_ const wchar_t *_SubStr)
nsresult QueryInterface(nsIIDRef riid, void **result)
#define ERROR_ALREADY_EXISTS
#define FILE_FLAG_BACKUP_SEMANTICS
#define ERROR_FILE_NOT_FOUND
static DWORD DWORD void LPSTR DWORD cch
static ULONG WINAPI AddRef(IStream *iface)
#define FILE_ATTRIBUTE_READONLY
#define FILE_ATTRIBUTE_HIDDEN
#define FILE_ATTRIBUTE_SYSTEM
#define FILE_ATTRIBUTE_DIRECTORY
#define IsEqualIID(riid1, riid2)
EXTERN_C const IID IID_IRecycleBin
EXTERN_C const IID IID_IRecycleBinEnumList
#define RECYCLE_BIN_DIRECTORY_WITH_ACL
#define RECYCLE_BIN_FILE_NAME
struct _INFO2_HEADER * PINFO2_HEADER
#define RECYCLE_BIN_DIRECTORY_WITHOUT_ACL
EXTERN_C HRESULT WINAPI SHUpdateRecycleBinIcon(void)
static int SHELL_SingleFileOperation(HWND hWnd, UINT Op, LPCWSTR pszFrom, LPCWSTR pszTo, FILEOP_FLAGS Flags)
static HRESULT RecycleBin5_Create(_In_ LPCWSTR Folder, _In_ PSID OwnerSid OPTIONAL)
EXTERN_C HRESULT RecycleBin5_Constructor(_In_ LPCWSTR VolumePath, _Out_ IUnknown **ppUnknown)
static BOOL IntDeleteRecursive(IN LPCWSTR FullName)
EXTERN_C const IID IID_IRecycleBin5
struct _DELETED_FILE_RECORD * PDELETED_FILE_RECORD
EXTERN_C HRESULT RecycleBin5Enum_Constructor(_In_ IRecycleBin5 *prb, _In_ HANDLE hInfo, _In_ HANDLE hInfoMapped, _In_ LPCWSTR szPrefix, _Out_ IUnknown **ppUnknown)
interface IRecycleBin5 IRecycleBin5
struct _DELETED_FILE_RECORD DELETED_FILE_RECORD
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
_CRTIMP wchar_t *__cdecl wcscat(_Inout_updates_z_(_String_length_(_Dest)+_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp)
PULONG MinorVersion OPTIONAL
WCHAR FileNameW[MAX_PATH]
struct _LARGE_INTEGER::@2304 u
#define INVALID_FILE_ATTRIBUTES
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR _In_opt_ PLONGLONG _In_opt_ PWDF_REQUEST_SEND_OPTIONS _Out_opt_ PULONG_PTR BytesWritten
DWORD WINAPI GetLastError(void)
#define INVALID_FILE_SIZE
_In_ LPCSTR _In_opt_ LPCSTR _In_ DWORD _Out_opt_ LPSTR * lpFilePart
_In_ void _In_ PCCERT_CONTEXT _In_opt_ LPFILETIME _In_ DWORD _In_ DWORD _Outptr_opt_ void ** ppvObject
#define ERROR_SHARING_VIOLATION
#define ERROR_PATH_NOT_FOUND
#define ERROR_NO_MORE_FILES
#define HRESULT_FROM_WIN32(x)
_Must_inspect_result_ _In_ ULONG Flags
struct _TOKEN_USER * PTOKEN_USER