Hi, >> + if (_wcsnicmp(Path, L"\\Device\\Harddisk", 16) != 0) >> + { >> + /* The NT path doesn't start with the prefix string, thus it cannot >> be a hard disk device path */ >> + DPRINT1("'%S' : Not a possible hard disk device.\n", NtPath); >> + return FALSE; >> + } >> + >> + Path += 16;
> Avoiding these magic numbers would be nice. > Options include: > * static string à la > static const WCHAR DeviceHarddiskPath[] = L"\\Device\\Harddisk"; > _wcsnicmp(Path, DeviceHarddiskPath, ARRAYSIZE(DeviceHarddiskPath) - 1) > * simply using wcslen(L"\\Device\\Harddisk") (which should get optimized) > * making a "starts with" function > * using RtlPrefixUnicodeString Yes, I may choose the RtlPrefix one but these options are better. >> + >> + if (FileInfo.EndOfFile.HighPart != 0) >> + DPRINT1("WARNING!! The file %wZ is too large!\n", Name); >Did you mean &Name? Correct _______________________________________________ Ros-dev mailing list Ros-dev@reactos.org http://www.reactos.org/mailman/listinfo/ros-dev