939{
941
945
947
949 ULONG LastDirentOffset;
951
953
955
956
957
958
959
960
962
964
967
969
971 }
972
976 }
977
979 }
980
981
982
983
984
985
987
989
990 CcbFlags = 0;
991
992
993
994
995
996
1002
1004 RtlZeroMemory( &SearchExpression,
sizeof( SearchExpression ));
1005
1006
1007
1008
1009
1010
1011
1012
1013 } else {
1014
1015
1016
1017
1018
1020
1021 CdConvertNameToCdName( IrpContext, &WildCardName );
1022
1023
1024
1025
1026
1028
1030 }
1031
1032
1033
1034
1035
1037
1039 }
1040
1043
1045
1046
1047
1048
1049
1050
1053
1055 }
1056 }
1057
1058
1059
1060
1061
1065
1067
1068
1069
1070
1071
1073
1077
1078
1079
1080
1083
1084 } else {
1085
1089 }
1090
1091
1092
1093
1094
1098
1102 }
1103
1104
1105
1106
1107
1108
1109
1111
1113 }
1114
1115
1116
1117
1118
1119
1121
1122
1123
1124
1125
1127
1128
1129
1130
1131
1132 Ccb->CurrentDirentOffset =
Fcb->StreamOffset;
1133 Ccb->SearchExpression = SearchExpression;
1134
1135
1136
1137
1138
1140
1141
1142
1143
1144
1145 } else {
1146
1148
1150 }
1151 }
1152
1153
1154
1155
1156
1157 } else {
1158
1160 }
1161
1162
1163
1164
1165
1166
1167
1168
1170
1171 KnownOffset =
FALSE;
1173 *ReturnNextEntry =
TRUE;
1174
1175
1176
1177
1178
1180
1183 *ReturnNextEntry =
FALSE;
1184
1185
1186
1187
1188
1189 } else {
1190
1194 }
1195
1196
1197
1198
1199
1201
1202
1203
1204
1205
1206
1207
1208
1209 *InitialQuery =
FALSE;
1210
1212 !(*ReturnNextEntry)) {
1213
1214 *InitialQuery =
TRUE;
1215 }
1216
1217
1218
1219
1220
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233 if (KnownOffset) {
1234
1236
1237
1238
1239
1240
1241
1242 } else {
1243
1244 LastDirentOffset =
Fcb->StreamOffset;
1246
1248
1249
1250
1251
1252
1253
1255
1256 *ReturnNextEntry =
FALSE;
1257
1258
1259
1260
1261
1262 } else {
1263
1264
1265
1266
1267
1268
1269
1270 do {
1271
1272
1273
1274
1275
1277
1279 break;
1280 }
1281
1282
1283
1284
1285
1286 LastDirentOffset =
FileContext->InitialDirent->Dirent.DirentOffset;
1287
1288
1289
1290
1291
1293
1294 break;
1295 }
1296
1298
1300
1301
1302
1303
1304
1305
1306
1308
1311
1313 }
1314 }
1315 }
1316
1317
1318
1319
1320
1321
1322
1324
1325 if (!(*ReturnNextEntry) ||
1326 (
Ccb->SearchExpression.VersionString.Length == 0)) {
1327
1328
1329
1330
1331
1335 }
1336
1337
1338
1339
1340
1341
1343
1345
1347 }
1348
1349 return;
1350}
static INLINE VOID CdVerifyOrCreateDirStreamFile(_In_ PIRP_CONTEXT IrpContext, _In_ PFCB Fcb)
#define CdInitializeFileContext(IC, FC)
#define TAG_ENUM_EXPRESSION
#define CdLookupInitialFileDirent(IC, F, FC, DO)
VOID CdCleanupFileContext(_In_ PIRP_CONTEXT IrpContext, _In_ PFILE_ENUM_CONTEXT FileContext)
#define CdUnlockFcb(IC, F)
#define CdRaiseStatus(IC, S)
#define CCB_FLAG_ENUM_RETURN_NEXT
#define CCB_FLAG_ENUM_NAME_EXP_HAS_WILD
#define CCB_FLAG_ENUM_INITIALIZED
#define CCB_FLAG_ENUM_VERSION_EXP_HAS_WILD
#define CCB_FLAG_ENUM_VERSION_MATCH_ALL
UNICODE_STRING * PUNICODE_STRING
NTSTATUS RtlUpcaseUnicodeString(PUNICODE_STRING dst, PUNICODE_STRING src, BOOLEAN Alloc)
#define ClearFlag(_F, _SF)
#define BooleanFlagOn(F, SF)
struct _FileName FileName
_Must_inspect_result_ _In_ PFILE_OBJECT _In_ ULONG _In_ BOOLEAN ReturnSingleEntry
#define Add2Ptr(PTR, INC)
PVOID NTAPI FsRtlAllocatePoolWithTag(IN POOL_TYPE PoolType, IN ULONG NumberOfBytes, IN ULONG Tag)
BOOLEAN NTAPI FsRtlDoesNameContainWildCards(IN PUNICODE_STRING Name)
#define __analysis_assert(e)
UNICODE_STRING VersionString
union _IO_STACK_LOCATION::@1579 Parameters
struct _IO_STACK_LOCATION::@3978::@3984 QueryDirectory
struct _FCB * RootIndexFcb
#define RtlCopyMemory(Destination, Source, Length)
#define RtlZeroMemory(Destination, Length)
#define SL_INDEX_SPECIFIED
#define SL_RETURN_SINGLE_ENTRY