22#define BugCheckFileId (FAT_BUG_CHECK_DIRSUP)
28#define Dbg (DEBUG_TRACE_DIRSUP)
49#define FatConstructDot(IRPCONTEXT,DCB,PARENT,DIRENT) { \
51 RtlCopyMemory( (PUCHAR)(DIRENT), ". ", 11 ); \
52 (DIRENT)->Attributes = FAT_DIRENT_ATTR_DIRECTORY; \
53 (DIRENT)->LastWriteTime = (PARENT)->LastWriteTime; \
54 if (FatData.ChicagoMode) { \
55 (DIRENT)->CreationTime = (PARENT)->CreationTime; \
56 (DIRENT)->CreationMSec = (PARENT)->CreationMSec; \
57 (DIRENT)->LastAccessDate = (PARENT)->LastAccessDate; \
59 (DIRENT)->FirstClusterOfFile = \
60 (USHORT)(DCB)->FirstClusterOfFile; \
61 (DIRENT)->FirstClusterOfFileHi = \
62 (USHORT)((DCB)->FirstClusterOfFile/0x10000); \
80#define FatConstructDotDot(IRPCONTEXT,DCB,PARENT,DIRENT) { \
82 RtlCopyMemory( (PUCHAR)(DIRENT), ".. ", 11 ); \
83 (DIRENT)->Attributes = FAT_DIRENT_ATTR_DIRECTORY; \
84 (DIRENT)->LastWriteTime = (PARENT)->LastWriteTime; \
85 if (FatData.ChicagoMode) { \
86 (DIRENT)->CreationTime = (PARENT)->CreationTime; \
87 (DIRENT)->CreationMSec = (PARENT)->CreationMSec; \
88 (DIRENT)->LastAccessDate = (PARENT)->LastAccessDate; \
90 if (NodeType((DCB)->ParentDcb) == FAT_NTC_ROOT_DCB) { \
91 (DIRENT)->FirstClusterOfFile = 0; \
92 (DIRENT)->FirstClusterOfFileHi = 0; \
94 (DIRENT)->FirstClusterOfFile = (USHORT) \
95 ((DCB)->ParentDcb->FirstClusterOfFile); \
96 (DIRENT)->FirstClusterOfFileHi = (USHORT) \
97 ((DCB)->ParentDcb->FirstClusterOfFile/0x10000); \
113#define FatConstructEndDirent(IRPCONTEXT,DIRENT) NOTHING
132#define FatReadDirent(IRPCONTEXT,DCB,VBO,BCB,DIRENT,STATUS) \
133if ((VBO) >= (DCB)->Header.AllocationSize.LowPart) { \
134 *(STATUS) = STATUS_END_OF_FILE; \
135 FatUnpinBcb( (IRPCONTEXT), *(BCB) ); \
136} else if ( ((VBO) % PAGE_SIZE == 0) || (*(BCB) == NULL) ) { \
137 FatUnpinBcb( (IRPCONTEXT), *(BCB) ); \
138 FatReadDirectoryFile( (IRPCONTEXT), \
140 (VBO) & ~(PAGE_SIZE - 1), \
146 *(DIRENT) = (PVOID)((PUCHAR)*(DIRENT) + ((VBO) % PAGE_SIZE)); \
175#pragma alloc_text(PAGE, FatComputeLfnChecksum)
176#pragma alloc_text(PAGE, FatConstructDirent)
177#pragma alloc_text(PAGE, FatConstructLabelDirent)
178#pragma alloc_text(PAGE, FatCreateNewDirent)
179#pragma alloc_text(PAGE, FatDefragDirectory)
180#pragma alloc_text(PAGE, FatDeleteDirent)
181#pragma alloc_text(PAGE, FatGetDirentFromFcbOrDcb)
182#pragma alloc_text(PAGE, FatInitializeDirectoryDirent)
183#pragma alloc_text(PAGE, FatIsDirectoryEmpty)
184#pragma alloc_text(PAGE, FatLfnDirentExists)
185#pragma alloc_text(PAGE, FatLocateDirent)
186#pragma alloc_text(PAGE, FatLocateSimpleOemDirent)
187#pragma alloc_text(PAGE, FatLocateVolumeLabel)
188#pragma alloc_text(PAGE, FatRescanDirectory)
189#pragma alloc_text(PAGE, FatSetFileSizeInDirent)
190#pragma alloc_text(PAGE, FatSetFileSizeInDirentNoRaise)
191#pragma alloc_text(PAGE, FatTunnelFcbOrDcb)
192#pragma alloc_text(PAGE, FatUpdateDirentFromFcb)
276 if (UnusedVbo == 0xffffffff ||
RescanDir) {
318 DeletedHint /
sizeof(
DIRENT) );
365 DebugTrace( 0,
Dbg,
"We have to allocate another cluster.\n", 0);
385 DebugTrace(0,
Dbg,
"Full root directory or too big on FAT32. Raise Status.\n", 0);
409 FatPrepareWriteDirectoryFile( IrpContext,
440 0 : 2 *
sizeof(
DIRENT)))) {
552FatInitializeDirectoryDirent (
615 FatPrepareWriteDirectoryFile( IrpContext,
646 DebugTrace(-1,
Dbg,
"FatInitializeDirectoryDirent -> (VOID)\n", 0);
678 WCHAR ShortNameBuffer[8+1+3];
706 ShortNameWithCase.
Length = 0;
708 ShortNameWithCase.
Buffer = ShortNameBuffer;
711#pragma prefast( suppress:28931, "needed for debug build" )
728 ShortNameWithCase.
Buffer[
i] !=
L'.';
i++);
825 ULONG DirentsToDelete;
859 DebugTrace( 0,
Dbg,
"Called with non zero allocation/file size.\n", 0);
862#pragma prefast( suppress:28159, "things are seriously wrong if we get here" )
886 Offset <= FcbOrDcb->DirentOffsetWithinDirectory;
899 FatPrepareWriteDirectoryFile( IrpContext,
930 FatDeleteEa( IrpContext,
932 Dirent->ExtendedAttributes,
1043 Ccb.UnicodeQueryTemplate = *
Lfn;
1049 FatLocateDirent( IrpContext,
1135 UCHAR NameBuffer[12];
1139 WCHAR LocalLfnBuffer[32];
1143 UCHAR LfnChecksum = 0;
1195 Name.MaximumLength = 12;
1200 UpcasedLfn.
Buffer = LocalLfnBuffer;
1226 LongFileName->Length = 0;
1231 OrigLongFileName->Length = 0;
1240 *FileNameDos =
FALSE;
1257 UpcasedLfnValid =
FALSE;
1283 DebugTrace( 0,
Dbg,
"End of directory: entry not found.\n", 0);
1303 LfnInProgress =
FALSE;
1319 if (LfnInProgress) {
1326 (
Lfn->Ordinal == 0) ||
1327 (
Lfn->Ordinal != Ordinal - 1) ||
1328 (
Lfn->Checksum != LfnChecksum) ||
1329 (
Lfn->MustBeZero != 0)) {
1335 LfnInProgress =
FALSE;
1339 NT_ASSERT( ((LfnIndex % 13) == 0) && LfnIndex );
1349 6 *
sizeof(
WCHAR) );
1353 2 *
sizeof(
WCHAR) );
1355 Ordinal =
Lfn->Ordinal;
1365 if ((!LfnInProgress) &&
1368 (
Lfn->MustBeZero == 0)) {
1372 Ordinal =
Lfn->Ordinal & ~FAT_LAST_LONG_ENTRY;
1393 LfnIndex = (Ordinal - 1) * 13;
1396 (
USHORT)((LfnIndex + 13) << 1));
1404 6 *
sizeof(
WCHAR) );
1408 2 *
sizeof(
WCHAR) );
1415 while (LfnIndex != (
ULONG)Ordinal * 13) {
1419 if (LongFileName->Buffer[LfnIndex] == 0x0000) {
1427 if (LongFileName->Buffer[LfnIndex] != 0xffff) {
1440 if (LfnIndex == (
ULONG)Ordinal * 13) {
1453 LfnInProgress =
TRUE;
1454 LfnChecksum =
Lfn->Checksum;
1492 if (LfnInProgress &&
1499 FoundValidLfn =
TRUE;
1500 LongFileName->Length = (
USHORT)(LfnSize *
sizeof(
WCHAR));
1504 *OrigLongFileName = *LongFileName;
1509 FoundValidLfn =
FALSE;
1529 if (
Ccb->ContainsWildCards) {
1544 if ((
Name.Length == 2) &&
1545 (
Name.Buffer[0] ==
'.') &&
1546 (
Name.Buffer[1] ==
'.') &&
1547 (
Ccb->OemQueryTemplate.Wild.Length > 1)) {
1553 Ccb->OemQueryTemplate.Wild,
1561 *FileNameDos =
TRUE;
1576 (*(
PULONG)&(
Ccb->OemQueryTemplate.Constant[0]) == *(
PULONG)&((*Dirent)->FileName[0])) &&
1577 (*(
PULONG)&(
Ccb->OemQueryTemplate.Constant[4]) == *(
PULONG)&((*Dirent)->FileName[4])) &&
1578 (*(
PUSHORT)&(
Ccb->OemQueryTemplate.Constant[8]) == *(
PUSHORT)&((*Dirent)->FileName[8])) &&
1579 (*(
PUCHAR)&(
Ccb->OemQueryTemplate.Constant[10]) == *(
PUCHAR)&((*Dirent)->FileName[10]))) {
1585 *FileNameDos =
TRUE;
1600 if (FoundValidLfn) {
1608 if (!
Ccb->ContainsWildCards &&
1609 (
Ccb->UnicodeQueryTemplate.Length != (
USHORT)(LfnSize *
sizeof(
WCHAR)))) {
1615 FoundValidLfn =
FALSE;
1616 LongFileName->Length = 0;
1617 if (OrigLongFileName) {
1618 OrigLongFileName->Length = 0;
1626 if (!UpcasedLfnValid) {
1634 LongFileName->Length);
1646 UpcasedLfnValid =
TRUE;
1654 if (
Ccb->ContainsWildCards) {
1683 if (FoundValidLfn) {
1685 FoundValidLfn =
FALSE;
1686 LongFileName->Length = 0;
1689 if (OrigLongFileName) {
1690 OrigLongFileName->Length = 0;
1721FatLocateSimpleOemDirent (
1781 FatLocateDirent( IrpContext,
1800FatLocateVolumeLabel (
1942FatGetDirentFromFcbOrDcb (
1994 FatReadDirectoryFile( IrpContext,
2039 DebugTrace(-1,
Dbg,
"FatGetDirentFromFcbOrDcb -> (VOID)\n", 0);
2046FatIsDirectoryEmpty (
2084 DebugTrace( 0,
Dbg,
" IsDirectoryEmpty = %08lx\n", IsDirectoryEmpty);
2130 IsDirectoryEmpty =
TRUE;
2161 DebugTrace(-1,
Dbg,
"FatIsDirectoryEmpty -> %ld\n", IsDirectoryEmpty);
2163 return IsDirectoryEmpty;
2227 if (ZeroAndSetTimeFields) {
2238 if (ZeroAndSetTimeFields || SetCreationTime) {
2246 if (!SetCreationTime || !FatNtTimeToFatTime( IrpContext,
2250 &
Dirent->CreationMSec )) {
2262 if (!FatNtTimeToFatTime( IrpContext,
2266 &
Dirent->CreationMSec )) {
2273 Dirent->CreationMSec = 0;
2278 if (ZeroAndSetTimeFields) {
2284 if (!FatNtTimeToFatTime( IrpContext,
2315 if (ComponentReallyLowercase) {
2320 if (ExtensionReallyLowercase) {
2331 UCHAR DirentChecksum;
2344 LfnBuffer = &
Lfn->
Buffer[(DirentsInLfn - 1) * 13];
2350 LfnDirent += 1, LfnOrdinal -= 1, LfnBuffer -= 13) {
2352 WCHAR FinalLfnBuffer[13];
2359 if (LfnOrdinal == DirentsInLfn) {
2362 ULONG RemainderChars;
2368 if (RemainderChars != 0) {
2372 RemainderChars *
sizeof(
WCHAR) );
2374 for (
i = RemainderChars;
i < 13;
i++) {
2380 if (
i == RemainderChars) {
2382 FinalLfnBuffer[
i] = 0x0000;
2386 FinalLfnBuffer[
i] = 0xffff;
2399 LfnDirent->
Ordinal = LfnOrdinal;
2410 5 *
sizeof(
WCHAR) );
2414 6 *
sizeof(
WCHAR) );
2418 2 *
sizeof(
WCHAR) );
2426 LfnDirent->
Type = 0;
2428 LfnDirent->
Checksum = DirentChecksum;
2490 Dirent->ExtendedAttributes = 0;
2493 DebugTrace(-1,
Dbg,
"FatConstructLabelDirent -> (VOID)\n", 0);
2500FatSetFileSizeInDirent (
2533 FatGetDirentFromFcbOrDcb( IrpContext,
2541 *AlternativeFileSize :
Fcb->
Header.FileSize.LowPart;
2544 FatSetDirtyBcb( IrpContext, DirentBcb,
Fcb->
Vcb,
TRUE );
2554FatSetFileSizeInDirentNoRaise (
2584 FatSetFileSizeInDirent( IrpContext,
Fcb, AlternativeFileSize );
2595FatUpdateDirentFromFcb (
2684 (UpdateLastWriteTime ||
2696 UpdateLastAccessTime =
TRUE;
2700 UpdateLastAccessTime =
FALSE;
2705 UpdateLastAccessTime =
FALSE;
2708 if (SetArchiveBit ||
2710 UpdateLastWriteTime ||
2711 UpdateLastAccessTime
2714 DebugTrace(0,
Dbg,
"Update Time and/or file size on File/Dir\n", 0);
2720#if (NTDDI_VERSION >= NTDDI_WIN8)
2729 IrpContext->OriginatingIrp,
2730 OPLOCK_FLAG_PARENT_OBJECT,
2741 FatGetDirentFromFcbOrDcb( IrpContext,
2747 if (UpdateLastWriteTime || UpdateLastAccessTime) {
2749 (
VOID)FatNtTimeToFatTime( IrpContext,
2756 if (SetArchiveBit) {
2762 UpdateDirent =
TRUE;
2765 if (UpdateLastWriteTime) {
2780 UpdateDirent =
TRUE;
2783 if (UpdateLastAccessTime) {
2796 Dirent->LastAccessDate = CurrentFatTime.
Date;
2804 UpdateDirent =
TRUE;
2831 UpdateDirent =
TRUE;
2851 FatSetDirtyBcb( IrpContext,
2904 Checksum =
Dirent->FileName[0];
2906 for (
i=1;
i < 11;
i++) {
2908 Checksum = ((Checksum & 1) ? 0x80 : 0) +
2972 ULONG DirentBuffer[3];
2981 for (
i=0;
i<11;
i++) {
2982 if (
Dirent->FileName[
i] ==
'~') {
3000 DirentBuffer[0] = 0x20202020;
3001 DirentBuffer[1] = 0x20202020;
3002 DirentBuffer[2] = 0x20202020;
3004 DirentName = (
PUCHAR)DirentBuffer;
3006 ExtendedChars =
FALSE;
3008 DotEncountered =
FALSE;
3010 for (
i=0;
i < LfnSize;
i++) {
3016 if (
Lfn[
i] ==
L'.') {
3017 if (DotEncountered ||
3019 ((LfnSize -
i) > 4) ||
3020 (
i &&
Lfn[
i-1] ==
L' ')) {
3023 DotEncountered =
TRUE;
3032 if ((
Lfn[
i] < 0x80) &&
3041 if (!ExtendedChars) {
3042 if (
Lfn[
i] > 0x7f) {
3043 ExtendedChars =
TRUE;
3045 DirentName[DirentIndex++] = (
UCHAR) (
3056 if ((
Lfn[LfnSize - 1] ==
L' ') ||
3057 (!DotEncountered && (LfnSize > 8))) {
3067 if (!ExtendedChars &&
3119 ULONG DirentsThisRun;
3120 ULONG StartIndexOfThisRun;
3130 DebugTrace( 0,
Dbg,
"We must scan the whole directory.\n", 0);
3133 DeletedHint = 0xffffffff;
3139 CurrentRun = InitialRun;
3141 StartIndexOfThisRun = 0;
3177 DirentDeleted =
TRUE;
3179 if (DeletedHint == 0xffffffff) {
3181 DeletedHint = UnusedVbo;
3186 DirentDeleted =
FALSE;
3194 if (CurrentRun == InitialRun) {
3196 CurrentRun = DirentDeleted ?
3197 FreeDirents : AllocatedDirents;
3205 if ((CurrentRun == FreeDirents) && !DirentDeleted) {
3207 DirentsThisRun = DirentIndex - StartIndexOfThisRun;
3210 StartIndexOfThisRun,
3213 CurrentRun = AllocatedDirents;
3214 StartIndexOfThisRun = DirentIndex;
3221 if ((CurrentRun == AllocatedDirents) && DirentDeleted) {
3223 DirentsThisRun = DirentIndex - StartIndexOfThisRun;
3226 StartIndexOfThisRun,
3229 CurrentRun = FreeDirents;
3230 StartIndexOfThisRun = DirentIndex;
3238 UnusedVbo +=
sizeof(
DIRENT);
3247 DirentsThisRun = DirentIndex - StartIndexOfThisRun;
3249 if ((CurrentRun == FreeDirents) || (CurrentRun == InitialRun)) {
3252 StartIndexOfThisRun,
3258 StartIndexOfThisRun,
3267 if (UnusedVbo < Dcb->
Header.AllocationSize.LowPart) {
3269 StartIndexOfThisRun = UnusedVbo /
sizeof(
DIRENT);
3271 DirentsThisRun = (
Dcb->Header.AllocationSize.LowPart -
3272 UnusedVbo) /
sizeof(
DIRENT);
3275 StartIndexOfThisRun,
3289 if (DeletedHint == 0xffffffff) { DeletedHint = UnusedVbo; }
3291 Dcb->Specific.Dcb.UnusedDirentVbo = UnusedVbo;
3292 Dcb->Specific.Dcb.DeletedDirentHint = DeletedHint;
3334 ULONG SavedIrpContextFlag;
3355 ULONG PagesPinned = 0;
3374 DcbSize =
Dcb->Header.AllocationSize.LowPart;
3376 if (DcbSize > 0x40000) {
3385 SavedIrpContextFlag = IrpContext->
Flags;
3394 for (Links =
Dcb->Specific.Dcb.ParentDcbQueue.Flink;
3395 Links != &
Dcb->Specific.Dcb.ParentDcbQueue;
3396 Links = Links->
Flink) {
3406 ULONG QueryOffset = 0;
3407 ULONG FoundOffset = 0;
3431 Lfn.MaximumLength = 260 *
sizeof(
WCHAR);
3444 McbInitialized =
TRUE;
3448 FatLocateDirent( IrpContext,
3479#pragma prefast( suppress:28931, "needed for debug build" )
3493 QueryOffset = FoundOffset +
sizeof(
DIRENT);
3496 }
while ((
Dirent !=
NULL) && (QueryOffset < DcbSize));
3532 PagesPinned *
sizeof(
PBCB),
3554 FatPrepareWriteDirectoryFile( IrpContext,
3581#pragma prefast( suppress:28931, "needed for debug build" )
3599 (
ULONG) BytesUsed );
3601 UsedDirents += BytesUsed;
3607 (
ULONG) BytesUsed );
3609 UnusedDirents += BytesUsed;
3618 for (Char = UnusedDirentBuffer; Char < UnusedDirents; Char +=
sizeof(
DIRENT)) {
3634 UnusedDirents - UnusedDirentBuffer );
3677 InvalidateFcbs =
TRUE;
3687 for (Links =
Dcb->Specific.Dcb.ParentDcbQueue.Flink;
3688 Links != &
Dcb->Specific.Dcb.ParentDcbQueue;
3689 Links = Links->
Flink) {
3692 ULONG TmpOffset = 0;
3694 ULONG PreviousLfnSpread;
3709 if (!InvalidateFcbs) {
3713 FatLocateSimpleOemDirent( IrpContext,
3723 InvalidateFcbs =
TRUE;
3727 if (TmpBcb ==
NULL || InvalidateFcbs) {
3751 if (McbInitialized) {
3759 if (UnusedDirentBuffer) {
3763 if (UsedDirentBuffer) {
3776 for (Links =
Dcb->Specific.Dcb.ParentDcbQueue.Flink;
3777 Links != &
Dcb->Specific.Dcb.ParentDcbQueue;
3778 Links = Links->
Flink) {
3785 IrpContext->Flags = SavedIrpContextFlag;
UINT32 void void ** ReturnValue
VOID DeleteContext(PWSTR pszName)
_In_ PFCB _In_ PDIRENT_ENUM_CONTEXT _Inout_ PDIRENT Dirent
_Inout_ PFILE_OBJECT _In_ TYPE_OF_OPEN PFCB _In_opt_ PCCB Ccb
#define IRP_CONTEXT_FLAG_WAIT
#define _Requires_lock_held_(lock)
#define NT_SUCCESS(StatCode)
_In_ PIO_STACK_LOCATION _Inout_ PFILE_OBJECT _Inout_ PVCB _Outptr_result_maybenull_ PDCB _In_ PDCB _In_ PDIRENT _In_ ULONG _In_ ULONG DirentByteOffset
_In_ PIO_STACK_LOCATION _Inout_ PFILE_OBJECT _Inout_ PVCB _Outptr_result_maybenull_ PDCB _In_ PDCB _In_ PDIRENT _In_ ULONG _In_ ULONG _In_ PUNICODE_STRING Lfn
_In_ PIO_STACK_LOCATION _Inout_ PFILE_OBJECT _Inout_ PVCB _Outptr_result_maybenull_ PDCB _In_ PDCB _In_ PDIRENT _In_ ULONG LfnByteOffset
_In_ PIO_STACK_LOCATION _Inout_ PFILE_OBJECT _Inout_ PVCB _Outptr_result_maybenull_ PDCB * Dcb
#define FAT_DIRENT_NT_BYTE_8_LOWER_CASE
#define FAT_DIRENT_ATTR_ARCHIVE
#define FAT_DIRENT_ATTR_VOLUME_ID
#define FAT_DIRENT_NT_BYTE_3_LOWER_CASE
#define FAT_DIRENT_DELETED
#define FAT_DIRENT_NEVER_USED
#define FAT_DIRENT_ATTR_LFN
#define FAT_LAST_LONG_ENTRY
PACKED_LFN_DIRENT LFN_DIRENT
#define FAT_LFN_DIRENTS_NEEDED(NAME)
#define FatBugCheck(A, B, C)
#define TAG_FILENAME_BUFFER
#define ExLocalTimeToSystemTime(LocTime, SysTime)
NTSTATUS RtlUpcaseUnicodeString(PUNICODE_STRING dst, PUNICODE_STRING src, BOOLEAN Alloc)
#define KeQuerySystemTime(t)
#define ExAcquireResourceExclusiveLite(res, wait)
#define ExSystemTimeToLocalTime(SysTime, LocTime)
#define IRP_CONTEXT_FLAG_WRITE_THROUGH
#define IsFileDeleted(Mcb)
#define BooleanFlagOn(F, SF)
VOID FatUnpinRepinnedBcbs(IN PIRP_CONTEXT IrpContext)
VOID FatPinMappedData(IN PIRP_CONTEXT IrpContext, IN PDCB Dcb, IN VBO StartingVbo, IN ULONG ByteCount, OUT PBCB *Bcb)
VOID FatTunnelFcbOrDcb(IN PFCB FcbOrDcb, IN PCCB Ccb OPTIONAL)
#define FatConstructDot(IRPCONTEXT, DCB, PARENT, DIRENT)
#define FatConstructDotDot(IRPCONTEXT, DCB, PARENT, DIRENT)
#define FatReadDirent(IRPCONTEXT, DCB, VBO, BCB, DIRENT, STATUS)
VOID FatConstructLabelDirent(IN PIRP_CONTEXT IrpContext, IN OUT PDIRENT Dirent, IN POEM_STRING Label)
UCHAR FatComputeLfnChecksum(PDIRENT Dirent)
VOID FatConstructDirent(IN PIRP_CONTEXT IrpContext, IN OUT PDIRENT Dirent, IN POEM_STRING FileName, IN BOOLEAN ComponentReallyLowercase, IN BOOLEAN ExtensionReallyLowercase, IN PUNICODE_STRING Lfn OPTIONAL, IN USHORT Attributes, IN BOOLEAN ZeroAndSetTimeFields, IN PLARGE_INTEGER SetCreationTime OPTIONAL)
ULONG FatExceptionFilter(IN PIRP_CONTEXT IrpContext, IN PEXCEPTION_POINTERS ExceptionPointer)
#define TimerStart(LEVEL)
#define TimerStop(LEVEL, s)
#define DebugTrace(INDENT, LEVEL, X, Y)
#define FatVcbAcquiredExclusive(IRPCONTEXT, VCB)
IN PDCB IN ULONG IN BOOLEAN RescanDir
IN PVCB IN VBO IN ULONG OUT PBCB * Bcb
#define FatUnpinBcb(IRPCONTEXT, BCB)
VOID FatStringTo8dot3(_In_ PIRP_CONTEXT IrpContext, _In_ OEM_STRING InputString, _Out_writes_bytes_(11) PFAT8DOT3 Output8dot3)
IN PFCB IN BOOLEAN ReturnOnFailure
FAT_TIME_STAMP FatGetCurrentFatTime(_In_ PIRP_CONTEXT IrpContext)
IN PFCB IN VBO OUT PLBO Lbo
#define FatNotifyReportChange(I, V, F, FL, A)
IN PDCB IN PCCB IN VBO OffsetToStartSearchFrom
#define FatResetExceptionState(IRPCONTEXT)
IN PDCB IN PUNICODE_STRING IN PUNICODE_STRING LfnTmp
IN PFCB IN PDELETE_CONTEXT DeleteContext IN BOOLEAN DeleteEa
VOID FatEnsureStringBufferEnough(_Inout_ PVOID String, _In_ USHORT DesiredBufferSize)
IN PDCB IN ULONG DirentsNeeded
#define FatNormalizeAndRaiseStatus(IRPCONTEXT, STATUS)
#define FatRaiseStatus(IRPCONTEXT, STATUS)
#define FatGetFcbOplock(F)
IN PDCB IN PCCB IN VBO IN OUT PULONG OUT PDIRENT OUT PBCB OUT PVBO ByteOffset
BOOLEAN FatIsNameInExpression(IN PIRP_CONTEXT IrpContext, IN OEM_STRING Expression, IN OEM_STRING Name)
VOID Fat8dot3ToString(_In_ PIRP_CONTEXT IrpContext, _In_ PDIRENT Dirent, _In_ BOOLEAN RestoreCase, _Out_ POEM_STRING OutputString)
VOID FatFreeStringBuffer(_Inout_ PVOID String)
#define FatDirectoryKey(FcbOrDcb)
IN PDCB IN PDIRENT ParentDirent
IN PVCB IN ULONG IN OUT PULONG IN BOOLEAN OUT PLARGE_MCB Mcb
VOID FatMarkFcbCondition(IN PIRP_CONTEXT IrpContext, IN PFCB Fcb, IN FCB_CONDITION FcbCondition, IN BOOLEAN Recursive)
#define FCB_STATE_8_LOWER_CASE
#define CCB_FLAG_QUERY_TEMPLATE_MIXED
#define CCB_FLAG_USER_SET_LAST_WRITE
#define VCB_STATE_FLAG_REMOVABLE_MEDIA
#define CCB_FLAG_OPENED_BY_SHORTNAME
#define CCB_FLAG_SKIP_SHORT_NAME_COMPARE
#define VCB_STATE_FLAG_WRITE_PROTECTED
#define CCB_FLAG_MATCH_VOLUME_ID
#define CCB_FLAG_MATCH_ALL
#define CCB_FLAG_USER_SET_LAST_ACCESS
#define FCB_STATE_3_LOWER_CASE
#define FsRtlIsAnsiCharacterLegalFat(C, WILD)
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
#define RtlFillMemory(Dest, Length, Fill)
NTSYSAPI NTSTATUS WINAPI RtlDowncaseUnicodeString(UNICODE_STRING *, const UNICODE_STRING *, BOOLEAN)
#define EXCEPTION_EXECUTE_HANDLER
#define EXCEPTION_CONTINUE_SEARCH
#define RtlEqualMemory(dst, src, len)
BOOLEAN NTAPI FsRtlAddLargeMcbEntry(IN PLARGE_MCB Mcb, IN LONGLONG Vbn, IN LONGLONG Lbn, IN LONGLONG SectorCount)
VOID NTAPI FsRtlUninitializeLargeMcb(IN PLARGE_MCB Mcb)
VOID NTAPI FsRtlInitializeLargeMcb(IN PLARGE_MCB Mcb, IN POOL_TYPE PoolType)
ULONG NTAPI FsRtlNumberOfRunsInLargeMcb(IN PLARGE_MCB Mcb)
BOOLEAN NTAPI FsRtlGetNextLargeMcbEntry(IN PLARGE_MCB Mcb, IN ULONG RunIndex, OUT PLONGLONG Vbn, OUT PLONGLONG Lbn, OUT PLONGLONG SectorCount)
static PLARGE_INTEGER Time
#define FILE_ATTRIBUTE_ARCHIVE
#define UNREFERENCED_PARAMETER(P)
__GNU_EXTENSION typedef __int64 * PLONGLONG
_In_ ULONG _In_ ULONG Offset
#define ARGUMENT_PRESENT(ArgumentPointer)
VOID FASTCALL ExReleaseResourceLite(IN PERESOURCE Resource)
BOOLEAN NTAPI ExIsResourceAcquiredExclusiveLite(IN PERESOURCE Resource)
ULONG NTAPI ExIsResourceAcquiredSharedLite(IN PERESOURCE Resource)
PVOID NTAPI FsRtlAllocatePoolWithTag(IN POOL_TYPE PoolType, IN ULONG NumberOfBytes, IN ULONG Tag)
BOOLEAN NTAPI FsRtlIsNtstatusExpected(IN NTSTATUS NtStatus)
BOOLEAN NTAPI FsRtlIsNameInExpression(IN PUNICODE_STRING Expression, IN PUNICODE_STRING Name, IN BOOLEAN IgnoreCase, IN PWCHAR UpcaseTable OPTIONAL)
BOOLEAN NTAPI FsRtlAreNamesEqual(IN PCUNICODE_STRING Name1, IN PCUNICODE_STRING Name2, IN BOOLEAN IgnoreCase, IN PCWCH UpcaseTable OPTIONAL)
_In_ PVOID _Out_opt_ BOOLEAN _Out_opt_ PPFN_NUMBER Page
#define STATUS_CANNOT_MAKE
#define _SEH2_GetExceptionCode()
#define _SEH2_EXCEPT(...)
#define _SEH2_GetExceptionInformation()
NTSTATUS NTAPI RtlOemStringToCountedUnicodeString(IN OUT PUNICODE_STRING UniDest, IN PCOEM_STRING OemSource, IN BOOLEAN AllocateDestinationString)
#define STATUS_END_OF_FILE
PULONG MinorVersion OPTIONAL
base for all directory entries
union _CCB::@734::@736::@738 OemQueryTemplate
BOOLEAN ContainsWildCards
VBO LfnOffsetWithinDirectory
UNICODE_STRING ExactCaseLongName
union _FCB::@730 Specific
FCB_CONDITION FcbCondition
LARGE_INTEGER LastWriteTime
struct _FCB::@730::@732 Dcb
FSRTL_ADVANCED_FCB_HEADER Header
LARGE_INTEGER LastAccessTime
VBO DirentOffsetWithinDirectory
union _FILE_NAME_NODE::@729 Name
struct _LIST_ENTRY * Flink
VOID NTAPI FsRtlAddToTunnelCache(IN PTUNNEL Cache, IN ULONGLONG DirectoryKey, IN PUNICODE_STRING ShortName, IN PUNICODE_STRING LongName, IN BOOLEAN KeyByShortName, IN ULONG DataLength, IN PVOID Data)
VOID NTAPI FsRtlDeleteKeyFromTunnelCache(IN PTUNNEL Cache, IN ULONGLONG DirectoryKey)
#define RtlCopyMemory(Destination, Source, Length)
#define RtlZeroMemory(Destination, Length)
#define CONTAINING_RECORD(address, type, field)
#define STATUS_FILE_CORRUPT_ERROR
static VOID UpdateFileSize(PFILE_OBJECT FileObject, PVFATFCB Fcb, ULONG Size, ULONG ClusterSize, BOOLEAN IsFatX)
_Must_inspect_result_ _In_ WDFDMAENABLER _In_ _In_opt_ PWDF_OBJECT_ATTRIBUTES Attributes
_In_ WDFREQUEST _In_ WDFFILEOBJECT FileObject
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
_Must_inspect_result_ _In_ ULONG Flags
#define FILE_NOTIFY_CHANGE_SIZE
#define FILE_ACTION_MODIFIED
#define FO_FILE_FAST_IO_READ
#define FILE_NOTIFY_CHANGE_LAST_ACCESS
#define FILE_NOTIFY_CHANGE_ATTRIBUTES
#define FO_FILE_SIZE_CHANGED
#define FILE_NOTIFY_CHANGE_LAST_WRITE
_In_opt_ HANDLE _In_opt_ PIO_APC_ROUTINE _In_opt_ PVOID _Out_ PIO_STATUS_BLOCK _In_ ULONG NotifyFilter