ReactOS 0.4.15-dev-8096-ga0eec98
lfn.h
Go to the documentation of this file.
1/*++
2
3Copyright (c) 1989-2000 Microsoft Corporation
4
5Module Name:
6
7 Lfn.h
8
9Abstract:
10
11 This module defines the on-disk structure of long file names on FAT.
12
13
14--*/
15
16#ifndef _LFN_
17#define _LFN_
18
19//
20// This strucure defines the on disk format on long file name dirents.
21//
22
23typedef struct _PACKED_LFN_DIRENT {
24 UCHAR Ordinal; // offset = 0
25 UCHAR Name1[10]; // offset = 1 (Really 5 chars, but not WCHAR aligned)
26 UCHAR Attributes; // offset = 11
27 UCHAR Type; // offset = 12
28 UCHAR Checksum; // offset = 13
29 WCHAR Name2[6]; // offset = 14
30 USHORT MustBeZero; // offset = 26
31 WCHAR Name3[2]; // offset = 28
32} PACKED_LFN_DIRENT; // sizeof = 32
34
35#define FAT_LAST_LONG_ENTRY 0x40 // Ordinal field
36#define FAT_LONG_NAME_COMP 0x0 // Type field
37
38//
39// A packed lfn dirent is already quadword aligned so simply declare a
40// lfn dirent as a packed lfn dirent.
41//
42
45
46//
47// This is the largest size buffer we would ever need to read an Lfn
48//
49
50#define MAX_LFN_CHARACTERS 260
51#define MAX_LFN_DIRENTS 20
52
53#define FAT_LFN_DIRENTS_NEEDED(NAME) (((NAME)->Length/sizeof(WCHAR) + 12)/13)
54
55#endif // _LFN_
56
LFN_DIRENT * PLFN_DIRENT
Definition: lfn.h:44
PACKED_LFN_DIRENT LFN_DIRENT
Definition: lfn.h:43
struct _PACKED_LFN_DIRENT PACKED_LFN_DIRENT
PACKED_LFN_DIRENT * PPACKED_LFN_DIRENT
Definition: lfn.h:33
unsigned short USHORT
Definition: pedump.c:61
UCHAR Attributes
Definition: lfn.h:26
WCHAR Name2[6]
Definition: lfn.h:29
UCHAR Name1[10]
Definition: lfn.h:25
WCHAR Name3[2]
Definition: lfn.h:31
UCHAR Ordinal
Definition: lfn.h:24
USHORT MustBeZero
Definition: lfn.h:30
UCHAR Checksum
Definition: lfn.h:28
UCHAR Type
Definition: lfn.h:27
unsigned char UCHAR
Definition: xmlstorage.h:181
__wchar_t WCHAR
Definition: xmlstorage.h:180