summaryrefslogtreecommitdiff
path: root/zen/FindFilePlus/find_file_plus.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'zen/FindFilePlus/find_file_plus.cpp')
-rw-r--r--zen/FindFilePlus/find_file_plus.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/zen/FindFilePlus/find_file_plus.cpp b/zen/FindFilePlus/find_file_plus.cpp
index 70076aa2..46eb956c 100644
--- a/zen/FindFilePlus/find_file_plus.cpp
+++ b/zen/FindFilePlus/find_file_plus.cpp
@@ -129,10 +129,10 @@ private:
FileSearcher::FileSearcher(const wchar_t* dirname) :
- hDir(NULL),
+ hDir(nullptr),
nextEntryOffset(0)
{
- dirnameNt.Buffer = NULL;
+ dirnameNt.Buffer = nullptr;
dirnameNt.Length = 0;
dirnameNt.MaximumLength = 0;
@@ -148,17 +148,17 @@ FileSearcher::FileSearcher(const wchar_t* dirname) :
// RtlDosPathNameToRelativeNtPathName_U: used by Win7/Win8 available with OS version 5.2 (Windows Server 2003) and higher
if (!rtlDosPathNameToNtPathName_U(dirname, //__in dosFileName,
&dirnameNt, //__out ntFileName,
- NULL, //__out_optFilePart,
- NULL)) //__out_opt relativeName - empty if dosFileName is absolute
+ nullptr, //__out_optFilePart,
+ nullptr)) //__out_opt relativeName - empty if dosFileName is absolute
throw NtFileError(STATUS_OBJECT_PATH_NOT_FOUND); //translates to ERROR_PATH_NOT_FOUND, same behavior like ::FindFirstFileEx()
OBJECT_ATTRIBUTES objAttr = {};
- InitializeObjectAttributes(&objAttr, //[out] POBJECT_ATTRIBUTES initializedAttributes,
- &dirnameNt, //[in] PUNICODE_STRING objectName,
+ InitializeObjectAttributes(&objAttr, //[out] POBJECT_ATTRIBUTES initializedAttributes,
+ &dirnameNt, //[in] PUNICODE_STRING objectName,
OBJ_CASE_INSENSITIVE, //[in] ULONG attributes,
- NULL, //[in] HANDLE rootDirectory,
- NULL); //[in, optional] PSECURITY_DESCRIPTOR securityDescriptor
+ nullptr, //[in] HANDLE rootDirectory,
+ nullptr); //[in, optional] PSECURITY_DESCRIPTOR securityDescriptor
{
IO_STATUS_BLOCK status = {};
NTSTATUS rv = ntOpenFile(&hDir, //__out PHANDLE FileHandle,
@@ -236,15 +236,15 @@ void FileSearcher::readDirImpl(FileInformation& output) //throw FileError
/* corresponding first access in ::FindFirstFileW()
NTSTATUS rv = ntQueryDirectoryFile(hDir, //__in HANDLE fileHandle,
- NULL, //__in_opt HANDLE event,
- NULL, //__in_opt PIO_APC_ROUTINE apcRoutine,
- NULL, //__in_opt PVOID apcContext,
+ nullptr, //__in_opt HANDLE event,
+ nullptr, //__in_opt PIO_APC_ROUTINE apcRoutine,
+ nullptr, //__in_opt PVOID apcContext,
&status, //__out PIO_STATUS_BLOCK ioStatusBlock,
&buffer, //__out_bcount(Length) PVOID fileInformation,
BUFFER_SIZE, //__in ULONG length, ::FindFirstFileW() on all XP/Win7/Win8 uses sizeof(FILE_BOTH_DIR_INFORMATION) + sizeof(TCHAR) * MAX_PATH == 0x268
FileIdBothDirectoryInformation, //__in FILE_INFORMATION_CLASS fileInformationClass - all XP/Win7/Win8 use "FileBothDirectoryInformation"
true, //__in BOOLEAN returnSingleEntry,
- NULL, //__in_opt PUNICODE_STRING mask,
+ nullptr, //__in_opt PUNICODE_STRING mask,
false); //__in BOOLEAN restartScan
*/
@@ -253,15 +253,15 @@ void FileSearcher::readDirImpl(FileInformation& output) //throw FileError
{
IO_STATUS_BLOCK status = {};
NTSTATUS rv = ntQueryDirectoryFile(hDir, //__in HANDLE fileHandle,
- NULL, //__in_opt HANDLE event,
- NULL, //__in_opt PIO_APC_ROUTINE apcRoutine,
- NULL, //__in_opt PVOID apcContext,
+ nullptr, //__in_opt HANDLE event,
+ nullptr, //__in_opt PIO_APC_ROUTINE apcRoutine,
+ nullptr, //__in_opt PVOID apcContext,
&status, //__out PIO_STATUS_BLOCK ioStatusBlock,
&buffer, //__out_bcount(Length) PVOID fileInformation,
BUFFER_SIZE, //__in ULONG length, ::FindNextFileW() on all XP/Win7/Win8 uses sizeof(FILE_BOTH_DIR_INFORMATION) + sizeof(TCHAR) * 2000 == 0x1000
QueryPolicy::fileInformationClass, //__in FILE_INFORMATION_CLASS fileInformationClass - all XP/Win7/Win8 use "FileBothDirectoryInformation"
false, //__in BOOLEAN returnSingleEntry,
- NULL, //__in_opt PUNICODE_STRING mask,
+ nullptr, //__in_opt PUNICODE_STRING mask,
false); //__in BOOLEAN restartScan
if (!NT_SUCCESS(rv))
{
bgstack15