mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 17:42:58 +00:00
Tiny update, fixes some output annoyances.
svn path=/trunk/; revision=4173
This commit is contained in:
parent
40160296f7
commit
9728fb6d1c
1 changed files with 24 additions and 24 deletions
|
@ -57,7 +57,7 @@ void CreateKeyTest(void)
|
||||||
UNICODE_STRING KeyName;
|
UNICODE_STRING KeyName;
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
|
|
||||||
dprintf("Create key: '\\Registry\\Machine\\Software\\testkey':\n");
|
dprintf("Create key '\\Registry\\Machine\\Software\\testkey':\n");
|
||||||
RtlInitUnicodeStringFromLiteral(&KeyName,
|
RtlInitUnicodeStringFromLiteral(&KeyName,
|
||||||
L"\\Registry\\Machine\\Software\\testkey");
|
L"\\Registry\\Machine\\Software\\testkey");
|
||||||
InitializeObjectAttributes(&ObjectAttributes,
|
InitializeObjectAttributes(&ObjectAttributes,
|
||||||
|
@ -65,7 +65,7 @@ void CreateKeyTest(void)
|
||||||
OBJ_CASE_INSENSITIVE,
|
OBJ_CASE_INSENSITIVE,
|
||||||
NULL,
|
NULL,
|
||||||
NULL);
|
NULL);
|
||||||
dprintf("NtCreateKey: ");
|
dprintf("NtCreateKey:\n");
|
||||||
Status = NtCreateKey(&hKey,
|
Status = NtCreateKey(&hKey,
|
||||||
KEY_ALL_ACCESS,
|
KEY_ALL_ACCESS,
|
||||||
&ObjectAttributes,
|
&ObjectAttributes,
|
||||||
|
@ -73,7 +73,7 @@ void CreateKeyTest(void)
|
||||||
NULL,
|
NULL,
|
||||||
REG_OPTION_NON_VOLATILE,
|
REG_OPTION_NON_VOLATILE,
|
||||||
NULL);
|
NULL);
|
||||||
dprintf("Status = %lx\n",Status);
|
dprintf(" Status = %lx\n",Status);
|
||||||
if (NT_SUCCESS(Status))
|
if (NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
NtClose(hKey);
|
NtClose(hKey);
|
||||||
|
@ -96,17 +96,17 @@ void DeleteKeyTest(void)
|
||||||
OBJ_CASE_INSENSITIVE,
|
OBJ_CASE_INSENSITIVE,
|
||||||
NULL,
|
NULL,
|
||||||
NULL);
|
NULL);
|
||||||
dprintf("NtOpenKey: ");
|
dprintf("NtOpenKey:\n");
|
||||||
Status = NtOpenKey(&hKey,
|
Status = NtOpenKey(&hKey,
|
||||||
KEY_ALL_ACCESS,
|
KEY_ALL_ACCESS,
|
||||||
&ObjectAttributes);
|
&ObjectAttributes);
|
||||||
dprintf("Status = %lx\n",Status);
|
dprintf(" Status = %lx\n",Status);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
dprintf("NtDeleteKey: ");
|
dprintf("NtDeleteKey:\n");
|
||||||
Status = NtDeleteKey(hKey);
|
Status = NtDeleteKey(hKey);
|
||||||
dprintf("Status = %lx\n",Status);
|
dprintf(" Status = %lx\n",Status);
|
||||||
NtClose(hKey);
|
NtClose(hKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -130,21 +130,21 @@ void EnumerateKeyTest(void)
|
||||||
OBJ_CASE_INSENSITIVE,
|
OBJ_CASE_INSENSITIVE,
|
||||||
NULL,
|
NULL,
|
||||||
NULL);
|
NULL);
|
||||||
dprintf("NtOpenKey: ");
|
dprintf("NtOpenKey:\n");
|
||||||
Status = NtOpenKey(&hKey,
|
Status = NtOpenKey(&hKey,
|
||||||
KEY_ALL_ACCESS,
|
KEY_ALL_ACCESS,
|
||||||
&ObjectAttributes);
|
&ObjectAttributes);
|
||||||
dprintf("Status = %lx\n", Status);
|
dprintf(" Status = %lx\n", Status);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
dprintf("NtQueryKey: ");
|
dprintf("NtQueryKey:\n");
|
||||||
Status = NtQueryKey(hKey,
|
Status = NtQueryKey(hKey,
|
||||||
KeyBasicInformation,
|
KeyBasicInformation,
|
||||||
&KeyInformation[0],
|
&KeyInformation[0],
|
||||||
sizeof(KeyInformation),
|
sizeof(KeyInformation),
|
||||||
&Length);
|
&Length);
|
||||||
dprintf("Status = %lx\n", Status);
|
dprintf(" Status = %lx\n", Status);
|
||||||
if (NT_SUCCESS(Status))
|
if (NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
dprintf("\tKey Name = ");
|
dprintf("\tKey Name = ");
|
||||||
|
@ -153,7 +153,7 @@ void EnumerateKeyTest(void)
|
||||||
dprintf("\n");
|
dprintf("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
dprintf("NtEnumerateKey: \n");
|
dprintf("NtEnumerateKey:\n");
|
||||||
Index=0;
|
Index=0;
|
||||||
while(NT_SUCCESS(Status))
|
while(NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
|
@ -173,9 +173,9 @@ void EnumerateKeyTest(void)
|
||||||
Index++;
|
Index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
dprintf("NtClose: ");
|
dprintf("NtClose:\n");
|
||||||
Status = NtClose(hKey);
|
Status = NtClose(hKey);
|
||||||
dprintf("Status = %lx\n", Status);
|
dprintf(" Status = %lx\n", Status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -187,7 +187,7 @@ void SetValueTest1(void)
|
||||||
UNICODE_STRING ValueName;
|
UNICODE_STRING ValueName;
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
|
|
||||||
dprintf("Create key: '\\Registry\\Machine\\Software\\testkey':\n");
|
dprintf("Create key '\\Registry\\Machine\\Software\\testkey':\n");
|
||||||
RtlInitUnicodeStringFromLiteral(&KeyName,
|
RtlInitUnicodeStringFromLiteral(&KeyName,
|
||||||
L"\\Registry\\Machine\\Software\\testkey");
|
L"\\Registry\\Machine\\Software\\testkey");
|
||||||
InitializeObjectAttributes(&ObjectAttributes,
|
InitializeObjectAttributes(&ObjectAttributes,
|
||||||
|
@ -195,7 +195,7 @@ void SetValueTest1(void)
|
||||||
OBJ_CASE_INSENSITIVE | OBJ_OPENIF,
|
OBJ_CASE_INSENSITIVE | OBJ_OPENIF,
|
||||||
NULL,
|
NULL,
|
||||||
NULL);
|
NULL);
|
||||||
dprintf("NtCreateKey: ");
|
dprintf("NtCreateKey:\n");
|
||||||
Status = NtCreateKey(&hKey,
|
Status = NtCreateKey(&hKey,
|
||||||
KEY_ALL_ACCESS,
|
KEY_ALL_ACCESS,
|
||||||
&ObjectAttributes,
|
&ObjectAttributes,
|
||||||
|
@ -203,20 +203,20 @@ void SetValueTest1(void)
|
||||||
NULL,
|
NULL,
|
||||||
REG_OPTION_NON_VOLATILE,
|
REG_OPTION_NON_VOLATILE,
|
||||||
NULL);
|
NULL);
|
||||||
dprintf("Status = %lx\n",Status);
|
dprintf(" Status = %lx\n",Status);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
RtlInitUnicodeStringFromLiteral(&ValueName,
|
RtlInitUnicodeStringFromLiteral(&ValueName,
|
||||||
L"TestValue");
|
L"TestValue");
|
||||||
dprintf("NtSetValueKey: ");
|
dprintf("NtSetValueKey:\n");
|
||||||
Status = NtSetValueKey(hKey,
|
Status = NtSetValueKey(hKey,
|
||||||
&ValueName,
|
&ValueName,
|
||||||
0,
|
0,
|
||||||
REG_SZ,
|
REG_SZ,
|
||||||
(PVOID)L"TestString",
|
(PVOID)L"TestString",
|
||||||
24);
|
24);
|
||||||
dprintf("Status = %lx\n",Status);
|
dprintf(" Status = %lx\n",Status);
|
||||||
|
|
||||||
NtClose(hKey);
|
NtClose(hKey);
|
||||||
}
|
}
|
||||||
|
@ -230,7 +230,7 @@ void SetValueTest2(void)
|
||||||
UNICODE_STRING ValueName;
|
UNICODE_STRING ValueName;
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
|
|
||||||
dprintf("Create key: '\\Registry\\Machine\\Software\\testkey':\n");
|
dprintf("Create key '\\Registry\\Machine\\Software\\testkey':\n");
|
||||||
RtlInitUnicodeStringFromLiteral(&KeyName,
|
RtlInitUnicodeStringFromLiteral(&KeyName,
|
||||||
L"\\Registry\\Machine\\Software\\testkey");
|
L"\\Registry\\Machine\\Software\\testkey");
|
||||||
InitializeObjectAttributes(&ObjectAttributes,
|
InitializeObjectAttributes(&ObjectAttributes,
|
||||||
|
@ -238,7 +238,7 @@ void SetValueTest2(void)
|
||||||
OBJ_CASE_INSENSITIVE | OBJ_OPENIF,
|
OBJ_CASE_INSENSITIVE | OBJ_OPENIF,
|
||||||
NULL,
|
NULL,
|
||||||
NULL);
|
NULL);
|
||||||
dprintf("NtCreateKey: ");
|
dprintf("NtCreateKey:\n");
|
||||||
Status = NtCreateKey(&hKey,
|
Status = NtCreateKey(&hKey,
|
||||||
KEY_ALL_ACCESS,
|
KEY_ALL_ACCESS,
|
||||||
&ObjectAttributes,
|
&ObjectAttributes,
|
||||||
|
@ -273,7 +273,7 @@ void DeleteValueTest(void)
|
||||||
HKEY KeyHandle;
|
HKEY KeyHandle;
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
|
|
||||||
dprintf("Open key: '\\Registry\\Machine\\Software\\testkey':\n");
|
dprintf("Open key '\\Registry\\Machine\\Software\\testkey':\n");
|
||||||
RtlInitUnicodeStringFromLiteral(&KeyName,
|
RtlInitUnicodeStringFromLiteral(&KeyName,
|
||||||
L"\\Registry\\Machine\\Software\\testkey");
|
L"\\Registry\\Machine\\Software\\testkey");
|
||||||
InitializeObjectAttributes(&ObjectAttributes,
|
InitializeObjectAttributes(&ObjectAttributes,
|
||||||
|
@ -311,7 +311,7 @@ void EnumerateValueTest(void)
|
||||||
HKEY hKey = NULL;
|
HKEY hKey = NULL;
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
|
|
||||||
dprintf("Open key: '\\Registry\\Machine\\Software\\testkey':\n");
|
dprintf("Open key '\\Registry\\Machine\\Software\\testkey':\n");
|
||||||
RtlInitUnicodeStringFromLiteral(&KeyName,
|
RtlInitUnicodeStringFromLiteral(&KeyName,
|
||||||
L"\\Registry\\Machine\\Software\\testkey");
|
L"\\Registry\\Machine\\Software\\testkey");
|
||||||
InitializeObjectAttributes(&ObjectAttributes,
|
InitializeObjectAttributes(&ObjectAttributes,
|
||||||
|
@ -326,7 +326,7 @@ void EnumerateValueTest(void)
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
dprintf("Enumerate values: \n");
|
dprintf("Enumerate values:\n");
|
||||||
Index = 0;
|
Index = 0;
|
||||||
while (Status == STATUS_SUCCESS)
|
while (Status == STATUS_SUCCESS)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue