winnt-make-mountingother-than-as-afs-work-20021104
[openafs.git] / src / WINNT / afsd / dosdefs95.h
1 #ifndef DOSDEFS_H
2 #define DOSDEFS_H
3
4 /* dos_ptr is the phys. addr. accepted by farpeek/farpoke functions, i.e.,
5    dos_ptr = segment * 16 + offset */
6 #define dos_ptr unsigned long
7
8 /* get/set structure member of a struct in DOS memory */
9 #define get_dos_member_b(T, ptr, memb) _farpeekb(_dos_ds, (ptr) + (dos_ptr)&(((T*)0)->memb))
10 #define get_dos_member_w(T, ptr, memb) _farpeekw(_dos_ds, (ptr) + (dos_ptr)&(((T*)0)->memb))
11 #define get_dos_member_l(T, ptr, memb) _farpeekl(_dos_ds, (ptr) + (dos_ptr)&(((T*)0)->memb))
12
13 #define set_dos_member_b(T, ptr, memb, val) \
14                   _farpokeb(_dos_ds, (ptr) + (dos_ptr)&(((T*)0)->memb), val)
15 #define set_dos_member_w(T, ptr, memb, val) \
16                   _farpokew(_dos_ds, (ptr) + (dos_ptr)&(((T*)0)->memb), val)
17 #define set_dos_member_l(T, ptr, memb, val) \
18                   _farpokel(_dos_ds, (ptr) + (dos_ptr)&(((T*)0)->memb), val)
19
20 typedef struct _filetime
21 {
22   unsigned int dwLowDateTime;
23   unsigned int dwHighDateTime;
24 } FILETIME;
25
26 #define FILE_ACTION_ADDED               0x00000001   
27 #define FILE_ACTION_REMOVED             0x00000002   
28 #define FILE_ACTION_MODIFIED            0x00000003   
29 #define FILE_ACTION_RENAMED_OLD_NAME    0x00000004   
30 #define FILE_ACTION_RENAMED_NEW_NAME    0x00000005   
31
32 #define FILE_NOTIFY_CHANGE_FILE_NAME    0x00000001   
33 #define FILE_NOTIFY_CHANGE_DIR_NAME     0x00000002   
34 #define FILE_NOTIFY_CHANGE_ATTRIBUTES   0x00000004   
35 #define FILE_NOTIFY_CHANGE_SIZE         0x00000008   
36 #define FILE_NOTIFY_CHANGE_LAST_WRITE   0x00000010   
37 #define FILE_NOTIFY_CHANGE_LAST_ACCESS  0x00000020   
38 #define FILE_NOTIFY_CHANGE_CREATION     0x00000040   
39 #define FILE_NOTIFY_CHANGE_SECURITY     0x00000100   
40
41 #define ULONG unsigned long
42 #define USHORT unsigned short
43 #define WCHAR wchar_t
44
45 #define GetTickCount gettime_ms
46 #define GetCurrentTime gettime_ms
47
48 #define lstrcpy strcpy
49 #define strcmpi stricmp
50 #define lstrlen strlen
51 #define _stricmp stricmp
52 #define _strlwr strlwr
53 #define _strupr strupr
54
55 #endif