Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

60 lines
1.4 KiB

  1. /*++
  2. Copyright (c) 1989 Microsoft Corporation
  3. Module Name:
  4. Lfn.h
  5. Abstract:
  6. This module defines the on-disk structure of long file names on RDBSS.
  7. Author:
  8. David Goebel [davidgoe] 16-Dec-1993
  9. Revision History:
  10. --*/
  11. #ifndef _LFN_
  12. #define _LFN_
  13. //
  14. // This strucure defines the on disk format on long file name dirents.
  15. //
  16. typedef struct _PACKED_LFN_DIRENT {
  17. UCHAR Ordinal; // offset = 0
  18. UCHAR Name1[10]; // offset = 1 (Really 5 chars, but not WCHAR aligned)
  19. UCHAR Attributes; // offset = 11
  20. UCHAR Type; // offset = 12
  21. UCHAR Checksum; // offset = 13
  22. WCHAR Name2[6]; // offset = 14
  23. RDBSS_ENTRY MustBeZero; // offset = 26
  24. WCHAR Name3[2]; // offset = 28
  25. } PACKED_LFN_DIRENT; // sizeof = 32
  26. typedef PACKED_LFN_DIRENT *PPACKED_LFN_DIRENT;
  27. #define RDBSS_LAST_LONG_ENTRY 0x40 // Ordinal field
  28. #define RDBSS_LONG_NAME_COMP 0x0 // Type field
  29. //
  30. // A packed lfn dirent is already quadword aligned so simply declare a
  31. // lfn dirent as a packed lfn dirent.
  32. //
  33. typedef PACKED_LFN_DIRENT LFN_DIRENT;
  34. typedef LFN_DIRENT *PLFN_DIRENT;
  35. //
  36. // This is the largest size buffer we would ever need to read an Lfn
  37. //
  38. #define MAX_LFN_CHARACTERS 260
  39. #define MAX_LFN_DIRENTS 20
  40. #define RDBSS_LFN_DIRENTS_NEEDED(NAME) (((NAME)->Length/sizeof(WCHAR) + 12)/13)
  41. #endif // _LFN_