fee65aacca14dbcd2c5842c74259ece0891a4cd7
[reactos.git] / reactos / include / ddk / cmfuncs.h
1 /*
2 * FUNCTION: Creates a registry key
3 * ARGUMENTS:
4 * KeyHandle (OUT) = Caller supplied storage for the resulting handle
5 * DesiredAccess = Specifies the allowed or desired access to the key
6 * It can have a combination of the following values:
7 * KEY_READ | KEY_WRITE | KEY_EXECUTE | KEY_ALL_ACCESS
8 * or
9 * KEY_QUERY_VALUE The values of the key can be queried.
10 * KEY_SET_VALUE The values of the key can be modified.
11 * KEY_CREATE_SUB_KEYS The key may contain subkeys.
12 * KEY_ENUMERATE_SUB_KEYS Subkeys can be queried.
13 * KEY_NOTIFY
14 * KEY_CREATE_LINK A symbolic link to the key can be created.
15 * ObjectAttributes = The name of the key may be specified directly in the name field
16 * of object attributes or relative to a key in rootdirectory.
17 * TitleIndex = Might specify the position in the sequential order of subkeys.
18 * Class = Specifies the kind of data, for example REG_SZ for string data. [ ??? ]
19 * CreateOptions = Specifies additional options with which the key is created
20 * REG_OPTION_VOLATILE The key is not preserved across boots.
21 * REG_OPTION_NON_VOLATILE The key is preserved accross boots.
22 * REG_OPTION_CREATE_LINK The key is a symbolic link to another key.
23 * REG_OPTION_BACKUP_RESTORE Key is being opened or created for backup/restore operations.
24 * Disposition = Indicates if the call to NtCreateKey resulted in the creation of a key it
25 * can have the following values: REG_CREATED_NEW_KEY | REG_OPENED_EXISTING_KEY
26 * RETURNS:
27 * Status
28 */
29
30 NTSTATUS STDCALL
31 NtCreateKey(OUT PHANDLE KeyHandle,
32 IN ACCESS_MASK DesiredAccess,
33 IN POBJECT_ATTRIBUTES ObjectAttributes,
34 IN ULONG TitleIndex,
35 IN PUNICODE_STRING Class OPTIONAL,
36 IN ULONG CreateOptions,
37 IN PULONG Disposition OPTIONAL);
38
39 NTSTATUS STDCALL
40 ZwCreateKey(OUT PHANDLE KeyHandle,
41 IN ACCESS_MASK DesiredAccess,
42 IN POBJECT_ATTRIBUTES ObjectAttributes,
43 IN ULONG TitleIndex,
44 IN PUNICODE_STRING Class OPTIONAL,
45 IN ULONG CreateOptions,
46 IN PULONG Disposition OPTIONAL);
47