Release 960902
[wine] / include / winreg.h
1 /*
2  *                              Shell Library definitions
3  */
4 #ifndef __WINE_WINREG_H
5 #define __WINE_WINREG_H
6
7 #include "windows.h"
8
9 /* FIXME: should be in security.h or whereever */
10 #ifndef READ_CONTROL
11 #define READ_CONTROL            0x00020000
12 #endif
13 #ifndef STANDARD_RIGHTS_READ
14 #define STANDARD_RIGHTS_READ    READ_CONTROL
15 #endif
16 #ifndef STANDARD_RIGHTS_WRITE
17 #define STANDARD_RIGHTS_WRITE   READ_CONTROL    /* FIXME: hmm? */
18 #endif
19 #ifndef STANDARD_RIGHTS_ALL
20 #define STANDARD_RIGHTS_ALL     0x001f0000
21 #endif
22 /* ... */
23
24
25 #define SHELL_ERROR_SUCCESS           0L
26 #define SHELL_ERROR_BADDB             1L
27 #define SHELL_ERROR_BADKEY            2L
28 #define SHELL_ERROR_CANTOPEN          3L
29 #define SHELL_ERROR_CANTREAD          4L
30 #define SHELL_ERROR_CANTWRITE         5L
31 #define SHELL_ERROR_OUTOFMEMORY       6L
32 #define SHELL_ERROR_INVALID_PARAMETER 7L
33 #define SHELL_ERROR_ACCESS_DENIED     8L
34
35 #define REG_NONE                0       /* no type */
36 #define REG_SZ                  1       /* string type (ASCII) */
37 #define REG_EXPAND_SZ           2       /* string, includes %ENVVAR% (expanded by caller) (ASCII) */
38 #define REG_BINARY              3       /* binary format, callerspecific */
39 /* YES, REG_DWORD == REG_DWORD_LITTLE_ENDIAN */
40 #define REG_DWORD               4       /* DWORD in little endian format */
41 #define REG_DWORD_LITTLE_ENDIAN 4       /* DWORD in little endian format */
42 #define REG_DWORD_BIG_ENDIAN    5       /* DWORD in big endian format  */
43 #define REG_LINK                6       /* symbolic link (UNICODE) */
44 #define REG_MULTI_SZ            7       /* multiple strings, delimited by \0, terminated by \0\0 (ASCII) */
45 #define REG_RESOURCE_LIST       8       /* resource list? huh? */
46 #define REG_FULL_RESOURCE_DESCRIPTOR    9       /* full resource descriptor? huh? */
47
48 #define HKEY_CLASSES_ROOT       0x80000000
49 #define HKEY_CURRENT_USER       0x80000001
50 #define HKEY_LOCAL_MACHINE      0x80000002
51 #define HKEY_USERS              0x80000003
52 #define HKEY_PERFORMANCE_DATA   0x80000004
53 #define HKEY_CURRENT_CONFIG     0x80000005
54 #define HKEY_DYN_DATA           0x80000006
55
56 #define REG_OPTION_RESERVED     0x00000000
57 #define REG_OPTION_NON_VOLATILE 0x00000000
58 #define REG_OPTION_VOLATILE     0x00000001
59 #define REG_OPTION_CREATE_LINK  0x00000002
60 #define REG_OPTION_TAINTED      0x80000000
61
62 #define REG_CREATED_NEW_KEY     0x00000001
63 #define REG_OPENED_EXISTING_KEY 0x00000002
64
65 #define KEY_QUERY_VALUE         0x00000001
66 #define KEY_SET_VALUE           0x00000002
67 #define KEY_CREATE_SUB_KEY      0x00000004
68 #define KEY_ENUMERATE_SUB_KEYS  0x00000008
69 #define KEY_NOTIFY              0x00000010
70 #define KEY_CREATE_LINK         0x00000020
71
72 #define KEY_READ                (STANDARD_RIGHTS_READ|  \
73                                  KEY_QUERY_VALUE|       \
74                                  KEY_ENUMERATE_SUB_KEYS|\
75                                  KEY_NOTIFY             \
76                                 )
77 #define KEY_WRITE               (STANDARD_RIGHTS_WRITE| \
78                                  KEY_SET_VALUE|         \
79                                  KEY_CREATE_SUB_KEY     \
80                                 )
81 #define KEY_EXECUTE             KEY_READ
82 #define KEY_ALL_ACCESS          (STANDARD_RIGHTS_ALL|   \
83                                  KEY_READ|KEY_WRITE|    \
84                                  KEY_CREATE_LINK        \
85                                 )
86
87 void SHELL_Init();
88 void SHELL_SaveRegistry();
89 void SHELL_LoadRegistry();
90 #endif  /* __WINE_WINREG_H */