Modifed to add Registry specific object mgr types and functions

svn path=/trunk/; revision=154
This commit is contained in:
Rex Jolliff 1999-01-07 01:37:29 +00:00
parent 1e09a4813f
commit 4159ed2941
4 changed files with 117 additions and 69 deletions

View file

@ -0,0 +1,115 @@
typedef struct _KEY_VALUE
{
ULONG Flags;
ULONG TitleIndex;
ULONG Type;
WCHAR *Name;
ULONG DataLength;
PVOID Data;
} KEY_VALUE, *PKEY_VALUE;
typedef struct _KEY_OBJECT
{
CSHORT Type;
CSHORT Size;
ULONG Flags;
LARGE_INTEGER LastWriteTime;
ULONG TitleIndex;
ULONG NumSubKeys;
ULONG MaxSubNameLength;
ULONG MaxSubClassLength;
PKEY_OBJECT *SubKeys;
ULONG NumValues;
ULONG MaxValueNameLength;
ULONG MaxValueDataLength;
PKEY_VALUE *Values;
WCHAR *Name;
WCHAR *Class;
PKEY_OBJECT *NextKey;
} KEY_OBJECT, *PKEY_OBJECT;
/* key query information class */
typedef enum _KEY_INFORMATION_CLASS
{
KeyBasicInformation,
KeyNodeInformation,
KeyFullInformation
} KEY_INFORMATION_CLASS;
typedef struct _KEY_BASIC_INFORMATION
{
LARGE_INTEGER LastWriteTime;
ULONG TitleIndex;
ULONG NameLength;
WCHAR Name[1];
} KEY_BASIC_INFORMATION, *PKEY_BASIC_INFORMATION;
typedef struct _KEY_FULL_INFORMATION
{
LARGE_INTEGER LastWriteTime;
ULONG TitleIndex;
ULONG ClassOffset;
ULONG ClassLength;
ULONG SubKeys;
ULONG MaxNameLen;
ULONG MaxClassLen;
ULONG Values;
ULONG MaxValueNameLen;
ULONG MaxValueDataLen;
WCHAR Class[1];
} KEY_FULL_INFORMATION, *PKEY_FULL_INFORMATION;
typedef struct _KEY_NODE_INFORMATION
{
LARGE_INTEGER LastWriteTime;
ULONG TitleIndex;
ULONG ClassOffset;
ULONG ClassLength;
ULONG NameLength;
WCHAR Name[1];
} KEY_NODE_INFORMATION, *PKEY_NODE_INFORMATION;
/* key set information class */
/*
* KeyWriteTimeInformation
*/
/* key value information class */
typedef enum _KEY_VALUE_INFORMATION_CLASS
{
KeyValueBasicInformation,
KeyValueFullInformation,
KeyValuePartialInformation
} KEY_VALUE_INFORMATION_CLASS;
typedef struct _KEY_VALUE_BASIC_INFORMATION
{
ULONG TitleIndex;
ULONG Type;
ULONG NameLength;
WCHAR Name[1];
} KEY_VALUE_BASIC_INFORMATION, *PKEY_VALUE_BASIC_INFORMATION;
typedef struct _KEY_VALUE_FULL_INFORMATION
{
ULONG TitleIndex;
ULONG Type;
ULONG DataOffset;
ULONG DataLength;
ULONG NameLength;
WCHAR Name[1];
} KEY_VALUE_FULL_INFORMATION, *PKEY_VALUE_FULL_INFORMATION;
typedef struct _KEY_VALUE_PARTIAL_INFORMATION
{
ULONG TitleIndex;
ULONG Type;
ULONG DataLength;
UCHAR Data[1];
} KEY_VALUE_PARTIAL_INFORMATION, *PKEY_VALUE_PARTIAL_INFORMATION;

View file

@ -27,6 +27,7 @@ extern "C"
#include <ddk/defines.h>
#include <ddk/types.h>
#include <ddk/cfgtypes.h>
#include <ddk/cmtypes.h>
#include <ddk/ketypes.h>
#include <ddk/obtypes.h>
#include <ddk/mmtypes.h>
@ -40,6 +41,7 @@ extern "C"
#include <ddk/rtl.h>
#include <ddk/zw.h>
#include <ddk/cmfuncs.h>
#include <ddk/exfuncs.h>
#include <ddk/mmfuncs.h>
#include <ddk/kefuncs.h>

View file

@ -658,59 +658,6 @@ ZwCreateIoCompletion(
IN ULONG NumberOfConcurrentThreads
);
/*
* FUNCTION: Creates a registry key
* ARGUMENTS:
* KeyHandle (OUT) = Caller supplied storage for the resulting handle
* DesiredAccess = Specifies the allowed or desired access to the key
* It can have a combination of the following values:
* KEY_READ | KEY_WRITE | KEY_EXECUTE | KEY_ALL_ACCESS
* or
* KEY_QUERY_VALUE The values of the key can be queried.
* KEY_SET_VALUE The values of the key can be modified.
* KEY_CREATE_SUB_KEYS The key may contain subkeys.
* KEY_ENUMERATE_SUB_KEYS Subkeys can be queried.
* KEY_NOTIFY
* KEY_CREATE_LINK A symbolic link to the key can be created.
* ObjectAttributes = The name of the key may be specified directly in the name field
* of object attributes or relative to a key in rootdirectory.
* TitleIndex = Might specify the position in the sequential order of subkeys.
* Class = Specifies the kind of data, for example REG_SZ for string data. [ ??? ]
* CreateOptions = Specifies additional options with which the key is created
* REG_OPTION_VOLATILE The key is not preserved across boots.
* REG_OPTION_NON_VOLATILE The key is preserved accross boots.
* REG_OPTION_CREATE_LINK The key is a symbolic link to another key.
* REG_OPTION_BACKUP_RESTORE Key is being opened or created for backup/restore operations.
* Disposition = Indicates if the call to NtCreateKey resulted in the creation of a key it
* can have the following values: REG_CREATED_NEW_KEY | REG_OPENED_EXISTING_KEY
* RETURNS:
* Status
*/
NTSTATUS
STDCALL
NtCreateKey(
OUT PHANDLE KeyHandle,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes,
IN ULONG TitleIndex,
IN PUNICODE_STRING Class OPTIONAL,
IN ULONG CreateOptions,
IN PULONG Disposition OPTIONAL
);
NTSTATUS
STDCALL
ZwCreateKey(
OUT PHANDLE KeyHandle,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes,
IN ULONG TitleIndex,
IN PUNICODE_STRING Class OPTIONAL,
IN ULONG CreateOptions,
IN PULONG Disposition OPTIONAL
);
/*
* FUNCTION: Creates a mail slot file

View file

@ -69,22 +69,6 @@
#define ThreadPriorityBoost 14
#define MaxThreadInfoClass 15
// key query information class
#define KeyBasicInformation 0
#define KeyNodeInformation 1
#define KeyFullInformation 2
// key set information class
#define KeyWriteTimeInformation 0
// key value information class
#define KeyValueBasicInformation 0
#define KeyValueFullInformation 1
#define KeyValuePartialInformation 2
// object handle information
#define ObjectBasicInformation 0