svn path=/trunk/; revision=19253
<directory name="hello">
<xi:include href="hello/hello.xml" />
</directory>
<directory name="hello">
<xi:include href="hello/hello.xml" />
</directory>
-
-<!-- fixme: hivetest -->
-
+<directory name="hivetest">
+ <xi:include href="hivetest/hivetest.xml" />
+</directory>
<directory name="icontest">
<xi:include href="icontest/icontest.xml" />
</directory>
<directory name="icontest">
<xi:include href="icontest/icontest.xml" />
</directory>
#include <windows.h>
#define NTOS_MODE_USER
#include <ndk/ntndk.h>
#include <windows.h>
#define NTOS_MODE_USER
#include <ndk/ntndk.h>
+#include <ndk/rtltypes.h>
+
+#define RtlRosInitUnicodeStringFromLiteral(__Name__, __Value__) \
+ { \
+ (__Name__)->Buffer = (__Value__); \
+ (__Name__)->Length = sizeof(__Value__) - sizeof(WCHAR); \
+ (__Name__)->MaximumLength = sizeof(__Value__); \
+ }
HANDLE OutputHandle;
HANDLE InputHandle;
HANDLE OutputHandle;
HANDLE InputHandle;
void CreateKeyTest(void)
{
void CreateKeyTest(void)
{
OBJECT_ATTRIBUTES ObjectAttributes;
NTSTATUS Status;
UNICODE_STRING KeyName = RTL_CONSTANT_STRING(L"\\Registry\\Machine\\Software\\testkey");
OBJECT_ATTRIBUTES ObjectAttributes;
NTSTATUS Status;
UNICODE_STRING KeyName = RTL_CONSTANT_STRING(L"\\Registry\\Machine\\Software\\testkey");
{
OBJECT_ATTRIBUTES ObjectAttributes;
UNICODE_STRING KeyName = RTL_CONSTANT_STRING(L"\\Registry\\Machine\\Software\\testkey");
{
OBJECT_ATTRIBUTES ObjectAttributes;
UNICODE_STRING KeyName = RTL_CONSTANT_STRING(L"\\Registry\\Machine\\Software\\testkey");
NTSTATUS Status;
dprintf("Delete key '\\Registry\\Machine\\Software\\testkey':\n");
NTSTATUS Status;
dprintf("Delete key '\\Registry\\Machine\\Software\\testkey':\n");
void EnumerateKeyTest(void)
{
void EnumerateKeyTest(void)
{
OBJECT_ATTRIBUTES ObjectAttributes;
NTSTATUS Status;
UNICODE_STRING KeyName = RTL_CONSTANT_STRING(L"\\Registry\\Machine\\Software");
OBJECT_ATTRIBUTES ObjectAttributes;
NTSTATUS Status;
UNICODE_STRING KeyName = RTL_CONSTANT_STRING(L"\\Registry\\Machine\\Software");
void SetValueTest1(void)
{
void SetValueTest1(void)
{
OBJECT_ATTRIBUTES ObjectAttributes;
UNICODE_STRING KeyName = RTL_CONSTANT_STRING(L"\\Registry\\Machine\\Software\\testkey");
UNICODE_STRING ValueName = RTL_CONSTANT_STRING(L"TestValue");
OBJECT_ATTRIBUTES ObjectAttributes;
UNICODE_STRING KeyName = RTL_CONSTANT_STRING(L"\\Registry\\Machine\\Software\\testkey");
UNICODE_STRING ValueName = RTL_CONSTANT_STRING(L"TestValue");
void SetValueTest2(void)
{
void SetValueTest2(void)
{
OBJECT_ATTRIBUTES ObjectAttributes;
UNICODE_STRING KeyName = RTL_CONSTANT_STRING(L"\\Registry\\Machine\\Software\\testkey");
UNICODE_STRING ValueName = RTL_CONSTANT_STRING(L"TestValue");
OBJECT_ATTRIBUTES ObjectAttributes;
UNICODE_STRING KeyName = RTL_CONSTANT_STRING(L"\\Registry\\Machine\\Software\\testkey");
UNICODE_STRING ValueName = RTL_CONSTANT_STRING(L"TestValue");
OBJECT_ATTRIBUTES ObjectAttributes;
UNICODE_STRING KeyName = RTL_CONSTANT_STRING(L"\\Registry\\Machine\\Software\\testkey");
UNICODE_STRING ValueName = RTL_CONSTANT_STRING(L"TestValue");
OBJECT_ATTRIBUTES ObjectAttributes;
UNICODE_STRING KeyName = RTL_CONSTANT_STRING(L"\\Registry\\Machine\\Software\\testkey");
UNICODE_STRING ValueName = RTL_CONSTANT_STRING(L"TestValue");
NTSTATUS Status;
dprintf("Open key '\\Registry\\Machine\\Software\\testkey':\n");
NTSTATUS Status;
dprintf("Open key '\\Registry\\Machine\\Software\\testkey':\n");
OBJECT_ATTRIBUTES ObjectAttributes;
UNICODE_STRING KeyName = RTL_CONSTANT_STRING(L"\\Registry\\Machine\\Software\\testkey");
ULONG Index,Length,i;
OBJECT_ATTRIBUTES ObjectAttributes;
UNICODE_STRING KeyName = RTL_CONSTANT_STRING(L"\\Registry\\Machine\\Software\\testkey");
ULONG Index,Length,i;
NTSTATUS Status;
dprintf("Open key '\\Registry\\Machine\\Software\\testkey':\n");
NTSTATUS Status;
dprintf("Open key '\\Registry\\Machine\\Software\\testkey':\n");
- HKEY hKey = NULL, hKey1;
+ HANDLE hKey = NULL, hKey1;
OBJECT_ATTRIBUTES ObjectAttributes;
NTSTATUS Status;
UNICODE_STRING KeyName = RTL_CONSTANT_STRING(L"\\Registry\\Machine\\Software");
OBJECT_ATTRIBUTES ObjectAttributes;
NTSTATUS Status;
UNICODE_STRING KeyName = RTL_CONSTANT_STRING(L"\\Registry\\Machine\\Software");
OBJECT_ATTRIBUTES ObjectAttributes;
UNICODE_STRING KeyName;
NTSTATUS Status;
OBJECT_ATTRIBUTES ObjectAttributes;
UNICODE_STRING KeyName;
NTSTATUS Status;
OBJECT_ATTRIBUTES ObjectAttributes;
UNICODE_STRING KeyName;
NTSTATUS Status;
OBJECT_ATTRIBUTES ObjectAttributes;
UNICODE_STRING KeyName;
NTSTATUS Status;
/* registry link create test */
void test6(void)
{
/* registry link create test */
void test6(void)
{
OBJECT_ATTRIBUTES ObjectAttributes;
UNICODE_STRING KeyName,ValueName;
NTSTATUS Status;
OBJECT_ATTRIBUTES ObjectAttributes;
UNICODE_STRING KeyName,ValueName;
NTSTATUS Status;
/* registry link delete test */
void test7(void)
{
/* registry link delete test */
void test7(void)
{
OBJECT_ATTRIBUTES ObjectAttributes;
UNICODE_STRING KeyName,ValueName;
NTSTATUS Status;
OBJECT_ATTRIBUTES ObjectAttributes;
UNICODE_STRING KeyName,ValueName;
NTSTATUS Status;
RtlRosInitUnicodeStringFromLiteral(&KeyName,L"test5");
InitializeObjectAttributes(&ObjectAttributes, &KeyName, OBJ_CASE_INSENSITIVE
, NULL, NULL);
RtlRosInitUnicodeStringFromLiteral(&KeyName,L"test5");
InitializeObjectAttributes(&ObjectAttributes, &KeyName, OBJ_CASE_INSENSITIVE
, NULL, NULL);
- Status = NtLoadKey(HKEY_LOCAL_MACHINE,&ObjectAttributes);
+ Status = NtLoadKey((HANDLE)HKEY_LOCAL_MACHINE,&ObjectAttributes);
dprintf("\t\t\t\tStatus =%x\n",Status);
dwError=RegLoadKey(HKEY_LOCAL_MACHINE,"def"
,"test5");
dprintf("\t\t\t\tStatus =%x\n",Status);
dwError=RegLoadKey(HKEY_LOCAL_MACHINE,"def"
,"test5");
- HKEY hKey = NULL, hKey1;
+ HANDLE hKey = NULL, hKey1;
OBJECT_ATTRIBUTES ObjectAttributes;
NTSTATUS Status;
UNICODE_STRING KeyName = RTL_CONSTANT_STRING(L"\\Registry");
OBJECT_ATTRIBUTES ObjectAttributes;
NTSTATUS Status;
UNICODE_STRING KeyName = RTL_CONSTANT_STRING(L"\\Registry");
-<module name="hivetest" type="win32gui" installbase="bin" installname="hivetest.exe" allowwarnings="true">
+<module name="hivetest" type="win32gui" installbase="bin" installname="hivetest.exe">
<define name="_WIN32_IE">0x0501</define>
<define name="_WIN32_WINNT">0x0501</define>
<define name="__USE_W32API" />
<define name="_WIN32_IE">0x0501</define>
<define name="_WIN32_WINNT">0x0501</define>
<define name="__USE_W32API" />