DEVEL15-windows-freelance-improved-dfs-handling-20080127
[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_EA           0x00000080
40 #define FILE_NOTIFY_CHANGE_SECURITY     0x00000100   
41 #define FILE_NOTIFY_CHANGE_STREAM_NAME  0x00000200
42 #define FILE_NOTIFY_CHANGE_STREAM_SIZE  0x00000400
43 #define FILE_NOTIFY_CHANGE_STREAM_WRITE 0x00000800
44
45 #define ULONG unsigned long
46 #define USHORT unsigned short
47 #define WCHAR wchar_t
48
49 #define GetTickCount gettime_ms
50 #define GetCurrentTime gettime_ms
51
52 #define lstrcpy strcpy
53 #define strcmpi stricmp
54 #define lstrlen strlen
55 #define _stricmp stricmp
56 #define _strlwr strlwr
57 #define _strupr strupr
58
59 #endif