From 40e2bff3e7dd64d5fb00942948e88bfb5dce92fc Mon Sep 17 00:00:00 2001 From: "KJK::Hyperion" Date: Mon, 17 Nov 2003 02:12:52 +0000 Subject: [PATCH] Moved and renamed some ReactOS specific macros svn path=/trunk/; revision=6672 --- reactos/apps/tests/apc/apc.c | 3 +- reactos/apps/tests/hivetest/hivetest.c | 85 +++++++++++---------- reactos/apps/tests/lpc/lpcclt.c | 5 +- reactos/apps/tests/lpc/lpcsrv.c | 5 +- reactos/apps/tests/regtest/regtest.c | 81 ++++++++++---------- reactos/apps/utils/pice/module/patch.c | 3 +- reactos/apps/utils/pice/module/privateice.c | 5 +- reactos/drivers/dd/beep/beep.c | 7 +- reactos/drivers/dd/blue/blue.c | 7 +- reactos/drivers/dd/bootvid/bootvid.c | 7 +- reactos/drivers/dd/debugout/debugout.c | 7 +- reactos/drivers/dd/floppy/floppy.c | 4 +- reactos/drivers/dd/null/null.c | 7 +- reactos/drivers/dd/parallel/parallel.c | 5 +- reactos/drivers/dd/ramdrv/ramdrv.c | 7 +- reactos/drivers/dd/vga/miniport/initvga.c | 3 +- reactos/drivers/fs/cdfs/cdfs.c | 5 +- reactos/drivers/fs/ext2/super.c | 3 +- reactos/drivers/fs/fs_rec/cdfs.c | 5 +- reactos/drivers/fs/fs_rec/fat.c | 5 +- reactos/drivers/fs/fs_rec/udfs.c | 5 +- reactos/drivers/fs/np/rw.c | 11 +-- reactos/drivers/fs/ntfs/ntfs.c | 5 +- reactos/drivers/fs/template/template.c | 5 +- reactos/drivers/fs/vfat/fcb.c | 9 ++- reactos/drivers/fs/vfat/fsctl.c | 7 +- reactos/drivers/fs/vfat/iface.c | 5 +- reactos/drivers/input/keyboard/keyboard.c | 5 +- reactos/drivers/input/mouclass/mouclass.c | 7 +- reactos/drivers/net/afd/afd/afd.c | 3 +- reactos/drivers/net/tcpip/tcpip/main.c | 9 ++- reactos/drivers/net/wshtcpip/wshtcpip.c | 7 +- reactos/drivers/storage/scsiport/scsiport.c | 5 +- reactos/include/ntos/rtl.h | 75 +----------------- reactos/include/rosrtl/minmax.h | 23 ++++++ reactos/include/rosrtl/string.h | 51 +++++++++++++ reactos/lib/advapi32/reg/reg.c | 11 +-- reactos/lib/kernel32/debug/output.c | 6 +- reactos/lib/kernel32/file/curdir.c | 6 +- reactos/lib/kernel32/file/find.c | 4 +- reactos/lib/kernel32/k32.h | 1 + reactos/lib/kernel32/misc/comm.c | 28 +++---- reactos/lib/kernel32/misc/dllmain.c | 4 +- reactos/lib/msafd/misc/dllmain.c | 5 +- reactos/lib/ntdll/csr/lpc.c | 5 +- reactos/lib/ntdll/dbg/debug.c | 7 +- reactos/lib/ntdll/rtl/registry.c | 5 +- reactos/lib/secur32/lsa.c | 5 +- reactos/ntoskrnl/cm/registry.c | 17 +++-- reactos/ntoskrnl/cm/regobj.c | 3 +- reactos/ntoskrnl/cm/rtlfunc.c | 8 +- reactos/ntoskrnl/dbg/kdb_stabs.c | 5 +- reactos/ntoskrnl/ex/win32k.c | 5 +- reactos/ntoskrnl/inbv/inbv.c | 5 +- reactos/ntoskrnl/io/arcname.c | 5 +- reactos/ntoskrnl/io/driver.c | 7 +- reactos/ntoskrnl/io/iomgr.c | 21 ++--- reactos/ntoskrnl/io/pnproot.c | 5 +- reactos/ntoskrnl/io/resource.c | 11 +-- reactos/ntoskrnl/kd/dlog.c | 5 +- reactos/ntoskrnl/ldr/init.c | 5 +- reactos/ntoskrnl/ldr/sysdll.c | 3 +- reactos/ntoskrnl/lpc/port.c | 5 +- reactos/ntoskrnl/mm/pagefile.c | 5 +- reactos/ntoskrnl/mm/section.c | 7 +- reactos/ntoskrnl/ob/namespc.c | 9 ++- reactos/ntoskrnl/ob/symlink.c | 5 +- reactos/ntoskrnl/ps/locale.c | 19 ++--- reactos/ntoskrnl/ps/process.c | 5 +- reactos/ntoskrnl/ps/psmgr.c | 6 +- reactos/ntoskrnl/ps/thread.c | 5 +- reactos/services/eventlog/logport.c | 5 +- reactos/subsys/csrss/api/conio.c | 30 ++++---- reactos/subsys/csrss/csrss.c | 5 +- reactos/subsys/csrss/init.c | 9 ++- reactos/subsys/csrss/video.c | 5 +- reactos/subsys/smss/init.c | 17 +++-- reactos/subsys/smss/smapi.c | 5 +- reactos/subsys/system/services/database.c | 9 ++- reactos/subsys/system/usetup/registry.c | 5 +- reactos/subsys/win32k/misc/driver.c | 5 +- reactos/subsys/win32k/ntuser/input.c | 7 +- reactos/subsys/win32k/ntuser/winsta.c | 5 +- 83 files changed, 466 insertions(+), 390 deletions(-) create mode 100644 reactos/include/rosrtl/minmax.h create mode 100644 reactos/include/rosrtl/string.h diff --git a/reactos/apps/tests/apc/apc.c b/reactos/apps/tests/apc/apc.c index aac7fee331b..77e3b1fd5a3 100644 --- a/reactos/apps/tests/apc/apc.c +++ b/reactos/apps/tests/apc/apc.c @@ -3,6 +3,7 @@ #include #include #include +#include HANDLE OutputHandle; HANDLE InputHandle; @@ -20,7 +21,7 @@ int main(int argc, char* argv[]) NTSTATUS Status; HANDLE FileHandle; OBJECT_ATTRIBUTES ObjectAttributes; - UNICODE_STRING FileName = UNICODE_STRING_INITIALIZER(L"\\C:\\a.txt"); + UNICODE_STRING FileName = ROS_STRING_INITIALIZER(L"\\C:\\a.txt"); IO_STATUS_BLOCK IoStatus; CHAR Buffer[256]; HANDLE EventHandle; diff --git a/reactos/apps/tests/hivetest/hivetest.c b/reactos/apps/tests/hivetest/hivetest.c index e941180990a..2dc2fa31f54 100644 --- a/reactos/apps/tests/hivetest/hivetest.c +++ b/reactos/apps/tests/hivetest/hivetest.c @@ -3,6 +3,7 @@ #include #include #include +#include HANDLE OutputHandle; HANDLE InputHandle; @@ -58,7 +59,7 @@ void CreateKeyTest(void) NTSTATUS Status; dprintf("Create key '\\Registry\\Machine\\Software\\testkey':\n"); - RtlInitUnicodeStringFromLiteral(&KeyName, + RtlRosInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\Software\\testkey"); InitializeObjectAttributes(&ObjectAttributes, &KeyName, @@ -89,7 +90,7 @@ void DeleteKeyTest(void) NTSTATUS Status; dprintf("Delete key '\\Registry\\Machine\\Software\\testkey':\n"); - RtlInitUnicodeStringFromLiteral(&KeyName, + RtlRosInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\Software\\testkey"); InitializeObjectAttributes(&ObjectAttributes, &KeyName, @@ -123,7 +124,7 @@ void EnumerateKeyTest(void) KEY_BASIC_INFORMATION KeyInformation[5]; dprintf("Enumerate key '\\Registry\\Machine\\Software':\n"); - RtlInitUnicodeStringFromLiteral(&KeyName, + RtlRosInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\Software"); InitializeObjectAttributes(&ObjectAttributes, &KeyName, @@ -188,7 +189,7 @@ void SetValueTest1(void) NTSTATUS Status; dprintf("Create key '\\Registry\\Machine\\Software\\testkey':\n"); - RtlInitUnicodeStringFromLiteral(&KeyName, + RtlRosInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\Software\\testkey"); InitializeObjectAttributes(&ObjectAttributes, &KeyName, @@ -207,7 +208,7 @@ void SetValueTest1(void) if (!NT_SUCCESS(Status)) return; - RtlInitUnicodeStringFromLiteral(&ValueName, + RtlRosInitUnicodeStringFromLiteral(&ValueName, L"TestValue"); dprintf("NtSetValueKey:\n"); Status = NtSetValueKey(hKey, @@ -231,7 +232,7 @@ void SetValueTest2(void) NTSTATUS Status; dprintf("Create key '\\Registry\\Machine\\Software\\testkey':\n"); - RtlInitUnicodeStringFromLiteral(&KeyName, + RtlRosInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\Software\\testkey"); InitializeObjectAttributes(&ObjectAttributes, &KeyName, @@ -250,7 +251,7 @@ void SetValueTest2(void) if (!NT_SUCCESS(Status)) return; - RtlInitUnicodeStringFromLiteral(&ValueName, + RtlRosInitUnicodeStringFromLiteral(&ValueName, L"TestValue"); dprintf("NtSetValueKey:\n"); Status = NtSetValueKey(hKey, @@ -274,7 +275,7 @@ void DeleteValueTest(void) NTSTATUS Status; dprintf("Open key '\\Registry\\Machine\\Software\\testkey':\n"); - RtlInitUnicodeStringFromLiteral(&KeyName, + RtlRosInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\Software\\testkey"); InitializeObjectAttributes(&ObjectAttributes, &KeyName, @@ -289,7 +290,7 @@ void DeleteValueTest(void) return; dprintf("Delete value:\n"); - RtlInitUnicodeStringFromLiteral(&ValueName, + RtlRosInitUnicodeStringFromLiteral(&ValueName, L"TestValue"); Status = NtDeleteValueKey(KeyHandle, &ValueName); @@ -311,7 +312,7 @@ void EnumerateValueTest(void) NTSTATUS Status; dprintf("Open key '\\Registry\\Machine\\Software\\testkey':\n"); - RtlInitUnicodeStringFromLiteral(&KeyName, + RtlRosInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\Software\\testkey"); InitializeObjectAttributes(&ObjectAttributes, &KeyName, @@ -369,9 +370,9 @@ void test1(void) OBJECT_ATTRIBUTES ObjectAttributes; NTSTATUS Status; #if 0 - UNICODE_STRING KeyName = UNICODE_STRING_INITIALIZER(L"\\Registry"); + UNICODE_STRING KeyName = ROS_STRING_INITIALIZER(L"\\Registry"); #endif - UNICODE_STRING KeyName = UNICODE_STRING_INITIALIZER(L"\\Registry\\Machine\\Software"); + UNICODE_STRING KeyName = ROS_STRING_INITIALIZER(L"\\Registry\\Machine\\Software"); ULONG Index,Length,i; KEY_BASIC_INFORMATION KeyInformation[5]; @@ -423,7 +424,7 @@ void test1(void) #if 0 dprintf("NtOpenKey \\Registry\\Machine : "); - RtlInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine"); + RtlRosInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine"); InitializeObjectAttributes(&ObjectAttributes, &KeyName, OBJ_CASE_INSENSITIVE, @@ -433,7 +434,7 @@ void test1(void) dprintf("\t\t\tStatus =%x\n",Status); dprintf("NtOpenKey System\\Setup : "); - RtlInitUnicodeStringFromLiteral(&KeyName, L"System\\Setup"); + RtlRosInitUnicodeStringFromLiteral(&KeyName, L"System\\Setup"); InitializeObjectAttributes(&ObjectAttributes, &KeyName, OBJ_CASE_INSENSITIVE , hKey1 , NULL); Status = NtOpenKey ( &hKey, KEY_READ , &ObjectAttributes); @@ -441,7 +442,7 @@ void test1(void) if(Status==0) { dprintf("NtQueryValueKey : "); - RtlInitUnicodeStringFromLiteral(&KeyName, L"CmdLine"); + RtlRosInitUnicodeStringFromLiteral(&KeyName, L"CmdLine"); Status=NtQueryValueKey(hKey,&KeyName,KeyValueFullInformation ,&KeyValueInformation[0], sizeof(KeyValueInformation) ,&Length); @@ -500,7 +501,7 @@ void test3(void) DWORD Result; dprintf("NtCreateKey non volatile: \n"); dprintf(" \\Registry\\Machine\\Software\\test3reactos: "); - RtlInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\Software\\test3reactos"); + RtlRosInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\Software\\test3reactos"); InitializeObjectAttributes(&ObjectAttributes, &KeyName, OBJ_CASE_INSENSITIVE , NULL, NULL); Status = NtCreateKey ( &hKey, KEY_ALL_ACCESS , &ObjectAttributes @@ -514,7 +515,7 @@ void test3(void) dprintf("\t\tStatus=%x\n",Status); NtClose(hKey); dprintf(" ...\\test3 :"); - RtlInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\Software\\test3reactos\\test3"); + RtlRosInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\Software\\test3reactos\\test3"); InitializeObjectAttributes(&ObjectAttributes, &KeyName, OBJ_CASE_INSENSITIVE , NULL, NULL); Status = NtCreateKey ( &hKey, KEY_ALL_ACCESS , &ObjectAttributes @@ -525,24 +526,24 @@ void test3(void) dprintf("\t\tStatus=%x\n",Status); NtClose(hKey); dprintf(" ...\\testNonVolatile :"); - RtlInitUnicodeStringFromLiteral(&KeyName, L"TestNonVolatile"); + RtlRosInitUnicodeStringFromLiteral(&KeyName, L"TestNonVolatile"); InitializeObjectAttributes(&ObjectAttributes, &KeyName, OBJ_CASE_INSENSITIVE , hKey1, NULL); Status = NtCreateKey ( &hKey, KEY_ALL_ACCESS , &ObjectAttributes ,0,NULL,REG_OPTION_NON_VOLATILE,NULL); dprintf("\t\t\t\tStatus=%x\n",Status); NtClose(hKey1); - RtlInitUnicodeStringFromLiteral(&ValueName, L"TestREG_SZ"); + RtlRosInitUnicodeStringFromLiteral(&ValueName, L"TestREG_SZ"); dprintf("NtSetValueKey reg_sz: "); Status=NtSetValueKey(hKey,&ValueName,0,REG_SZ,(PVOID)L"Test Reg_sz",24); dprintf("\t\t\t\tStatus=%x\n",Status); - RtlInitUnicodeStringFromLiteral(&ValueName, L"TestDWORD"); + RtlRosInitUnicodeStringFromLiteral(&ValueName, L"TestDWORD"); dprintf("NtSetValueKey reg_dword: "); Status=NtSetValueKey(hKey,&ValueName,0,REG_DWORD,(PVOID)"reac",4); dprintf("\t\t\tStatus=%x\n",Status); NtClose(hKey); dprintf("NtOpenKey \\Registry\\Machine\\Software\\test3reactos\\test3\\testNonVolatile : "); - RtlInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\Software\\test3reactos\\test3\\testNonVolatile"); + RtlRosInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\Software\\test3reactos\\test3\\testNonVolatile"); InitializeObjectAttributes(&ObjectAttributes, &KeyName, OBJ_CASE_INSENSITIVE, @@ -581,7 +582,7 @@ void test3(void) ReadConsoleA(InputHandle, Buffer, 3, &Result, NULL) ; if (Buffer[0] != 'y' && Buffer[0] != 'Y') return; #if 0 - RtlInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\Software\\test3reactos\\test3\\testNonvolatile"); + RtlRosInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\Software\\test3reactos\\test3\\testNonvolatile"); InitializeObjectAttributes(&ObjectAttributes, &KeyName, OBJ_CASE_INSENSITIVE, @@ -593,7 +594,7 @@ void test3(void) dprintf("NtDeleteKey : "); Status=NtDeleteKey(hKey); dprintf("\t\t\t\tStatus =%x\n",Status); - RtlInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\Software\\test3reactos\\test3"); + RtlRosInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\Software\\test3reactos\\test3"); InitializeObjectAttributes(&ObjectAttributes, &KeyName, OBJ_CASE_INSENSITIVE, @@ -608,7 +609,7 @@ void test3(void) NtClose(hKey); #endif dprintf("delete \\Registry\\Machine\\software\\test3reactos ?"); - RtlInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\Software\\test3reactos"); + RtlRosInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\Software\\test3reactos"); InitializeObjectAttributes(&ObjectAttributes, &KeyName, OBJ_CASE_INSENSITIVE, @@ -794,7 +795,7 @@ void test5(void) dprintf("NtOpenKey : \n"); dprintf(" \\Registry\\Machine\\Software\\reactos : "); - RtlInitUnicodeStringFromLiteral(&KeyName,L"\\Registry\\Machine\\Software\\reactos"); + RtlRosInitUnicodeStringFromLiteral(&KeyName,L"\\Registry\\Machine\\Software\\reactos"); InitializeObjectAttributes(&ObjectAttributes, &KeyName, OBJ_CASE_INSENSITIVE , NULL, NULL); Status=NtOpenKey( &hKey, KEY_ALL_ACCESS, &ObjectAttributes); @@ -819,7 +820,7 @@ void test6(void) dprintf("Create target key\n"); dprintf(" Key: \\Registry\\Machine\\SOFTWARE\\Reactos\n"); - RtlInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\SOFTWARE\\Reactos"); + RtlRosInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\SOFTWARE\\Reactos"); InitializeObjectAttributes(&ObjectAttributes, &KeyName, OBJ_CASE_INSENSITIVE , NULL, NULL); Status = NtCreateKey(&hKey, KEY_ALL_ACCESS , &ObjectAttributes @@ -830,7 +831,7 @@ void test6(void) dprintf("Create target value\n"); dprintf(" Value: TestValue = 'Test String'\n"); - RtlInitUnicodeStringFromLiteral(&ValueName, L"TestValue"); + RtlRosInitUnicodeStringFromLiteral(&ValueName, L"TestValue"); Status=NtSetValueKey(hKey,&ValueName,0,REG_SZ,(PVOID)L"TestString",22); dprintf(" NtSetValueKey() called (Status %lx)\n",Status); if (!NT_SUCCESS(Status)) @@ -842,7 +843,7 @@ void test6(void) dprintf("Create link key\n"); dprintf(" Key: \\Registry\\Machine\\SOFTWARE\\Test\n"); - RtlInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\SOFTWARE\\Test"); + RtlRosInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\SOFTWARE\\Test"); InitializeObjectAttributes(&ObjectAttributes, &KeyName, OBJ_CASE_INSENSITIVE | OBJ_OPENLINK, @@ -861,7 +862,7 @@ void test6(void) dprintf("Create link value\n"); dprintf(" Value: SymbolicLinkValue = '\\Registry\\Machine\\SOFTWARE\\Reactos'\n"); - RtlInitUnicodeStringFromLiteral(&ValueName, L"SymbolicLinkValue"); + RtlRosInitUnicodeStringFromLiteral(&ValueName, L"SymbolicLinkValue"); Status=NtSetValueKey(hKey,&ValueName,0,REG_LINK,(PVOID)L"\\Registry\\Machine\\SOFTWARE\\Reactos",68); dprintf(" NtSetValueKey() called (Status %lx)\n",Status); if (!NT_SUCCESS(Status)) @@ -876,7 +877,7 @@ void test6(void) dprintf("Open link key\n"); dprintf(" Key: \\Registry\\Machine\\SOFTWARE\\Test\n"); - RtlInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\SOFTWARE\\Test"); + RtlRosInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\SOFTWARE\\Test"); InitializeObjectAttributes(&ObjectAttributes, &KeyName, OBJ_CASE_INSENSITIVE | OBJ_OPENIF , NULL, NULL); Status = NtCreateKey(&hKey, KEY_ALL_ACCESS , &ObjectAttributes @@ -887,7 +888,7 @@ void test6(void) dprintf("Query value\n"); dprintf(" Value: TestValue\n"); - RtlInitUnicodeStringFromLiteral(&ValueName, L"TestValue"); + RtlRosInitUnicodeStringFromLiteral(&ValueName, L"TestValue"); Status=NtQueryValueKey(hKey, &ValueName, KeyValueFullInformation, @@ -926,7 +927,7 @@ void test7(void) dprintf("Open link key\n"); dprintf(" Key: \\Registry\\Machine\\SOFTWARE\\Test\n"); - RtlInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\SOFTWARE\\Test"); + RtlRosInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\SOFTWARE\\Test"); InitializeObjectAttributes(&ObjectAttributes, &KeyName, OBJ_CASE_INSENSITIVE | OBJ_OPENIF | OBJ_OPENLINK, @@ -947,7 +948,7 @@ void test7(void) } dprintf("Delete link value\n"); - RtlInitUnicodeStringFromLiteral(&ValueName, L"SymbolicLinkValue"); + RtlRosInitUnicodeStringFromLiteral(&ValueName, L"SymbolicLinkValue"); Status = NtDeleteValueKey(hKey, &ValueName); dprintf(" NtDeleteValueKey() called (Status %lx)\n",Status); @@ -998,7 +999,7 @@ void test8(void) // dprintf("\t\t\t\tStatus =%x\n",Status); - RtlInitUnicodeStringFromLiteral(&KeyName,L"test5"); + RtlRosInitUnicodeStringFromLiteral(&KeyName,L"test5"); InitializeObjectAttributes(&ObjectAttributes, &KeyName, OBJ_CASE_INSENSITIVE , NULL, NULL); Status = NtLoadKey(HKEY_LOCAL_MACHINE,&ObjectAttributes); @@ -1008,7 +1009,7 @@ void test8(void) dprintf("\t\t\t\tdwError =%x\n",dwError); dprintf("NtOpenKey \\Registry\\Machine : "); - RtlInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine"); + RtlRosInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine"); InitializeObjectAttributes(&ObjectAttributes, &KeyName, OBJ_CASE_INSENSITIVE, @@ -1016,7 +1017,7 @@ void test8(void) NULL); Status=NtOpenKey( &hKey, MAXIMUM_ALLOWED, &ObjectAttributes); dprintf("\t\t\tStatus =%x\n",Status); - RtlInitUnicodeStringFromLiteral(&KeyName,L"test5"); + RtlRosInitUnicodeStringFromLiteral(&KeyName,L"test5"); InitializeObjectAttributes(&ObjectAttributes, &KeyName, OBJ_CASE_INSENSITIVE , NULL, NULL); Status = NtLoadKey(hKey,&ObjectAttributes); @@ -1028,7 +1029,7 @@ void test9(void) HKEY hKey = NULL, hKey1; OBJECT_ATTRIBUTES ObjectAttributes; NTSTATUS Status; - UNICODE_STRING KeyName = UNICODE_STRING_INITIALIZER(L"\\Registry"); + UNICODE_STRING KeyName = ROS_STRING_INITIALIZER(L"\\Registry"); ULONG Index,Length,i; KEY_BASIC_INFORMATION KeyInformation[5]; KEY_VALUE_FULL_INFORMATION KeyValueInformation[5]; @@ -1070,7 +1071,7 @@ void test9(void) NtClose(hKey); // RobD - hKey unused so-far, should this have been hKey1 ??? dprintf("NtOpenKey \\Registry\\Machine : "); - RtlInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine"); + RtlRosInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine"); InitializeObjectAttributes(&ObjectAttributes, &KeyName, OBJ_CASE_INSENSITIVE, @@ -1082,20 +1083,20 @@ void test9(void) //Status of c0000001 opening \Registry\Machine\System\CurrentControlSet\Services\Tcpip\Linkage // dprintf("NtOpenKey System\\CurrentControlSet\\Services\\Tcpip : "); -// RtlInitUnicodeStringFromLiteral(&KeyName, L"System\\CurrentControlSet\\Services\\Tcpip"); +// RtlRosInitUnicodeStringFromLiteral(&KeyName, L"System\\CurrentControlSet\\Services\\Tcpip"); #if 1 dprintf("NtOpenKey System\\ControlSet001\\Services\\Tcpip\\Parameters : "); - RtlInitUnicodeStringFromLiteral(&KeyName, L"System\\ControlSet001\\Services\\Tcpip\\Parameters"); + RtlRosInitUnicodeStringFromLiteral(&KeyName, L"System\\ControlSet001\\Services\\Tcpip\\Parameters"); #else dprintf("NtOpenKey System\\CurrentControlSet\\Services\\Tcpip : "); - RtlInitUnicodeStringFromLiteral(&KeyName, L"System\\CurrentControlSet\\Services\\Tcpip"); + RtlRosInitUnicodeStringFromLiteral(&KeyName, L"System\\CurrentControlSet\\Services\\Tcpip"); #endif InitializeObjectAttributes(&ObjectAttributes, &KeyName, OBJ_CASE_INSENSITIVE, hKey1 , NULL); Status = NtOpenKey(&hKey, KEY_READ , &ObjectAttributes); dprintf("\t\t\tStatus =%x\n",Status); if (Status == 0) { dprintf("NtQueryValueKey : "); - RtlInitUnicodeStringFromLiteral(&KeyName, L"NameServer"); + RtlRosInitUnicodeStringFromLiteral(&KeyName, L"NameServer"); Status = NtQueryValueKey(hKey, &KeyName, KeyValueFullInformation, &KeyValueInformation[0], sizeof(KeyValueInformation), &Length); dprintf("\t\t\t\tStatus =%x\n",Status); if (Status == STATUS_SUCCESS) { diff --git a/reactos/apps/tests/lpc/lpcclt.c b/reactos/apps/tests/lpc/lpcclt.c index 8cdd636dc99..129f24fce54 100644 --- a/reactos/apps/tests/lpc/lpcclt.c +++ b/reactos/apps/tests/lpc/lpcclt.c @@ -1,9 +1,10 @@ -/* $Id: lpcclt.c,v 1.12 2002/11/03 20:01:04 chorns Exp $ +/* $Id: lpcclt.c,v 1.13 2003/11/17 02:12:48 hyperion Exp $ * * DESCRIPTION: Simple LPC Client * PROGRAMMER: David Welch */ #include +#include #include #include #include @@ -31,7 +32,7 @@ void debug_printf(char* fmt, ...) int main(int argc, char* argv[]) { - UNICODE_STRING PortName = UNICODE_STRING_INITIALIZER(TEST_PORT_NAME_U); + UNICODE_STRING PortName = ROS_STRING_INITIALIZER(TEST_PORT_NAME_U); NTSTATUS Status; HANDLE PortHandle; LPC_MAX_MESSAGE Request; diff --git a/reactos/apps/tests/lpc/lpcsrv.c b/reactos/apps/tests/lpc/lpcsrv.c index 244a24a3bd2..09daaefc585 100644 --- a/reactos/apps/tests/lpc/lpcsrv.c +++ b/reactos/apps/tests/lpc/lpcsrv.c @@ -1,9 +1,10 @@ -/* $Id: lpcsrv.c,v 1.12 2003/08/07 11:47:32 silverblade Exp $ +/* $Id: lpcsrv.c,v 1.13 2003/11/17 02:12:48 hyperion Exp $ * * DESCRIPTION: Simple LPC Server * PROGRAMMER: David Welch */ #include +#include #include #include #include @@ -32,7 +33,7 @@ void debug_printf(char* fmt, ...) int main(int argc, char* argv[]) { - UNICODE_STRING PortName = UNICODE_STRING_INITIALIZER(TEST_PORT_NAME_U); + UNICODE_STRING PortName = ROS_STRING_INITIALIZER(TEST_PORT_NAME_U); OBJECT_ATTRIBUTES ObjectAttributes; NTSTATUS Status; HANDLE NamedPortHandle; diff --git a/reactos/apps/tests/regtest/regtest.c b/reactos/apps/tests/regtest/regtest.c index 0996d0d2916..ca867d2b10a 100644 --- a/reactos/apps/tests/regtest/regtest.c +++ b/reactos/apps/tests/regtest/regtest.c @@ -3,6 +3,7 @@ #include #include #include +#include HANDLE OutputHandle; HANDLE InputHandle; @@ -54,7 +55,7 @@ void test1(void) HKEY hKey = NULL, hKey1; OBJECT_ATTRIBUTES ObjectAttributes; NTSTATUS Status; - UNICODE_STRING KeyName = UNICODE_STRING_INITIALIZER(L"\\Registry"); + UNICODE_STRING KeyName = ROS_STRING_INITIALIZER(L"\\Registry"); ULONG Index,Length,i; KEY_BASIC_INFORMATION KeyInformation[5]; KEY_VALUE_FULL_INFORMATION KeyValueInformation[5]; @@ -103,7 +104,7 @@ void test1(void) NtClose(hKey); dprintf("NtOpenKey \\Registry\\Machine : "); - RtlInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine"); + RtlRosInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine"); InitializeObjectAttributes(&ObjectAttributes, &KeyName, OBJ_CASE_INSENSITIVE, @@ -113,7 +114,7 @@ void test1(void) dprintf("\t\t\tStatus =%x\n",Status); dprintf("NtOpenKey System\\Setup : "); - RtlInitUnicodeStringFromLiteral(&KeyName, L"System\\Setup"); + RtlRosInitUnicodeStringFromLiteral(&KeyName, L"System\\Setup"); InitializeObjectAttributes(&ObjectAttributes, &KeyName, OBJ_CASE_INSENSITIVE , hKey1 , NULL); Status = NtOpenKey ( &hKey, KEY_READ , &ObjectAttributes); @@ -121,7 +122,7 @@ void test1(void) if(Status==0) { dprintf("NtQueryValueKey : "); - RtlInitUnicodeStringFromLiteral(&KeyName, L"CmdLine"); + RtlRosInitUnicodeStringFromLiteral(&KeyName, L"CmdLine"); Status=NtQueryValueKey(hKey,&KeyName,KeyValueFullInformation ,&KeyValueInformation[0], sizeof(KeyValueInformation) ,&Length); @@ -181,7 +182,7 @@ void test2(void) DWORD Result; dprintf("NtCreateKey volatile: \n"); dprintf(" \\Registry\\Machine\\Software\\test2reactos: "); - RtlInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\Software\\test2reactos"); + RtlRosInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\Software\\test2reactos"); InitializeObjectAttributes(&ObjectAttributes, &KeyName, OBJ_CASE_INSENSITIVE , NULL, NULL); Status = NtCreateKey ( &hKey, KEY_ALL_ACCESS , &ObjectAttributes @@ -190,31 +191,31 @@ void test2(void) NtClose(hKey); do_enumeratekey(L"\\Registry\\Machine\\Software"); dprintf(" ...\\test2 :"); - RtlInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\Software\\test2reactos\\test2"); + RtlRosInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\Software\\test2reactos\\test2"); InitializeObjectAttributes(&ObjectAttributes, &KeyName, OBJ_CASE_INSENSITIVE , NULL, NULL); Status = NtCreateKey ( &hKey1, KEY_ALL_ACCESS , &ObjectAttributes ,0,NULL,REG_OPTION_VOLATILE,NULL); dprintf("\t\t\t\t\tStatus=%x\n",Status); dprintf(" ...\\TestVolatile :"); - RtlInitUnicodeStringFromLiteral(&KeyName, L"TestVolatile"); + RtlRosInitUnicodeStringFromLiteral(&KeyName, L"TestVolatile"); InitializeObjectAttributes(&ObjectAttributes, &KeyName, OBJ_CASE_INSENSITIVE , hKey1, NULL); Status = NtCreateKey ( &hKey, KEY_ALL_ACCESS , &ObjectAttributes ,0,NULL,REG_OPTION_VOLATILE,NULL); dprintf("\t\t\t\tStatus=%x\n",Status); NtClose(hKey1); - RtlInitUnicodeStringFromLiteral(&ValueName, L"TestREG_SZ"); + RtlRosInitUnicodeStringFromLiteral(&ValueName, L"TestREG_SZ"); dprintf("NtSetValueKey reg_sz: "); Status=NtSetValueKey(hKey,&ValueName,0,REG_SZ,(PVOID)L"Test Reg_sz",24); dprintf("\t\t\t\tStatus=%x\n",Status); - RtlInitUnicodeStringFromLiteral(&ValueName, L"TestDWORD"); + RtlRosInitUnicodeStringFromLiteral(&ValueName, L"TestDWORD"); dprintf("NtSetValueKey reg_dword: "); Status=NtSetValueKey(hKey,&ValueName,0,REG_DWORD,(PVOID)"reac",4); dprintf("\t\t\tStatus=%x\n",Status); NtClose(hKey); dprintf("NtOpenKey \\Registry\\Machine\\Software\\test2reactos\\test2\\TestVolatile : "); - RtlInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\Software\\test2reactos\\test2\\TestVolatile"); + RtlRosInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\Software\\test2reactos\\test2\\TestVolatile"); InitializeObjectAttributes(&ObjectAttributes, &KeyName, OBJ_CASE_INSENSITIVE, @@ -250,7 +251,7 @@ void test2(void) dprintf("delete \\Registry\\Machine\\software\\test2reactos ?"); ReadConsoleA(InputHandle, Buffer, 3, &Result, NULL) ; if (Buffer[0] != 'y' && Buffer[0] != 'Y') return; - RtlInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\Software\\test2reactos\\test2\\TestVolatile"); + RtlRosInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\Software\\test2reactos\\test2\\TestVolatile"); InitializeObjectAttributes(&ObjectAttributes, &KeyName, OBJ_CASE_INSENSITIVE, @@ -263,7 +264,7 @@ void test2(void) Status=NtDeleteKey(hKey); dprintf("\t\t\t\tStatus =%x\n",Status); NtClose(hKey); - RtlInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\Software\\test2reactos\\test2"); + RtlRosInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\Software\\test2reactos\\test2"); InitializeObjectAttributes(&ObjectAttributes, &KeyName, OBJ_CASE_INSENSITIVE, @@ -276,7 +277,7 @@ void test2(void) Status=NtDeleteKey(hKey); dprintf("\t\t\t\tStatus =%x\n",Status); NtClose(hKey); - RtlInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\Software\\test2reactos"); + RtlRosInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\Software\\test2reactos"); InitializeObjectAttributes(&ObjectAttributes, &KeyName, OBJ_CASE_INSENSITIVE, @@ -303,7 +304,7 @@ void test3(void) DWORD Result; dprintf("NtCreateKey non volatile: \n"); dprintf(" \\Registry\\Machine\\Software\\test3reactos: "); - RtlInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\Software\\test3reactos"); + RtlRosInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\Software\\test3reactos"); InitializeObjectAttributes(&ObjectAttributes, &KeyName, OBJ_CASE_INSENSITIVE , NULL, NULL); Status = NtCreateKey ( &hKey, KEY_ALL_ACCESS , &ObjectAttributes @@ -316,7 +317,7 @@ void test3(void) dprintf("\t\tStatus=%x\n",Status); NtClose(hKey); dprintf(" ...\\test3 :"); - RtlInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\Software\\test3reactos\\test3"); + RtlRosInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\Software\\test3reactos\\test3"); InitializeObjectAttributes(&ObjectAttributes, &KeyName, OBJ_CASE_INSENSITIVE , NULL, NULL); Status = NtCreateKey ( &hKey, KEY_ALL_ACCESS , &ObjectAttributes @@ -327,24 +328,24 @@ void test3(void) dprintf("\t\tStatus=%x\n",Status); NtClose(hKey); dprintf(" ...\\testNonVolatile :"); - RtlInitUnicodeStringFromLiteral(&KeyName, L"TestNonVolatile"); + RtlRosInitUnicodeStringFromLiteral(&KeyName, L"TestNonVolatile"); InitializeObjectAttributes(&ObjectAttributes, &KeyName, OBJ_CASE_INSENSITIVE , hKey1, NULL); Status = NtCreateKey ( &hKey, KEY_ALL_ACCESS , &ObjectAttributes ,0,NULL,REG_OPTION_NON_VOLATILE,NULL); dprintf("\t\t\t\tStatus=%x\n",Status); NtClose(hKey1); - RtlInitUnicodeStringFromLiteral(&ValueName, L"TestREG_SZ"); + RtlRosInitUnicodeStringFromLiteral(&ValueName, L"TestREG_SZ"); dprintf("NtSetValueKey reg_sz: "); Status=NtSetValueKey(hKey,&ValueName,0,REG_SZ,(PVOID)L"Test Reg_sz",24); dprintf("\t\t\t\tStatus=%x\n",Status); - RtlInitUnicodeStringFromLiteral(&ValueName, L"TestDWORD"); + RtlRosInitUnicodeStringFromLiteral(&ValueName, L"TestDWORD"); dprintf("NtSetValueKey reg_dword: "); Status=NtSetValueKey(hKey,&ValueName,0,REG_DWORD,(PVOID)"reac",4); dprintf("\t\t\tStatus=%x\n",Status); NtClose(hKey); dprintf("NtOpenKey \\Registry\\Machine\\Software\\test3reactos\\test3\\testNonVolatile : "); - RtlInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\Software\\test3reactos\\test3\\testNonVolatile"); + RtlRosInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\Software\\test3reactos\\test3\\testNonVolatile"); InitializeObjectAttributes(&ObjectAttributes, &KeyName, OBJ_CASE_INSENSITIVE, @@ -380,7 +381,7 @@ void test3(void) dprintf("delete \\Registry\\Machine\\software\\test3reactos ?"); ReadConsoleA(InputHandle, Buffer, 3, &Result, NULL) ; if (Buffer[0] != 'y' && Buffer[0] != 'Y') return; - RtlInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\Software\\test3reactos\\test3\\testNonvolatile"); + RtlRosInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\Software\\test3reactos\\test3\\testNonvolatile"); InitializeObjectAttributes(&ObjectAttributes, &KeyName, OBJ_CASE_INSENSITIVE, @@ -392,7 +393,7 @@ void test3(void) dprintf("NtDeleteKey : "); Status=NtDeleteKey(hKey); dprintf("\t\t\t\tStatus =%x\n",Status); - RtlInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\Software\\test3reactos\\test3"); + RtlRosInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\Software\\test3reactos\\test3"); InitializeObjectAttributes(&ObjectAttributes, &KeyName, OBJ_CASE_INSENSITIVE, @@ -405,7 +406,7 @@ void test3(void) Status=NtDeleteKey(hKey); dprintf("\t\t\t\tStatus =%x\n",Status); NtClose(hKey); - RtlInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\Software\\test3reactos"); + RtlRosInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\Software\\test3reactos"); InitializeObjectAttributes(&ObjectAttributes, &KeyName, OBJ_CASE_INSENSITIVE, @@ -591,7 +592,7 @@ void test5(void) dprintf("NtOpenKey : \n"); dprintf(" \\Registry\\Machine\\Software\\reactos : "); - RtlInitUnicodeStringFromLiteral(&KeyName,L"\\Registry\\Machine\\Software\\reactos"); + RtlRosInitUnicodeStringFromLiteral(&KeyName,L"\\Registry\\Machine\\Software\\reactos"); InitializeObjectAttributes(&ObjectAttributes, &KeyName, OBJ_CASE_INSENSITIVE , NULL, NULL); Status=NtOpenKey( &hKey, KEY_ALL_ACCESS, &ObjectAttributes); @@ -616,7 +617,7 @@ void test6(void) dprintf("Create target key\n"); dprintf(" Key: \\Registry\\Machine\\SOFTWARE\\Reactos\n"); - RtlInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\SOFTWARE\\Reactos"); + RtlRosInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\SOFTWARE\\Reactos"); InitializeObjectAttributes(&ObjectAttributes, &KeyName, OBJ_CASE_INSENSITIVE , NULL, NULL); Status = NtCreateKey(&hKey, KEY_ALL_ACCESS , &ObjectAttributes @@ -627,7 +628,7 @@ void test6(void) dprintf("Create target value\n"); dprintf(" Value: TestValue = 'Test String'\n"); - RtlInitUnicodeStringFromLiteral(&ValueName, L"TestValue"); + RtlRosInitUnicodeStringFromLiteral(&ValueName, L"TestValue"); Status=NtSetValueKey(hKey,&ValueName,0,REG_SZ,(PVOID)L"TestString",22); dprintf(" NtSetValueKey() called (Status %lx)\n",Status); if (!NT_SUCCESS(Status)) @@ -639,7 +640,7 @@ void test6(void) dprintf("Create link key\n"); dprintf(" Key: \\Registry\\Machine\\SOFTWARE\\Test\n"); - RtlInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\SOFTWARE\\Test"); + RtlRosInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\SOFTWARE\\Test"); InitializeObjectAttributes(&ObjectAttributes, &KeyName, OBJ_CASE_INSENSITIVE | OBJ_OPENLINK, @@ -658,7 +659,7 @@ void test6(void) dprintf("Create link value\n"); dprintf(" Value: SymbolicLinkValue = '\\Registry\\Machine\\SOFTWARE\\Reactos'\n"); - RtlInitUnicodeStringFromLiteral(&ValueName, L"SymbolicLinkValue"); + RtlRosInitUnicodeStringFromLiteral(&ValueName, L"SymbolicLinkValue"); Status=NtSetValueKey(hKey,&ValueName,0,REG_LINK,(PVOID)L"\\Registry\\Machine\\SOFTWARE\\Reactos",68); dprintf(" NtSetValueKey() called (Status %lx)\n",Status); if (!NT_SUCCESS(Status)) @@ -673,7 +674,7 @@ void test6(void) dprintf("Open link key\n"); dprintf(" Key: \\Registry\\Machine\\SOFTWARE\\Test\n"); - RtlInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\SOFTWARE\\Test"); + RtlRosInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\SOFTWARE\\Test"); InitializeObjectAttributes(&ObjectAttributes, &KeyName, OBJ_CASE_INSENSITIVE | OBJ_OPENIF , NULL, NULL); Status = NtCreateKey(&hKey, KEY_ALL_ACCESS , &ObjectAttributes @@ -684,7 +685,7 @@ void test6(void) dprintf("Query value\n"); dprintf(" Value: TestValue\n"); - RtlInitUnicodeStringFromLiteral(&ValueName, L"TestValue"); + RtlRosInitUnicodeStringFromLiteral(&ValueName, L"TestValue"); Status=NtQueryValueKey(hKey, &ValueName, KeyValueFullInformation, @@ -723,7 +724,7 @@ void test7(void) dprintf("Open link key\n"); dprintf(" Key: \\Registry\\Machine\\SOFTWARE\\Test\n"); - RtlInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\SOFTWARE\\Test"); + RtlRosInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\SOFTWARE\\Test"); InitializeObjectAttributes(&ObjectAttributes, &KeyName, OBJ_CASE_INSENSITIVE | OBJ_OPENIF | OBJ_OPENLINK, @@ -744,7 +745,7 @@ void test7(void) } dprintf("Delete link value\n"); - RtlInitUnicodeStringFromLiteral(&ValueName, L"SymbolicLinkValue"); + RtlRosInitUnicodeStringFromLiteral(&ValueName, L"SymbolicLinkValue"); Status = NtDeleteValueKey(hKey, &ValueName); dprintf(" NtDeleteValueKey() called (Status %lx)\n",Status); @@ -795,7 +796,7 @@ void test8(void) // dprintf("\t\t\t\tStatus =%x\n",Status); - RtlInitUnicodeStringFromLiteral(&KeyName,L"test5"); + RtlRosInitUnicodeStringFromLiteral(&KeyName,L"test5"); InitializeObjectAttributes(&ObjectAttributes, &KeyName, OBJ_CASE_INSENSITIVE , NULL, NULL); Status = NtLoadKey(HKEY_LOCAL_MACHINE,&ObjectAttributes); @@ -805,7 +806,7 @@ void test8(void) dprintf("\t\t\t\tdwError =%x\n",dwError); dprintf("NtOpenKey \\Registry\\Machine : "); - RtlInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine"); + RtlRosInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine"); InitializeObjectAttributes(&ObjectAttributes, &KeyName, OBJ_CASE_INSENSITIVE, @@ -813,7 +814,7 @@ void test8(void) NULL); Status=NtOpenKey( &hKey, MAXIMUM_ALLOWED, &ObjectAttributes); dprintf("\t\t\tStatus =%x\n",Status); - RtlInitUnicodeStringFromLiteral(&KeyName,L"test5"); + RtlRosInitUnicodeStringFromLiteral(&KeyName,L"test5"); InitializeObjectAttributes(&ObjectAttributes, &KeyName, OBJ_CASE_INSENSITIVE , NULL, NULL); Status = NtLoadKey(hKey,&ObjectAttributes); @@ -825,7 +826,7 @@ void test9(void) HKEY hKey = NULL, hKey1; OBJECT_ATTRIBUTES ObjectAttributes; NTSTATUS Status; - UNICODE_STRING KeyName = UNICODE_STRING_INITIALIZER(L"\\Registry"); + UNICODE_STRING KeyName = ROS_STRING_INITIALIZER(L"\\Registry"); ULONG Index,Length,i; KEY_BASIC_INFORMATION KeyInformation[5]; KEY_VALUE_FULL_INFORMATION KeyValueInformation[5]; @@ -866,7 +867,7 @@ void test9(void) NtClose(hKey); // RobD - hKey unused so-far, should this have been hKey1 ??? dprintf("NtOpenKey \\Registry\\Machine : "); - RtlInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine"); + RtlRosInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine"); InitializeObjectAttributes(&ObjectAttributes, &KeyName, OBJ_CASE_INSENSITIVE, @@ -878,20 +879,20 @@ void test9(void) //Status of c0000001 opening \Registry\Machine\System\CurrentControlSet\Services\Tcpip\Linkage // dprintf("NtOpenKey System\\CurrentControlSet\\Services\\Tcpip : "); -// RtlInitUnicodeStringFromLiteral(&KeyName, L"System\\CurrentControlSet\\Services\\Tcpip"); +// RtlRosInitUnicodeStringFromLiteral(&KeyName, L"System\\CurrentControlSet\\Services\\Tcpip"); #if 1 dprintf("NtOpenKey System\\ControlSet001\\Services\\Tcpip\\Parameters : "); - RtlInitUnicodeStringFromLiteral(&KeyName, L"System\\ControlSet001\\Services\\Tcpip\\Parameters"); + RtlRosInitUnicodeStringFromLiteral(&KeyName, L"System\\ControlSet001\\Services\\Tcpip\\Parameters"); #else dprintf("NtOpenKey System\\CurrentControlSet\\Services\\Tcpip : "); - RtlInitUnicodeStringFromLiteral(&KeyName, L"System\\CurrentControlSet\\Services\\Tcpip"); + RtlRosInitUnicodeStringFromLiteral(&KeyName, L"System\\CurrentControlSet\\Services\\Tcpip"); #endif InitializeObjectAttributes(&ObjectAttributes, &KeyName, OBJ_CASE_INSENSITIVE, hKey1 , NULL); Status = NtOpenKey(&hKey, KEY_READ , &ObjectAttributes); dprintf("\t\t\tStatus =%x\n",Status); if (Status == 0) { dprintf("NtQueryValueKey : "); - RtlInitUnicodeStringFromLiteral(&KeyName, L"NameServer"); + RtlRosInitUnicodeStringFromLiteral(&KeyName, L"NameServer"); Status = NtQueryValueKey(hKey, &KeyName, KeyValueFullInformation, &KeyValueInformation[0], sizeof(KeyValueInformation), &Length); dprintf("\t\t\t\tStatus =%x\n",Status); if (Status == STATUS_SUCCESS) { diff --git a/reactos/apps/utils/pice/module/patch.c b/reactos/apps/utils/pice/module/patch.c index 5d51f337ad0..dfd4924a668 100644 --- a/reactos/apps/utils/pice/module/patch.c +++ b/reactos/apps/utils/pice/module/patch.c @@ -41,6 +41,7 @@ Copyright notice: #include #include +#include //////////////////////////////////////////////////// // GLOBALS @@ -193,7 +194,7 @@ BOOLEAN PatchKeyboardDriver(void) { PINTERNAL_I8042_HOOK_KEYBOARD phkData; //When we have i8042 driver this should be changed!!!!!!! - UNICODE_STRING DevName = UNICODE_STRING_INITIALIZER(L"\\Device\\Keyboard"); + UNICODE_STRING DevName = ROS_STRING_INITIALIZER(L"\\Device\\Keyboard"); PDEVICE_OBJECT kbdDevice = NULL; PFILE_OBJECT FO = NULL; NTSTATUS status; diff --git a/reactos/apps/utils/pice/module/privateice.c b/reactos/apps/utils/pice/module/privateice.c index 2ea94f0a7b9..b283f322dbb 100644 --- a/reactos/apps/utils/pice/module/privateice.c +++ b/reactos/apps/utils/pice/module/privateice.c @@ -47,6 +47,7 @@ Copyright notice: #include #include +#include #include "precomp.h" #include "serial.h" @@ -183,7 +184,7 @@ NTSTATUS STDCALL DriverEntry(PDRIVER_OBJECT DriverObject, //ei unimplemented DriverObject->MajorFunction[IRP_MJ_CLOSE] = pice_close; DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = pice_ioctl; - RtlInitUnicodeStringFromLiteral(&DeviceName, L"\\Device\\Pice"); + RtlRosInitUnicodeStringFromLiteral(&DeviceName, L"\\Device\\Pice"); IoCreateDevice(DriverObject, 0, &DeviceName, @@ -193,7 +194,7 @@ NTSTATUS STDCALL DriverEntry(PDRIVER_OBJECT DriverObject, &DeviceObject); DeviceObject->Flags = DeviceObject->Flags | DO_BUFFERED_IO; - RtlInitUnicodeStringFromLiteral(&SymlinkName, L"\\??\\Pice"); + RtlRosInitUnicodeStringFromLiteral(&SymlinkName, L"\\??\\Pice"); IoCreateSymbolicLink(&SymlinkName, &DeviceName); return(STATUS_SUCCESS); diff --git a/reactos/drivers/dd/beep/beep.c b/reactos/drivers/dd/beep/beep.c index 6e748f6a82a..a91b2552cec 100644 --- a/reactos/drivers/dd/beep/beep.c +++ b/reactos/drivers/dd/beep/beep.c @@ -1,4 +1,4 @@ -/* $Id: beep.c,v 1.16 2003/09/20 20:12:43 weiden Exp $ +/* $Id: beep.c,v 1.17 2003/11/17 02:12:48 hyperion Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -14,6 +14,7 @@ #include #include +#include #define NDEBUG #include @@ -240,8 +241,8 @@ DriverEntry(PDRIVER_OBJECT DriverObject, { PDEVICE_EXTENSION DeviceExtension; PDEVICE_OBJECT DeviceObject; - UNICODE_STRING DeviceName = UNICODE_STRING_INITIALIZER(L"\\Device\\Beep"); - UNICODE_STRING SymlinkName = UNICODE_STRING_INITIALIZER(L"\\??\\Beep"); + UNICODE_STRING DeviceName = ROS_STRING_INITIALIZER(L"\\Device\\Beep"); + UNICODE_STRING SymlinkName = ROS_STRING_INITIALIZER(L"\\??\\Beep"); NTSTATUS Status; DPRINT("Beep Device Driver 0.0.3\n"); diff --git a/reactos/drivers/dd/blue/blue.c b/reactos/drivers/dd/blue/blue.c index c0da5a6bfd3..b49473771ec 100644 --- a/reactos/drivers/dd/blue/blue.c +++ b/reactos/drivers/dd/blue/blue.c @@ -1,4 +1,4 @@ -/* $Id: blue.c,v 1.40 2003/07/12 10:24:45 chorns Exp $ +/* $Id: blue.c,v 1.41 2003/11/17 02:12:48 hyperion Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -13,6 +13,7 @@ #include #include +#include #include #include @@ -621,8 +622,8 @@ NTSTATUS STDCALL DriverEntry (PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath) { PDEVICE_OBJECT DeviceObject; - UNICODE_STRING DeviceName = UNICODE_STRING_INITIALIZER(L"\\Device\\BlueScreen"); - UNICODE_STRING SymlinkName = UNICODE_STRING_INITIALIZER(L"\\??\\BlueScreen"); + UNICODE_STRING DeviceName = ROS_STRING_INITIALIZER(L"\\Device\\BlueScreen"); + UNICODE_STRING SymlinkName = ROS_STRING_INITIALIZER(L"\\??\\BlueScreen"); DPRINT ("Screen Driver 0.0.6\n"); diff --git a/reactos/drivers/dd/bootvid/bootvid.c b/reactos/drivers/dd/bootvid/bootvid.c index 8e4afc0005b..fad19993ebf 100644 --- a/reactos/drivers/dd/bootvid/bootvid.c +++ b/reactos/drivers/dd/bootvid/bootvid.c @@ -1,4 +1,4 @@ -/* $Id: bootvid.c,v 1.4 2003/11/14 17:13:24 weiden Exp $ +/* $Id: bootvid.c,v 1.5 2003/11/17 02:12:48 hyperion Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -14,6 +14,7 @@ #include #include #include +#include #include "../../../ntoskrnl/include/internal/v86m.h" @@ -167,7 +168,7 @@ InbvInitializeVideoAddressSpace(VOID) /* * Open the physical memory section */ - RtlInitUnicodeStringFromLiteral(&PhysMemName, L"\\Device\\PhysicalMemory"); + RtlRosInitUnicodeStringFromLiteral(&PhysMemName, L"\\Device\\PhysicalMemory"); InitializeObjectAttributes(&ObjectAttributes, &PhysMemName, 0, @@ -800,7 +801,7 @@ DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath) DriverObject->DriverUnload = NULL; /* create device */ - RtlInitUnicodeStringFromLiteral(&DeviceName, L"\\Device\\BootVid"); + RtlRosInitUnicodeStringFromLiteral(&DeviceName, L"\\Device\\BootVid"); Status = IoCreateDevice(DriverObject, 0, &DeviceName, FILE_DEVICE_BOOTVID, 0, FALSE, &BootVidDevice); diff --git a/reactos/drivers/dd/debugout/debugout.c b/reactos/drivers/dd/debugout/debugout.c index 313f9437981..d766d60749a 100644 --- a/reactos/drivers/dd/debugout/debugout.c +++ b/reactos/drivers/dd/debugout/debugout.c @@ -1,4 +1,4 @@ -/* $Id: debugout.c,v 1.1 2003/05/22 15:11:29 gvg Exp $ +/* $Id: debugout.c,v 1.2 2003/11/17 02:12:49 hyperion Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -23,6 +23,7 @@ /* INCLUDES */ #include +#include /* FUNCTIONS */ NTSTATUS STDCALL_FUNC @@ -105,7 +106,7 @@ DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath) DriverObject->DriverUnload = (PDRIVER_UNLOAD) DebugOutUnload; /* create device */ - RtlInitUnicodeStringFromLiteral(&DeviceName, L"\\Device\\DebugOut"); + RtlRosInitUnicodeStringFromLiteral(&DeviceName, L"\\Device\\DebugOut"); Status = IoCreateDevice(DriverObject, 0, &DeviceName, FILE_DEVICE_NULL, 0, FALSE, &DebugOutDevice); @@ -114,7 +115,7 @@ DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath) return Status; } - RtlInitUnicodeStringFromLiteral(&DosName, L"\\DosDevices\\DebugOut"); + RtlRosInitUnicodeStringFromLiteral(&DosName, L"\\DosDevices\\DebugOut"); Status = IoCreateSymbolicLink(&DosName, &DeviceName); if (! NT_SUCCESS(Status)) { diff --git a/reactos/drivers/dd/floppy/floppy.c b/reactos/drivers/dd/floppy/floppy.c index 9eba0daca8a..72b227ff85e 100644 --- a/reactos/drivers/dd/floppy/floppy.c +++ b/reactos/drivers/dd/floppy/floppy.c @@ -19,7 +19,7 @@ #include "floppy.h" #define NDEBUG #include - +#include FLOPPY_CONTROLLER_PARAMETERS ControllerParameters[FLOPPY_MAX_CONTROLLERS] = { @@ -131,7 +131,7 @@ FloppyCreateController(PDRIVER_OBJECT DriverObject, #endif /* FIXME: Let's assume one drive and one controller for the moment */ - RtlInitUnicodeStringFromLiteral(&DeviceName, L"\\Device\\Floppy0"); + RtlRosInitUnicodeStringFromLiteral(&DeviceName, L"\\Device\\Floppy0"); Status = IoCreateDevice(DriverObject, sizeof(FLOPPY_DEVICE_EXTENSION), &DeviceName, diff --git a/reactos/drivers/dd/null/null.c b/reactos/drivers/dd/null/null.c index 497fb988a97..61400516f31 100644 --- a/reactos/drivers/dd/null/null.c +++ b/reactos/drivers/dd/null/null.c @@ -1,4 +1,4 @@ -/* $Id: null.c,v 1.11 2003/09/20 20:12:43 weiden Exp $ +/* $Id: null.c,v 1.12 2003/11/17 02:12:49 hyperion Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -12,6 +12,7 @@ /* INCLUDES */ #include +#include #include "null.h" /* OBJECTS */ @@ -113,7 +114,7 @@ DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath) DriverObject->DriverUnload = (PDRIVER_UNLOAD)NullUnload; /* create null device */ - RtlInitUnicodeStringFromLiteral(&wstrDeviceName, L"\\Device\\Null"); + RtlRosInitUnicodeStringFromLiteral(&wstrDeviceName, L"\\Device\\Null"); nErrCode = IoCreateDevice ( @@ -135,7 +136,7 @@ DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath) pdoNullDevice->DeviceExtension = (PVOID)&nxNull; /* create zero device */ - RtlInitUnicodeStringFromLiteral(&wstrDeviceName, L"\\Device\\Zero"); + RtlRosInitUnicodeStringFromLiteral(&wstrDeviceName, L"\\Device\\Zero"); nErrCode = IoCreateDevice ( diff --git a/reactos/drivers/dd/parallel/parallel.c b/reactos/drivers/dd/parallel/parallel.c index cbc80330cd4..23925a15f41 100644 --- a/reactos/drivers/dd/parallel/parallel.c +++ b/reactos/drivers/dd/parallel/parallel.c @@ -1,4 +1,4 @@ -/* $Id: parallel.c,v 1.9 2003/09/20 20:12:43 weiden Exp $ +/* $Id: parallel.c,v 1.10 2003/11/17 02:12:49 hyperion Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -13,6 +13,7 @@ /* FUNCTIONS **************************************************************/ #include +#include #include "parallel.h" @@ -127,7 +128,7 @@ DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath) */ { PDEVICE_OBJECT DeviceObject; - UNICODE_STRING DeviceName = UNICODE_STRING_INITIALIZER(L"\\Device\\Parallel"); + UNICODE_STRING DeviceName = ROS_STRING_INITIALIZER(L"\\Device\\Parallel"); NTSTATUS Status; DPRINT("Parallel Port Driver 0.0.1\n"); diff --git a/reactos/drivers/dd/ramdrv/ramdrv.c b/reactos/drivers/dd/ramdrv/ramdrv.c index bcfa23d160a..37be0bb5dc9 100644 --- a/reactos/drivers/dd/ramdrv/ramdrv.c +++ b/reactos/drivers/dd/ramdrv/ramdrv.c @@ -1,6 +1,7 @@ #include #include "ramdrv.h" #include +#include #include "../../lib/bzip2/bzlib.h" NTSTATUS STDCALL RamdrvDispatchDeviceControl(PDEVICE_OBJECT DeviceObject, @@ -83,7 +84,7 @@ NTSTATUS STDCALL RamdrvDispatchOpenClose(PDEVICE_OBJECT DeviceObject, NTSTATUS STDCALL DriverEntry(IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegistryPath) { - UNICODE_STRING DeviceName = UNICODE_STRING_INITIALIZER(L"\\Device\\Ramdisk"); + UNICODE_STRING DeviceName = ROS_STRING_INITIALIZER(L"\\Device\\Ramdisk"); NTSTATUS Status; PDEVICE_OBJECT DeviceObject; PRAMDRV_DEVICE_EXTENSION devext; @@ -127,10 +128,10 @@ NTSTATUS STDCALL DriverEntry(IN PDRIVER_OBJECT DriverObject, Status = STATUS_INSUFFICIENT_RESOURCES; goto cleandevice; } - RtlInitUnicodeStringFromLiteral( &LinkName, L"\\??\\Z:" ); + RtlRosInitUnicodeStringFromLiteral( &LinkName, L"\\??\\Z:" ); IoCreateSymbolicLink( &LinkName, &DeviceName ); - RtlInitUnicodeStringFromLiteral( &LinkName, L"\\Device\\Floppy0\\ramdisk.bz2" ); + RtlRosInitUnicodeStringFromLiteral( &LinkName, L"\\Device\\Floppy0\\ramdisk.bz2" ); InitializeObjectAttributes( &objattr, &LinkName, 0, diff --git a/reactos/drivers/dd/vga/miniport/initvga.c b/reactos/drivers/dd/vga/miniport/initvga.c index 2939d733291..7de39809f5b 100644 --- a/reactos/drivers/dd/vga/miniport/initvga.c +++ b/reactos/drivers/dd/vga/miniport/initvga.c @@ -1,4 +1,5 @@ #include +#include #include "vgavideo.h" #define NDEBUG @@ -99,7 +100,7 @@ VOID VGAResetDevice(OUT PSTATUS_BLOCK StatusBlock) { HANDLE Event; OBJECT_ATTRIBUTES Attr; - UNICODE_STRING Name = UNICODE_STRING_INITIALIZER(L"\\TextConsoleRefreshEvent"); + UNICODE_STRING Name = ROS_STRING_INITIALIZER(L"\\TextConsoleRefreshEvent"); NTSTATUS Status; VIDEO_X86_BIOS_ARGUMENTS vxba; VP_STATUS vps; diff --git a/reactos/drivers/fs/cdfs/cdfs.c b/reactos/drivers/fs/cdfs/cdfs.c index a67d3a5b53a..346047c01e9 100644 --- a/reactos/drivers/fs/cdfs/cdfs.c +++ b/reactos/drivers/fs/cdfs/cdfs.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: cdfs.c,v 1.10 2003/11/10 11:32:08 ekohl Exp $ +/* $Id: cdfs.c,v 1.11 2003/11/17 02:12:49 hyperion Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -29,6 +29,7 @@ /* INCLUDES *****************************************************************/ #include +#include #define NDEBUG #include @@ -56,7 +57,7 @@ DriverEntry(PDRIVER_OBJECT DriverObject, { PDEVICE_OBJECT DeviceObject; NTSTATUS Status; - UNICODE_STRING DeviceName = UNICODE_STRING_INITIALIZER(L"\\Cdfs"); + UNICODE_STRING DeviceName = ROS_STRING_INITIALIZER(L"\\Cdfs"); DPRINT("CDFS 0.0.3\n"); diff --git a/reactos/drivers/fs/ext2/super.c b/reactos/drivers/fs/ext2/super.c index 0ddad319ea6..bb1c2f0c00b 100644 --- a/reactos/drivers/fs/ext2/super.c +++ b/reactos/drivers/fs/ext2/super.c @@ -10,6 +10,7 @@ /* INCLUDES *****************************************************************/ #include +#include //#define NDEBUG #include @@ -154,7 +155,7 @@ DriverEntry(PDRIVER_OBJECT _DriverObject, { PDEVICE_OBJECT DeviceObject; NTSTATUS ret; - UNICODE_STRING DeviceName = UNICODE_STRING_INITIALIZER(L"\\Device\\Ext2Fsd"); + UNICODE_STRING DeviceName = ROS_STRING_INITIALIZER(L"\\Device\\Ext2Fsd"); DbgPrint("Ext2 FSD 0.0.1\n"); diff --git a/reactos/drivers/fs/fs_rec/cdfs.c b/reactos/drivers/fs/fs_rec/cdfs.c index e9412c6a45b..17fb72f86d2 100644 --- a/reactos/drivers/fs/fs_rec/cdfs.c +++ b/reactos/drivers/fs/fs_rec/cdfs.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: cdfs.c,v 1.8 2003/01/16 11:58:15 ekohl Exp $ +/* $Id: cdfs.c,v 1.9 2003/11/17 02:12:49 hyperion Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -28,6 +28,7 @@ /* INCLUDES *****************************************************************/ #include +#include #define NDEBUG #include @@ -120,7 +121,7 @@ FsRecCdfsFsControl(IN PDEVICE_OBJECT DeviceObject, case IRP_MN_LOAD_FILE_SYSTEM: DPRINT("Cdfs: IRP_MN_LOAD_FILE_SYSTEM\n"); - RtlInitUnicodeStringFromLiteral(&RegistryPath, + RtlRosInitUnicodeStringFromLiteral(&RegistryPath, L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\Cdfs"); Status = ZwLoadDriver(&RegistryPath); if (!NT_SUCCESS(Status)) diff --git a/reactos/drivers/fs/fs_rec/fat.c b/reactos/drivers/fs/fs_rec/fat.c index 9cafad6b4e2..419e380e7a4 100644 --- a/reactos/drivers/fs/fs_rec/fat.c +++ b/reactos/drivers/fs/fs_rec/fat.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: fat.c,v 1.7 2003/01/16 11:58:15 ekohl Exp $ +/* $Id: fat.c,v 1.8 2003/11/17 02:12:49 hyperion Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -28,6 +28,7 @@ /* INCLUDES *****************************************************************/ #include +#include #define NDEBUG #include @@ -118,7 +119,7 @@ FsRecVfatFsControl(IN PDEVICE_OBJECT DeviceObject, case IRP_MN_LOAD_FILE_SYSTEM: DPRINT("FAT: IRP_MN_LOAD_FILE_SYSTEM\n"); - RtlInitUnicodeStringFromLiteral(&RegistryPath, + RtlRosInitUnicodeStringFromLiteral(&RegistryPath, L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\Vfatfs"); Status = ZwLoadDriver(&RegistryPath); if (!NT_SUCCESS(Status)) diff --git a/reactos/drivers/fs/fs_rec/udfs.c b/reactos/drivers/fs/fs_rec/udfs.c index faaf354272c..b1bd08092d1 100644 --- a/reactos/drivers/fs/fs_rec/udfs.c +++ b/reactos/drivers/fs/fs_rec/udfs.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: udfs.c,v 1.3 2003/11/13 15:25:28 ekohl Exp $ +/* $Id: udfs.c,v 1.4 2003/11/17 02:12:49 hyperion Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -28,6 +28,7 @@ /* INCLUDES *****************************************************************/ #include +#include #define NDEBUG #include @@ -271,7 +272,7 @@ FsRecUdfsFsControl(IN PDEVICE_OBJECT DeviceObject, case IRP_MN_LOAD_FILE_SYSTEM: DPRINT("Udfs: IRP_MN_LOAD_FILE_SYSTEM\n"); - RtlInitUnicodeStringFromLiteral(&RegistryPath, + RtlRosInitUnicodeStringFromLiteral(&RegistryPath, L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\Udfs"); Status = ZwLoadDriver(&RegistryPath); if (!NT_SUCCESS(Status)) diff --git a/reactos/drivers/fs/np/rw.c b/reactos/drivers/fs/np/rw.c index fd3f6e83f96..29612566832 100644 --- a/reactos/drivers/fs/np/rw.c +++ b/reactos/drivers/fs/np/rw.c @@ -1,4 +1,4 @@ -/* $Id: rw.c,v 1.9 2003/06/21 19:55:55 hbirr Exp $ +/* $Id: rw.c,v 1.10 2003/11/17 02:12:49 hyperion Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -10,6 +10,7 @@ /* INCLUDES ******************************************************************/ #include +#include #include "npfs.h" #define NDEBUG @@ -113,7 +114,7 @@ NpfsRead(PDEVICE_OBJECT DeviceObject, PIRP Irp) /* Byte stream mode */ while (Length > 0 && ReadFcb->ReadDataAvailable > 0) { - CopyLength = RtlMin(ReadFcb->ReadDataAvailable, Length); + CopyLength = RtlRosMin(ReadFcb->ReadDataAvailable, Length); if (ReadFcb->ReadPtr + CopyLength <= ReadFcb->Data + ReadFcb->MaxDataLength) { memcpy(Buffer, ReadFcb->ReadPtr, CopyLength); @@ -153,7 +154,7 @@ NpfsRead(PDEVICE_OBJECT DeviceObject, PIRP Irp) if (ReadFcb->ReadDataAvailable) { /* Truncate the message if the receive buffer is too small */ - CopyLength = RtlMin(ReadFcb->ReadDataAvailable, Length); + CopyLength = RtlRosMin(ReadFcb->ReadDataAvailable, Length); memcpy(Buffer, ReadFcb->Data, CopyLength); Information = CopyLength; @@ -265,7 +266,7 @@ NpfsWrite(PDEVICE_OBJECT DeviceObject, DPRINT("Byte stream mode\n"); while (Length > 0 && Fcb->WriteQuotaAvailable > 0) { - CopyLength = RtlMin(Length, Fcb->WriteQuotaAvailable); + CopyLength = RtlRosMin(Length, Fcb->WriteQuotaAvailable); if (Fcb->WritePtr + CopyLength <= Fcb->Data + Fcb->MaxDataLength) { memcpy(Fcb->WritePtr, Buffer, CopyLength); @@ -301,7 +302,7 @@ NpfsWrite(PDEVICE_OBJECT DeviceObject, { if (Length > 0) { - CopyLength = RtlMin(Length, Fcb->WriteQuotaAvailable); + CopyLength = RtlRosMin(Length, Fcb->WriteQuotaAvailable); memcpy(Buffer, Fcb->Data, CopyLength); Information = CopyLength; diff --git a/reactos/drivers/fs/ntfs/ntfs.c b/reactos/drivers/fs/ntfs/ntfs.c index 8610412b712..bfdc305457b 100644 --- a/reactos/drivers/fs/ntfs/ntfs.c +++ b/reactos/drivers/fs/ntfs/ntfs.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: ntfs.c,v 1.3 2003/07/17 13:31:39 chorns Exp $ +/* $Id: ntfs.c,v 1.4 2003/11/17 02:12:49 hyperion Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -28,6 +28,7 @@ /* INCLUDES *****************************************************************/ #include +#include //#define NDEBUG #include @@ -55,7 +56,7 @@ DriverEntry(PDRIVER_OBJECT DriverObject, { PDEVICE_OBJECT DeviceObject; NTSTATUS Status; - UNICODE_STRING DeviceName = UNICODE_STRING_INITIALIZER(L"\\Ntfs"); + UNICODE_STRING DeviceName = ROS_STRING_INITIALIZER(L"\\Ntfs"); DPRINT("NTFS 0.0.1\n"); diff --git a/reactos/drivers/fs/template/template.c b/reactos/drivers/fs/template/template.c index dbffa14154e..71dbb52e668 100644 --- a/reactos/drivers/fs/template/template.c +++ b/reactos/drivers/fs/template/template.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: template.c,v 1.4 2002/08/20 20:37:07 hyperion Exp $ +/* $Id: template.c,v 1.5 2003/11/17 02:12:49 hyperion Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -29,6 +29,7 @@ /* INCLUDES *****************************************************************/ #include +#include #define NDEBUG #include @@ -249,7 +250,7 @@ DriverEntry(PDRIVER_OBJECT _DriverObject, { PDEVICE_OBJECT DeviceObject; NTSTATUS Status; - UNICODE_STRING DeviceName = UNICODE_STRING_INITIALIZER(L"\\Device\\BareFsd"); + UNICODE_STRING DeviceName = ROS_STRING_INITIALIZER(L"\\Device\\BareFsd"); DbgPrint("Bare FSD Template 0.0.1\n"); diff --git a/reactos/drivers/fs/vfat/fcb.c b/reactos/drivers/fs/vfat/fcb.c index 6560f191d74..0b6a026393f 100644 --- a/reactos/drivers/fs/vfat/fcb.c +++ b/reactos/drivers/fs/vfat/fcb.c @@ -1,4 +1,4 @@ -/* $Id: fcb.c,v 1.35 2003/10/28 20:21:21 hbirr Exp $ +/* $Id: fcb.c,v 1.36 2003/11/17 02:12:49 hyperion Exp $ * * * FILE: drivers/fs/vfat/fcb.c @@ -16,6 +16,7 @@ #include #include #include +#include #define NDEBUG #include @@ -341,7 +342,7 @@ vfatMakeRootFCB(PDEVICE_EXTENSION pVCB) NTSTATUS Status = STATUS_SUCCESS; UNICODE_STRING NameU; - RtlInitUnicodeStringFromLiteral(&NameU, L"\\"); + RtlRosInitUnicodeStringFromLiteral(&NameU, L"\\"); FCB = vfatNewFCB(&NameU); memset(FCB->entry.Filename, ' ', 11); @@ -383,7 +384,7 @@ vfatOpenRootFCB(PDEVICE_EXTENSION pVCB) PVFATFCB FCB; UNICODE_STRING NameU; - RtlInitUnicodeStringFromLiteral(&NameU, L"\\"); + RtlRosInitUnicodeStringFromLiteral(&NameU, L"\\"); FCB = vfatGrabFCBFromTable (pVCB, &NameU); if (FCB == NULL) @@ -600,7 +601,7 @@ vfatGetFCBForFile (PDEVICE_EXTENSION pVCB, pFCB, pFileNameU); - RtlInitUnicodeStringFromLiteral(&RootNameU, L"\\"); + RtlRosInitUnicodeStringFromLiteral(&RootNameU, L"\\"); // Trivial case, open of the root directory on volume if (RtlEqualUnicodeString(pFileNameU, &RootNameU, FALSE)) diff --git a/reactos/drivers/fs/vfat/fsctl.c b/reactos/drivers/fs/vfat/fsctl.c index 2363080a54c..87fd4f30739 100644 --- a/reactos/drivers/fs/vfat/fsctl.c +++ b/reactos/drivers/fs/vfat/fsctl.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: fsctl.c,v 1.25 2003/11/12 15:26:44 ekohl Exp $ +/* $Id: fsctl.c,v 1.26 2003/11/17 02:12:49 hyperion Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -27,6 +27,7 @@ /* INCLUDES *****************************************************************/ #include +#include #include #include @@ -292,7 +293,7 @@ VfatMount (PVFAT_IRP_CONTEXT IrpContext) DPRINT("FsDeviceObject %lx\n", DeviceObject); DeviceExt->FATFileObject = IoCreateStreamFileObject(NULL, DeviceExt->StorageDevice); - RtlInitUnicodeStringFromLiteral(&NameU, L"\\$$Fat$$"); + RtlRosInitUnicodeStringFromLiteral(&NameU, L"\\$$Fat$$"); Fcb = vfatNewFCB(&NameU); if (Fcb == NULL) { @@ -339,7 +340,7 @@ VfatMount (PVFAT_IRP_CONTEXT IrpContext) ExInitializeResourceLite(&DeviceExt->FatResource); InitializeListHead(&DeviceExt->FcbListHead); - RtlInitUnicodeStringFromLiteral(&NameU, L"\\$$Volume$$"); + RtlRosInitUnicodeStringFromLiteral(&NameU, L"\\$$Volume$$"); VolumeFcb = vfatNewFCB(&NameU); if (VolumeFcb == NULL) diff --git a/reactos/drivers/fs/vfat/iface.c b/reactos/drivers/fs/vfat/iface.c index a1aefd653f2..f1a2b4c769f 100644 --- a/reactos/drivers/fs/vfat/iface.c +++ b/reactos/drivers/fs/vfat/iface.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: iface.c,v 1.72 2003/10/11 17:51:56 hbirr Exp $ +/* $Id: iface.c,v 1.73 2003/11/17 02:12:49 hyperion Exp $ * * PROJECT: ReactOS kernel * FILE: drivers/fs/vfat/iface.c @@ -28,6 +28,7 @@ /* INCLUDES *****************************************************************/ #include +#include #define NDEBUG #include @@ -52,7 +53,7 @@ DriverEntry(PDRIVER_OBJECT DriverObject, */ { PDEVICE_OBJECT DeviceObject; - UNICODE_STRING DeviceName = UNICODE_STRING_INITIALIZER(L"\\Fat"); + UNICODE_STRING DeviceName = ROS_STRING_INITIALIZER(L"\\Fat"); NTSTATUS Status; Status = IoCreateDevice(DriverObject, diff --git a/reactos/drivers/input/keyboard/keyboard.c b/reactos/drivers/input/keyboard/keyboard.c index 6ca456af51e..c9da120a250 100644 --- a/reactos/drivers/input/keyboard/keyboard.c +++ b/reactos/drivers/input/keyboard/keyboard.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include @@ -842,8 +843,8 @@ NTSTATUS STDCALL DriverEntry(PDRIVER_OBJECT DriverObject, */ { PDEVICE_OBJECT DeviceObject; - UNICODE_STRING DeviceName = UNICODE_STRING_INITIALIZER(L"\\Device\\Keyboard"); - UNICODE_STRING SymlinkName = UNICODE_STRING_INITIALIZER(L"\\??\\Keyboard"); + UNICODE_STRING DeviceName = ROS_STRING_INITIALIZER(L"\\Device\\Keyboard"); + UNICODE_STRING SymlinkName = ROS_STRING_INITIALIZER(L"\\??\\Keyboard"); DPRINT("Keyboard Driver 0.0.4\n"); diff --git a/reactos/drivers/input/mouclass/mouclass.c b/reactos/drivers/input/mouclass/mouclass.c index 5bc2f508ff3..59ea47ee711 100644 --- a/reactos/drivers/input/mouclass/mouclass.c +++ b/reactos/drivers/input/mouclass/mouclass.c @@ -13,6 +13,7 @@ #include #include +#include #include "mouclass.h" #define NDEBUG @@ -138,7 +139,7 @@ NTSTATUS ConnectMousePortDriver(PDEVICE_OBJECT ClassDeviceObject) PDEVICE_OBJECT PortDeviceObject = NULL; PFILE_OBJECT FileObject = NULL; NTSTATUS status; - UNICODE_STRING PortName = UNICODE_STRING_INITIALIZER(L"\\Device\\PointerClass0"); + UNICODE_STRING PortName = ROS_STRING_INITIALIZER(L"\\Device\\PointerClass0"); IO_STATUS_BLOCK ioStatus; KEVENT event; PIRP irp; @@ -326,8 +327,8 @@ NTSTATUS STDCALL DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath) { PDEVICE_OBJECT DeviceObject; - UNICODE_STRING DeviceName = UNICODE_STRING_INITIALIZER(L"\\Device\\MouseClass"); - UNICODE_STRING SymlinkName = UNICODE_STRING_INITIALIZER(L"\\??\\MouseClass"); NTSTATUS Status; + UNICODE_STRING DeviceName = ROS_STRING_INITIALIZER(L"\\Device\\MouseClass"); + UNICODE_STRING SymlinkName = ROS_STRING_INITIALIZER(L"\\??\\MouseClass"); NTSTATUS Status; DriverObject->MajorFunction[IRP_MJ_CREATE] = (PDRIVER_DISPATCH)MouseClassDispatch; diff --git a/reactos/drivers/net/afd/afd/afd.c b/reactos/drivers/net/afd/afd/afd.c index a82fea24e7c..46dc3d1f262 100644 --- a/reactos/drivers/net/afd/afd/afd.c +++ b/reactos/drivers/net/afd/afd/afd.c @@ -8,6 +8,7 @@ * CSH 01/09-2000 Created */ #include +#include #ifdef DBG @@ -146,7 +147,7 @@ DriverEntry( { PDEVICE_EXTENSION DeviceExt; PDEVICE_OBJECT DeviceObject; - UNICODE_STRING DeviceName = UNICODE_STRING_INITIALIZER(L"\\Device\\Afd"); + UNICODE_STRING DeviceName = ROS_STRING_INITIALIZER(L"\\Device\\Afd"); NTSTATUS Status; Status = IoCreateDevice(DriverObject, diff --git a/reactos/drivers/net/tcpip/tcpip/main.c b/reactos/drivers/net/tcpip/tcpip/main.c index 442f29ffd88..d403e692f67 100644 --- a/reactos/drivers/net/tcpip/tcpip/main.c +++ b/reactos/drivers/net/tcpip/tcpip/main.c @@ -15,6 +15,7 @@ #include #include #include +#include #ifdef DBG DWORD DebugTraceLevel = MIN_TRACE; @@ -713,7 +714,7 @@ DriverEntry( /* FIXME: Create symbolic links in Win32 namespace */ /* Create IP device object */ - RtlInitUnicodeStringFromLiteral(&strDeviceName, DD_IP_DEVICE_NAME); + RtlRosInitUnicodeStringFromLiteral(&strDeviceName, DD_IP_DEVICE_NAME); Status = IoCreateDevice(DriverObject, 0, &strDeviceName, FILE_DEVICE_NETWORK, 0, FALSE, &IPDeviceObject); if (!NT_SUCCESS(Status)) { @@ -722,7 +723,7 @@ DriverEntry( } /* Create RawIP device object */ - RtlInitUnicodeStringFromLiteral(&strDeviceName, DD_RAWIP_DEVICE_NAME); + RtlRosInitUnicodeStringFromLiteral(&strDeviceName, DD_RAWIP_DEVICE_NAME); Status = IoCreateDevice(DriverObject, 0, &strDeviceName, FILE_DEVICE_NETWORK, 0, FALSE, &RawIPDeviceObject); if (!NT_SUCCESS(Status)) { @@ -732,7 +733,7 @@ DriverEntry( } /* Create UDP device object */ - RtlInitUnicodeStringFromLiteral(&strDeviceName, DD_UDP_DEVICE_NAME); + RtlRosInitUnicodeStringFromLiteral(&strDeviceName, DD_UDP_DEVICE_NAME); Status = IoCreateDevice(DriverObject, 0, &strDeviceName, FILE_DEVICE_NETWORK, 0, FALSE, &UDPDeviceObject); if (!NT_SUCCESS(Status)) { @@ -742,7 +743,7 @@ DriverEntry( } /* Create TCP device object */ - RtlInitUnicodeStringFromLiteral(&strDeviceName, DD_TCP_DEVICE_NAME); + RtlRosInitUnicodeStringFromLiteral(&strDeviceName, DD_TCP_DEVICE_NAME); Status = IoCreateDevice(DriverObject, 0, &strDeviceName, FILE_DEVICE_NETWORK, 0, FALSE, &TCPDeviceObject); if (!NT_SUCCESS(Status)) { diff --git a/reactos/drivers/net/wshtcpip/wshtcpip.c b/reactos/drivers/net/wshtcpip/wshtcpip.c index 84d316d4c86..a8dc40b6daa 100644 --- a/reactos/drivers/net/wshtcpip/wshtcpip.c +++ b/reactos/drivers/net/wshtcpip/wshtcpip.c @@ -8,6 +8,7 @@ * CSH 01/09-2000 Created */ #include +#include #ifdef DBG @@ -292,18 +293,18 @@ WSHOpenSocket2( switch (*SocketType) { case SOCK_STREAM: - RtlInitUnicodeStringFromLiteral(&String, DD_TCP_DEVICE_NAME); + RtlRosInitUnicodeStringFromLiteral(&String, DD_TCP_DEVICE_NAME); break; case SOCK_DGRAM: - RtlInitUnicodeStringFromLiteral(&String, DD_UDP_DEVICE_NAME); + RtlRosInitUnicodeStringFromLiteral(&String, DD_UDP_DEVICE_NAME); break; case SOCK_RAW: if ((*Protocol < 0) || (*Protocol > 255)) return WSAEINVAL; - RtlInitUnicodeStringFromLiteral(&String, DD_RAW_IP_DEVICE_NAME); + RtlRosInitUnicodeStringFromLiteral(&String, DD_RAW_IP_DEVICE_NAME); break; default: diff --git a/reactos/drivers/storage/scsiport/scsiport.c b/reactos/drivers/storage/scsiport/scsiport.c index 4cb9b17eff9..e5104a0e08e 100644 --- a/reactos/drivers/storage/scsiport/scsiport.c +++ b/reactos/drivers/storage/scsiport/scsiport.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: scsiport.c,v 1.44 2003/11/13 14:20:03 ekohl Exp $ +/* $Id: scsiport.c,v 1.45 2003/11/17 02:12:50 hyperion Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -31,6 +31,7 @@ #include #include #include +#include #define NDEBUG #include @@ -2263,7 +2264,7 @@ SpiBuildDeviceMap (PSCSI_PORT_DEVICE_EXTENSION DeviceExtension, } /* Open or create the 'Scsi' subkey */ - RtlInitUnicodeStringFromLiteral(&KeyName, + RtlRosInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\Hardware\\DeviceMap\\Scsi"); InitializeObjectAttributes(&ObjectAttributes, &KeyName, diff --git a/reactos/include/ntos/rtl.h b/reactos/include/ntos/rtl.h index fc49b790242..8ce54cfcaf2 100755 --- a/reactos/include/ntos/rtl.h +++ b/reactos/include/ntos/rtl.h @@ -1,4 +1,4 @@ -/* $Id: rtl.h,v 1.20 2003/11/03 20:30:23 gdalsnes Exp $ +/* $Id: rtl.h,v 1.21 2003/11/17 02:12:50 hyperion Exp $ * */ @@ -575,79 +575,6 @@ extern BOOLEAN IMPORTED NlsMbOemCodePageTag; extern PUSHORT IMPORTED NlsOemLeadByteInfo; #endif /* __NTOSKRNL__ || __NTDLL__ */ - -/* - * NOTE: ReactOS extensions - */ -#define RtlMin(X,Y) (((X) < (Y))? (X) : (Y)) -#define RtlMax(X,Y) (((X) > (Y))? (X) : (Y)) -#define RtlMin3(X,Y,Z) (((X) < (Y)) ? RtlMin(X,Z) : RtlMin(Y,Z)) -#define RtlMax3(X,Y,Z) (((X) > (Y)) ? RtlMax(X,Z) : RtlMax(Y,Z)) - - -/* - * VOID - * InitializeUnicodeString(PUNICODE_STRING DestinationString, - * USHORT Lenght, - * USHORT MaximumLength, - * PCWSTR Buffer); - * - * Initialize n UNICODE_STRING from its fields. Use when you know the values of - * all the fields in advance - */ - -#define InitializeUnicodeString(__PDEST_STRING__,__LENGTH__,__MAXLENGTH__,__BUFFER__) \ -{ \ - (__PDEST_STRING__)->Length = (__LENGTH__); \ - (__PDEST_STRING__)->MaximumLength = (__MAXLENGTH__); \ - (__PDEST_STRING__)->Buffer = (__BUFFER__); \ -} - - -/* - * VOID - * RtlInitUnicodeStringFromLiteral(PUNICODE_STRING DestinationString, - * PCWSTR SourceString); - * - * Initialize a UNICODE_STRING from a wide string literal. WARNING: use only with - * string literals and statically initialized arrays, it will calculate the wrong - * length otherwise - */ - -#define RtlInitUnicodeStringFromLiteral(__PDEST_STRING__,__SOURCE_STRING__) \ - InitializeUnicodeString( \ - (__PDEST_STRING__), \ - sizeof(__SOURCE_STRING__) - sizeof(WCHAR), \ - sizeof(__SOURCE_STRING__), \ - (__SOURCE_STRING__) \ -) - - -/* - * Static initializer for UNICODE_STRING variables. - * - * Usage: - * UNICODE_STRING wstr = UNICODE_STRING_INITIALIZER(L"string"); - */ - -#define UNICODE_STRING_INITIALIZER(__SOURCE_STRING__) \ -{ \ - sizeof((__SOURCE_STRING__)) - sizeof(WCHAR), \ - sizeof((__SOURCE_STRING__)), \ - (__SOURCE_STRING__) \ -} - - -/* - * Initializer for empty UNICODE_STRING variables. - * - * Usage: - * UNICODE_STRING wstr = EMPTY_UNICODE_STRING; - */ - -#define EMPTY_UNICODE_STRING {0, 0, NULL} - - /* VOID PushEntryList ( diff --git a/reactos/include/rosrtl/minmax.h b/reactos/include/rosrtl/minmax.h new file mode 100644 index 00000000000..23d5be11ad3 --- /dev/null +++ b/reactos/include/rosrtl/minmax.h @@ -0,0 +1,23 @@ +/* $Id: minmax.h,v 1.1 2003/11/17 02:12:52 hyperion Exp $ + */ + +#ifndef ROSRTL_MINMAX_H__ +#define ROSRTL_MINMAX_H__ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#define RtlRosMin(X,Y) (((X) < (Y))? (X) : (Y)) +#define RtlRosMax(X,Y) (((X) > (Y))? (X) : (Y)) +#define RtlRosMin3(X,Y,Z) (((X) < (Y)) ? RtlRosMin(X,Z) : RtlRosMin(Y,Z)) +#define RtlRosMax3(X,Y,Z) (((X) > (Y)) ? RtlRosMax(X,Z) : RtlRosMax(Y,Z)) + +#ifdef __cplusplus +} +#endif + +#endif + +/* EOF */ diff --git a/reactos/include/rosrtl/string.h b/reactos/include/rosrtl/string.h new file mode 100644 index 00000000000..4bba0a0035a --- /dev/null +++ b/reactos/include/rosrtl/string.h @@ -0,0 +1,51 @@ +/* $Id: string.h,v 1.1 2003/11/17 02:12:52 hyperion Exp $ + */ + +#ifndef ROSRTL_STRING_H__ +#define ROSRTL_STRING_H__ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#define RosInitializeString( \ + __PDEST_STRING__, \ + __LENGTH__, \ + __MAXLENGTH__, \ + __BUFFER__ \ +) \ +{ \ + (__PDEST_STRING__)->Length = (__LENGTH__); \ + (__PDEST_STRING__)->MaximumLength = (__MAXLENGTH__); \ + (__PDEST_STRING__)->Buffer = (__BUFFER__); \ +} + +#define RtlRosInitStringFromLiteral( \ + __PDEST_STRING__, __SOURCE_STRING__) \ + RosInitializeString( \ + (__PDEST_STRING__), \ + sizeof(__SOURCE_STRING__) - sizeof((__SOURCE_STRING__)[0]), \ + sizeof(__SOURCE_STRING__), \ + (__SOURCE_STRING__) \ + ) + +#define RtlRosInitUnicodeStringFromLiteral \ + RtlRosInitStringFromLiteral + +#define ROS_STRING_INITIALIZER(__SOURCE_STRING__) \ +{ \ + sizeof(__SOURCE_STRING__) - sizeof((__SOURCE_STRING__)[0]), \ + sizeof(__SOURCE_STRING__), \ + (__SOURCE_STRING__) \ +} + +#define ROS_EMPTY_STRING {0, 0, NULL} + +#ifdef __cplusplus +} +#endif + +#endif + +/* EOF */ diff --git a/reactos/lib/advapi32/reg/reg.c b/reactos/lib/advapi32/reg/reg.c index 5c69e001d9c..098a554d7be 100644 --- a/reactos/lib/advapi32/reg/reg.c +++ b/reactos/lib/advapi32/reg/reg.c @@ -1,4 +1,4 @@ -/* $Id: reg.c,v 1.32 2003/11/16 10:41:42 gvg Exp $ +/* $Id: reg.c,v 1.33 2003/11/17 02:12:50 hyperion Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries @@ -15,6 +15,7 @@ #define NTOS_MODE_USER #include #include +#include #include #include #include @@ -176,7 +177,7 @@ static NTSTATUS OpenClassesRootKey (PHANDLE KeyHandle) { OBJECT_ATTRIBUTES Attributes; - UNICODE_STRING KeyName = UNICODE_STRING_INITIALIZER(L"\\Registry\\Machine\\Software\\CLASSES"); + UNICODE_STRING KeyName = ROS_STRING_INITIALIZER(L"\\Registry\\Machine\\Software\\CLASSES"); DPRINT("OpenClassesRootKey()\n"); @@ -195,7 +196,7 @@ static NTSTATUS OpenLocalMachineKey (PHANDLE KeyHandle) { OBJECT_ATTRIBUTES Attributes; - UNICODE_STRING KeyName = UNICODE_STRING_INITIALIZER(L"\\Registry\\Machine"); + UNICODE_STRING KeyName = ROS_STRING_INITIALIZER(L"\\Registry\\Machine"); DPRINT("OpenLocalMachineKey()\n"); @@ -214,7 +215,7 @@ static NTSTATUS OpenUsersKey (PHANDLE KeyHandle) { OBJECT_ATTRIBUTES Attributes; - UNICODE_STRING KeyName = UNICODE_STRING_INITIALIZER(L"\\Registry\\User"); + UNICODE_STRING KeyName = ROS_STRING_INITIALIZER(L"\\Registry\\User"); DPRINT("OpenUsersKey()\n"); @@ -234,7 +235,7 @@ OpenCurrentConfigKey (PHANDLE KeyHandle) { OBJECT_ATTRIBUTES Attributes; UNICODE_STRING KeyName = - UNICODE_STRING_INITIALIZER(L"\\Registry\\Machine\\System\\CurrentControlSet\\Hardware Profiles\\Current"); + ROS_STRING_INITIALIZER(L"\\Registry\\Machine\\System\\CurrentControlSet\\Hardware Profiles\\Current"); DPRINT("OpenCurrentConfigKey()\n"); diff --git a/reactos/lib/kernel32/debug/output.c b/reactos/lib/kernel32/debug/output.c index 80897d272b4..2182cf11ad9 100644 --- a/reactos/lib/kernel32/debug/output.c +++ b/reactos/lib/kernel32/debug/output.c @@ -1,4 +1,4 @@ -/* $Id: output.c,v 1.3 2003/09/12 17:51:47 vizzini Exp $ +/* $Id: output.c,v 1.4 2003/11/17 02:12:50 hyperion Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries @@ -16,8 +16,8 @@ /* Open or create the mutex used to communicate with the debug monitor */ HANDLE K32CreateDBMonMutex(void) { - static SID_IDENTIFIER_AUTHORITY siaNTAuth = {SECURITY_NT_AUTHORITY}; - static SID_IDENTIFIER_AUTHORITY siaWorldAuth = {SECURITY_WORLD_SID_AUTHORITY}; + static SID_IDENTIFIER_AUTHORITY siaNTAuth = {SECURITY_NT_AUTHORITY}; + static SID_IDENTIFIER_AUTHORITY siaWorldAuth = {SECURITY_WORLD_SID_AUTHORITY}; HANDLE hMutex; diff --git a/reactos/lib/kernel32/file/curdir.c b/reactos/lib/kernel32/file/curdir.c index bebe9f45d79..288115aeb43 100644 --- a/reactos/lib/kernel32/file/curdir.c +++ b/reactos/lib/kernel32/file/curdir.c @@ -1,4 +1,4 @@ -/* $Id: curdir.c,v 1.38 2003/07/28 18:39:41 royce Exp $ +/* $Id: curdir.c,v 1.39 2003/11/17 02:12:50 hyperion Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries @@ -224,7 +224,7 @@ GetTempPathW ( Value.MaximumLength = (nBufferLength - 1) * sizeof(WCHAR); Value.Buffer = lpBuffer; - RtlInitUnicodeStringFromLiteral (&Name, + RtlRosInitUnicodeStringFromLiteral (&Name, L"TMP"); Status = RtlQueryEnvironmentVariable_U (NULL, @@ -232,7 +232,7 @@ GetTempPathW ( &Value); if (!NT_SUCCESS(Status) && Status != STATUS_BUFFER_TOO_SMALL) { - RtlInitUnicodeStringFromLiteral (&Name, + RtlRosInitUnicodeStringFromLiteral (&Name, L"TEMP"); Status = RtlQueryEnvironmentVariable_U (NULL, diff --git a/reactos/lib/kernel32/file/find.c b/reactos/lib/kernel32/file/find.c index 6fc07b76e37..17851fc4dc8 100644 --- a/reactos/lib/kernel32/file/find.c +++ b/reactos/lib/kernel32/file/find.c @@ -1,4 +1,4 @@ -/* $Id: find.c,v 1.39 2003/10/19 17:10:46 hbirr Exp $ +/* $Id: find.c,v 1.40 2003/11/17 02:12:50 hyperion Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries @@ -183,7 +183,7 @@ InternalFindFirstFile ( /* change pattern: "*.*" --> "*" */ if (!wcscmp (SearchPattern, L"*.*")) { - RtlInitUnicodeStringFromLiteral(&PatternStr, L"*"); + RtlRosInitUnicodeStringFromLiteral(&PatternStr, L"*"); } else { diff --git a/reactos/lib/kernel32/k32.h b/reactos/lib/kernel32/k32.h index 6b400f9582d..5564a9a31e7 100755 --- a/reactos/lib/kernel32/k32.h +++ b/reactos/lib/kernel32/k32.h @@ -25,3 +25,4 @@ #include #include #include +#include diff --git a/reactos/lib/kernel32/misc/comm.c b/reactos/lib/kernel32/misc/comm.c index a82e240001a..6d3fe7029de 100644 --- a/reactos/lib/kernel32/misc/comm.c +++ b/reactos/lib/kernel32/misc/comm.c @@ -1,4 +1,4 @@ -/* $Id: comm.c,v 1.8 2003/07/10 18:50:51 chorns Exp $ +/* $Id: comm.c,v 1.9 2003/11/17 02:12:50 hyperion Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries @@ -231,8 +231,8 @@ BOOL COMMDCB_ParseBool(LPWSTR * StrTail, BOOL * Value) ULONG_PTR nValue; static COMMDCB_PARAM_STRFLAG a_BoolFlags[] = { - { UNICODE_STRING_INITIALIZER(L"off"), FALSE }, - { UNICODE_STRING_INITIALIZER(L"on"), TRUE } + { ROS_STRING_INITIALIZER(L"off"), FALSE }, + { ROS_STRING_INITIALIZER(L"on"), TRUE } }; /* try to recognize the next flag as a boolean */ @@ -338,9 +338,9 @@ COMMDCB_PARAM_HANDLER(dtr) ULONG_PTR nValue; static COMMDCB_PARAM_STRFLAG a_DTRFlags[] = { - { UNICODE_STRING_INITIALIZER(L"hs"), DTR_CONTROL_HANDSHAKE }, - { UNICODE_STRING_INITIALIZER(L"off"), DTR_CONTROL_DISABLE }, - { UNICODE_STRING_INITIALIZER(L"on"), DTR_CONTROL_ENABLE } + { ROS_STRING_INITIALIZER(L"hs"), DTR_CONTROL_HANDSHAKE }, + { ROS_STRING_INITIALIZER(L"off"), DTR_CONTROL_DISABLE }, + { ROS_STRING_INITIALIZER(L"on"), DTR_CONTROL_ENABLE } }; (void)Timeouts; @@ -458,10 +458,10 @@ COMMDCB_PARAM_HANDLER(rts) ULONG_PTR nValue; static COMMDCB_PARAM_STRFLAG a_RTSFlags[] = { - { UNICODE_STRING_INITIALIZER(L"hs"), RTS_CONTROL_HANDSHAKE }, - { UNICODE_STRING_INITIALIZER(L"off"), RTS_CONTROL_DISABLE }, - { UNICODE_STRING_INITIALIZER(L"on"), RTS_CONTROL_ENABLE }, - { UNICODE_STRING_INITIALIZER(L"tg"), RTS_CONTROL_TOGGLE } + { ROS_STRING_INITIALIZER(L"hs"), RTS_CONTROL_HANDSHAKE }, + { ROS_STRING_INITIALIZER(L"off"), RTS_CONTROL_DISABLE }, + { ROS_STRING_INITIALIZER(L"on"), RTS_CONTROL_ENABLE }, + { ROS_STRING_INITIALIZER(L"tg"), RTS_CONTROL_TOGGLE } }; (void)Timeouts; @@ -491,9 +491,9 @@ COMMDCB_PARAM_HANDLER(stop) ULONG_PTR nValue; static COMMDCB_PARAM_STRFLAG a_StopFlags[] = { - { UNICODE_STRING_INITIALIZER(L"1"), ONESTOPBIT }, - { UNICODE_STRING_INITIALIZER(L"1.5"), ONE5STOPBITS }, - { UNICODE_STRING_INITIALIZER(L"2"), TWOSTOPBITS } + { ROS_STRING_INITIALIZER(L"1"), ONESTOPBIT }, + { ROS_STRING_INITIALIZER(L"1.5"), ONE5STOPBITS }, + { ROS_STRING_INITIALIZER(L"2"), TWOSTOPBITS } }; (void)Timeouts; @@ -575,7 +575,7 @@ COMMDCB_PARAM_HANDLER(xon) /* FUNCTIONS */ #define COMMDCB_PARAM(__P__) \ { \ - UNICODE_STRING_INITIALIZER(_L(#__P__)), \ + ROS_STRING_INITIALIZER(_L(#__P__)), \ (ULONG_PTR)&COMMDCB_ ## __P__ ## Param \ } diff --git a/reactos/lib/kernel32/misc/dllmain.c b/reactos/lib/kernel32/misc/dllmain.c index c0f1d1fbe48..639129f8f5f 100644 --- a/reactos/lib/kernel32/misc/dllmain.c +++ b/reactos/lib/kernel32/misc/dllmain.c @@ -1,4 +1,4 @@ -/* $Id: dllmain.c,v 1.29 2003/08/18 10:47:04 hbirr Exp $ +/* $Id: dllmain.c,v 1.30 2003/11/17 02:12:50 hyperion Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries @@ -43,7 +43,7 @@ static NTSTATUS OpenBaseDirectory(PHANDLE DirHandle) { OBJECT_ATTRIBUTES ObjectAttributes; - UNICODE_STRING Name = UNICODE_STRING_INITIALIZER(L"\\BaseNamedObjects"); + UNICODE_STRING Name = ROS_STRING_INITIALIZER(L"\\BaseNamedObjects"); NTSTATUS Status; InitializeObjectAttributes(&ObjectAttributes, diff --git a/reactos/lib/msafd/misc/dllmain.c b/reactos/lib/msafd/misc/dllmain.c index e32739700e5..70f2444c645 100644 --- a/reactos/lib/msafd/misc/dllmain.c +++ b/reactos/lib/msafd/misc/dllmain.c @@ -10,6 +10,7 @@ #include #include #include +#include #ifdef DBG @@ -104,7 +105,7 @@ NTSTATUS OpenSocket( AFD_DbgPrint(MAX_TRACE, ("EaInfo at (0x%X) EaLength is (%d).\n", (UINT)EaInfo, (INT)EaLength)); - RtlInitUnicodeStringFromLiteral(&DeviceName, L"\\Device\\Afd"); + RtlRosInitUnicodeStringFromLiteral(&DeviceName, L"\\Device\\Afd"); InitializeObjectAttributes( &ObjectAttributes, &DeviceName, @@ -674,7 +675,7 @@ NTSTATUS OpenCommandChannel( SocketInfo = (PAFD_SOCKET_INFORMATION)((ULONG_PTR)EaInfo->EaName + AFD_SOCKET_LENGTH); SocketInfo->CommandChannel = TRUE; - RtlInitUnicodeStringFromLiteral(&DeviceName, L"\\Device\\Afd"); + RtlRosInitUnicodeStringFromLiteral(&DeviceName, L"\\Device\\Afd"); InitializeObjectAttributes( &ObjectAttributes, &DeviceName, diff --git a/reactos/lib/ntdll/csr/lpc.c b/reactos/lib/ntdll/csr/lpc.c index 33e7a3d7201..87b83c30951 100644 --- a/reactos/lib/ntdll/csr/lpc.c +++ b/reactos/lib/ntdll/csr/lpc.c @@ -1,4 +1,4 @@ -/* $Id: lpc.c,v 1.10 2003/07/11 13:50:22 royce Exp $ +/* $Id: lpc.c,v 1.11 2003/11/17 02:12:50 hyperion Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -16,6 +16,7 @@ #include #include #include +#include #include @@ -137,7 +138,7 @@ CsrClientConnectToServer(VOID) { return(Status); } - RtlInitUnicodeStringFromLiteral(&PortName, L"\\Windows\\ApiPort"); + RtlRosInitUnicodeStringFromLiteral(&PortName, L"\\Windows\\ApiPort"); ConnectInfoLength = 0; LpcWrite.Length = sizeof(LPC_SECTION_WRITE); LpcWrite.SectionHandle = CsrSectionHandle; diff --git a/reactos/lib/ntdll/dbg/debug.c b/reactos/lib/ntdll/dbg/debug.c index 689c19c1436..3360f4585f8 100644 --- a/reactos/lib/ntdll/dbg/debug.c +++ b/reactos/lib/ntdll/dbg/debug.c @@ -1,4 +1,4 @@ -/* $Id: debug.c,v 1.11 2003/09/12 17:51:47 vizzini Exp $ +/* $Id: debug.c,v 1.12 2003/11/17 02:12:50 hyperion Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -13,6 +13,7 @@ #include #include +#include #include #include @@ -83,7 +84,7 @@ DbgSsInitialize(HANDLE ReplyPort, ULONG Unknown3) { SECURITY_QUALITY_OF_SERVICE Qos; - UNICODE_STRING PortName = UNICODE_STRING_INITIALIZER(L"\\DbgSsApiPort"); + UNICODE_STRING PortName = ROS_STRING_INITIALIZER(L"\\DbgSsApiPort"); NTSTATUS Status; Qos.Length = sizeof(SECURITY_QUALITY_OF_SERVICE); @@ -129,7 +130,7 @@ NTSTATUS STDCALL DbgUiConnectToDbg(VOID) { SECURITY_QUALITY_OF_SERVICE Qos; - UNICODE_STRING PortName = UNICODE_STRING_INITIALIZER(L"\\DbgUiApiPort"); + UNICODE_STRING PortName = ROS_STRING_INITIALIZER(L"\\DbgUiApiPort"); NTSTATUS Status; PTEB Teb; ULONG InfoSize; diff --git a/reactos/lib/ntdll/rtl/registry.c b/reactos/lib/ntdll/rtl/registry.c index bc8e231c024..a2c6b4ebc36 100644 --- a/reactos/lib/ntdll/rtl/registry.c +++ b/reactos/lib/ntdll/rtl/registry.c @@ -1,4 +1,4 @@ -/* $Id: registry.c,v 1.26 2003/10/26 12:47:12 ekohl Exp $ +/* $Id: registry.c,v 1.27 2003/11/17 02:12:50 hyperion Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -21,6 +21,7 @@ #include #include +#include #include #define NDEBUG @@ -244,7 +245,7 @@ RtlOpenCurrentUser(IN ACCESS_MASK DesiredAccess, { OBJECT_ATTRIBUTES ObjectAttributes; NTSTATUS Status; - UNICODE_STRING KeyPath = UNICODE_STRING_INITIALIZER(L"\\Registry\\User\\.Default"); + UNICODE_STRING KeyPath = ROS_STRING_INITIALIZER(L"\\Registry\\User\\.Default"); Status = RtlFormatCurrentUserKeyPath(&KeyPath); if (NT_SUCCESS(Status)) diff --git a/reactos/lib/secur32/lsa.c b/reactos/lib/secur32/lsa.c index 76970ec8061..3e43bcd1afe 100644 --- a/reactos/lib/secur32/lsa.c +++ b/reactos/lib/secur32/lsa.c @@ -1,4 +1,4 @@ -/* $Id: lsa.c,v 1.8 2003/09/08 09:56:57 weiden Exp $ +/* $Id: lsa.c,v 1.9 2003/11/17 02:12:50 hyperion Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries @@ -12,6 +12,7 @@ #include #include +#include #include #include #include @@ -281,7 +282,7 @@ LsaRegisterLogonProcess(PLSA_STRING LsaLogonProcessName, PHANDLE Handle, PLSA_OPERATIONAL_MODE OperationalMode) { - UNICODE_STRING Portname = UNICODE_STRING_INITIALIZER(L"\\SeLsaCommandPort"); + UNICODE_STRING Portname = ROS_STRING_INITIALIZER(L"\\SeLsaCommandPort"); ULONG ConnectInfoLength; NTSTATUS Status; LSASS_REQUEST Request; diff --git a/reactos/ntoskrnl/cm/registry.c b/reactos/ntoskrnl/cm/registry.c index 7c4411e6809..b6dc73e54bd 100644 --- a/reactos/ntoskrnl/cm/registry.c +++ b/reactos/ntoskrnl/cm/registry.c @@ -1,4 +1,4 @@ -/* $Id: registry.c,v 1.113 2003/10/16 14:48:22 ekohl Exp $ +/* $Id: registry.c,v 1.114 2003/11/17 02:12:50 hyperion Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -18,6 +18,7 @@ #include #include #include +#include #define NDEBUG #include @@ -465,7 +466,7 @@ CmiCreateCurrentControlSetLink(VOID) DPRINT("Link target '%S'\n", TargetNameBuffer); - RtlInitUnicodeStringFromLiteral(&LinkName, + RtlRosInitUnicodeStringFromLiteral(&LinkName, L"\\Registry\\Machine\\SYSTEM\\CurrentControlSet"); InitializeObjectAttributes(&ObjectAttributes, &LinkName, @@ -485,7 +486,7 @@ CmiCreateCurrentControlSetLink(VOID) return(Status); } - RtlInitUnicodeStringFromLiteral(&LinkValue, + RtlRosInitUnicodeStringFromLiteral(&LinkValue, L"SymbolicLinkValue"); Status = NtSetValueKey(KeyHandle, &LinkValue, @@ -687,7 +688,7 @@ CmiInitControlSetLink (VOID) NTSTATUS Status; /* Create 'ControlSet001' key */ - RtlInitUnicodeStringFromLiteral (&ControlSetKeyName, + RtlRosInitUnicodeStringFromLiteral (&ControlSetKeyName, L"\\Registry\\Machine\\SYSTEM\\ControlSet001"); InitializeObjectAttributes (&ObjectAttributes, &ControlSetKeyName, @@ -709,7 +710,7 @@ CmiInitControlSetLink (VOID) NtClose (KeyHandle); /* Link 'CurrentControlSet' to 'ControlSet001' key */ - RtlInitUnicodeStringFromLiteral (&ControlSetLinkName, + RtlRosInitUnicodeStringFromLiteral (&ControlSetLinkName, L"\\Registry\\Machine\\SYSTEM\\CurrentControlSet"); InitializeObjectAttributes (&ObjectAttributes, &ControlSetLinkName, @@ -729,7 +730,7 @@ CmiInitControlSetLink (VOID) return Status; } - RtlInitUnicodeStringFromLiteral (&ControlSetValueName, + RtlRosInitUnicodeStringFromLiteral (&ControlSetValueName, L"SymbolicLinkValue"); Status = NtSetValueKey (KeyHandle, &ControlSetValueName, @@ -770,7 +771,7 @@ CmiInitHives(BOOLEAN SetupBoot) if (SetupBoot == TRUE) { - RtlInitUnicodeStringFromLiteral(&KeyName, + RtlRosInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\HARDWARE"); InitializeObjectAttributes(&ObjectAttributes, &KeyName, @@ -786,7 +787,7 @@ CmiInitHives(BOOLEAN SetupBoot) return(Status); } - RtlInitUnicodeStringFromLiteral(&ValueName, + RtlRosInitUnicodeStringFromLiteral(&ValueName, L"InstallPath"); BufferSize = sizeof(KEY_VALUE_PARTIAL_INFORMATION) + 4096; diff --git a/reactos/ntoskrnl/cm/regobj.c b/reactos/ntoskrnl/cm/regobj.c index 23ab967a9a2..0bfd37ceba3 100644 --- a/reactos/ntoskrnl/cm/regobj.c +++ b/reactos/ntoskrnl/cm/regobj.c @@ -13,6 +13,7 @@ #include #include #include +#include #define NDEBUG #include @@ -522,7 +523,7 @@ CmiGetLinkTarget(PREGISTRY_HIVE RegistryHive, PKEY_CELL KeyCell, PUNICODE_STRING TargetPath) { - UNICODE_STRING LinkName = UNICODE_STRING_INITIALIZER(L"SymbolicLinkValue"); + UNICODE_STRING LinkName = ROS_STRING_INITIALIZER(L"SymbolicLinkValue"); PVALUE_CELL ValueCell; PDATA_CELL DataCell; NTSTATUS Status; diff --git a/reactos/ntoskrnl/cm/rtlfunc.c b/reactos/ntoskrnl/cm/rtlfunc.c index 32d8ffb8f95..1713536971d 100644 --- a/reactos/ntoskrnl/cm/rtlfunc.c +++ b/reactos/ntoskrnl/cm/rtlfunc.c @@ -9,6 +9,8 @@ /* INCLUDES *****************************************************************/ #include +#include +#include #include #include #include @@ -222,7 +224,7 @@ RtlOpenCurrentUser(IN ACCESS_MASK DesiredAccess, OUT PHANDLE KeyHandle) { OBJECT_ATTRIBUTES ObjectAttributes; - UNICODE_STRING KeyPath = UNICODE_STRING_INITIALIZER(L"\\Registry\\User\\.Default"); + UNICODE_STRING KeyPath = ROS_STRING_INITIALIZER(L"\\Registry\\User\\.Default"); NTSTATUS Status; Status = RtlFormatCurrentUserKeyPath(&KeyPath); @@ -372,7 +374,7 @@ RtlQueryRegistryValues(IN ULONG RelativeTo, } else { - ValueString->Length = RtlMin(SourceString->Length, + ValueString->Length = RtlRosMin(SourceString->Length, ValueString->MaximumLength - sizeof(WCHAR)); memcpy(ValueString->Buffer, SourceString->Buffer, @@ -408,7 +410,7 @@ RtlQueryRegistryValues(IN ULONG RelativeTo, break; ValueString->Buffer[0] = 0; } - ValueString->Length = RtlMin(ValueInfo->DataLength, + ValueString->Length = RtlRosMin(ValueInfo->DataLength, ValueString->MaximumLength) - sizeof(WCHAR); memcpy(ValueString->Buffer, ValueInfo->Data, diff --git a/reactos/ntoskrnl/dbg/kdb_stabs.c b/reactos/ntoskrnl/dbg/kdb_stabs.c index 9457bdee827..213bf52dc09 100644 --- a/reactos/ntoskrnl/dbg/kdb_stabs.c +++ b/reactos/ntoskrnl/dbg/kdb_stabs.c @@ -40,6 +40,7 @@ #include #include #include +#include #define NDEBUG #include @@ -885,7 +886,7 @@ KdbLdrLoadAutoConfigDrivers(VOID) * is created after their module entries */ - RtlInitUnicodeStringFromLiteral(&ModuleName, KERNEL_MODULE_NAME); + RtlRosInitUnicodeStringFromLiteral(&ModuleName, KERNEL_MODULE_NAME); ModuleObject = LdrGetModuleObject(&ModuleName); if (ModuleObject != NULL) { @@ -893,7 +894,7 @@ KdbLdrLoadAutoConfigDrivers(VOID) &ModuleObject->TextSection->SymbolInfo); } - RtlInitUnicodeStringFromLiteral(&ModuleName, HAL_MODULE_NAME); + RtlRosInitUnicodeStringFromLiteral(&ModuleName, HAL_MODULE_NAME); ModuleObject = LdrGetModuleObject(&ModuleName); if (ModuleObject != NULL) { diff --git a/reactos/ntoskrnl/ex/win32k.c b/reactos/ntoskrnl/ex/win32k.c index 17600fd8bc2..8a372d54944 100644 --- a/reactos/ntoskrnl/ex/win32k.c +++ b/reactos/ntoskrnl/ex/win32k.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #define NDEBUG @@ -288,7 +289,7 @@ ExpWin32kInit(VOID) ExWindowStationObjectType->OkayToClose = NULL; ExWindowStationObjectType->Create = ExpWinStaObjectCreate; ExWindowStationObjectType->DuplicationNotify = NULL; - RtlInitUnicodeStringFromLiteral(&ExWindowStationObjectType->TypeName, L"WindowStation"); + RtlRosInitUnicodeStringFromLiteral(&ExWindowStationObjectType->TypeName, L"WindowStation"); ObpCreateTypeObject(ExWindowStationObjectType); @@ -318,7 +319,7 @@ ExpWin32kInit(VOID) ExDesktopObjectType->OkayToClose = NULL; ExDesktopObjectType->Create = ExpDesktopObjectCreate; ExDesktopObjectType->DuplicationNotify = NULL; - RtlInitUnicodeStringFromLiteral(&ExDesktopObjectType->TypeName, L"Desktop"); + RtlRosInitUnicodeStringFromLiteral(&ExDesktopObjectType->TypeName, L"Desktop"); ObpCreateTypeObject(ExDesktopObjectType); } diff --git a/reactos/ntoskrnl/inbv/inbv.c b/reactos/ntoskrnl/inbv/inbv.c index ef6addc3824..70c841ca0d4 100755 --- a/reactos/ntoskrnl/inbv/inbv.c +++ b/reactos/ntoskrnl/inbv/inbv.c @@ -1,4 +1,4 @@ -/* $Id: inbv.c,v 1.3 2003/10/12 17:05:44 hbirr Exp $ +/* $Id: inbv.c,v 1.4 2003/11/17 02:12:50 hyperion Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -14,6 +14,7 @@ #include #include #include +#include #define NDEBUG #include @@ -41,7 +42,7 @@ InbvCheckBootVid(VOID) OBJECT_ATTRIBUTES ObjectAttributes; UNICODE_STRING BootVidName; - RtlInitUnicodeStringFromLiteral(&BootVidName, L"\\Device\\BootVid"); + RtlRosInitUnicodeStringFromLiteral(&BootVidName, L"\\Device\\BootVid"); InitializeObjectAttributes(&ObjectAttributes, &BootVidName, 0, diff --git a/reactos/ntoskrnl/io/arcname.c b/reactos/ntoskrnl/io/arcname.c index 41465ade4c2..a0dc38fd866 100644 --- a/reactos/ntoskrnl/io/arcname.c +++ b/reactos/ntoskrnl/io/arcname.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: arcname.c,v 1.15 2003/11/06 16:36:43 ekohl Exp $ +/* $Id: arcname.c,v 1.16 2003/11/17 02:12:51 hyperion Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -29,6 +29,7 @@ /* INCLUDES *****************************************************************/ #include +#include #include "internal/io.h" #include "internal/xhal.h" @@ -412,7 +413,7 @@ IoCreateSystemRootLink(PCHAR ParameterLine) DPRINT("DeviceName: %wZ\n", &DeviceName); /* create the '\SystemRoot' link */ - RtlInitUnicodeStringFromLiteral(&LinkName, + RtlRosInitUnicodeStringFromLiteral(&LinkName, L"\\SystemRoot"); Status = IoCreateSymbolicLink(&LinkName, diff --git a/reactos/ntoskrnl/io/driver.c b/reactos/ntoskrnl/io/driver.c index 86c0b64d118..a6a59f89a63 100644 --- a/reactos/ntoskrnl/io/driver.c +++ b/reactos/ntoskrnl/io/driver.c @@ -1,4 +1,4 @@ -/* $Id: driver.c,v 1.30 2003/10/30 18:16:25 navaraf Exp $ +/* $Id: driver.c,v 1.31 2003/11/17 02:12:51 hyperion Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -23,6 +23,7 @@ #include #include #include +#include #include @@ -118,7 +119,7 @@ IopInitDriverImplementation(VOID) IoDriverObjectType->OkayToClose = NULL; IoDriverObjectType->Create = IopCreateDriver; IoDriverObjectType->DuplicationNotify = NULL; - RtlInitUnicodeStringFromLiteral(&IoDriverObjectType->TypeName, L"Driver"); + RtlRosInitUnicodeStringFromLiteral(&IoDriverObjectType->TypeName, L"Driver"); ObpCreateTypeObject(IoDriverObjectType); } @@ -289,7 +290,7 @@ IoCreateDriverList(VOID) return(Status); /* Enumerate services and create the service list */ - RtlInitUnicodeStringFromLiteral(&ServicesKeyName, + RtlRosInitUnicodeStringFromLiteral(&ServicesKeyName, L"\\Registry\\Machine\\System\\CurrentControlSet\\Services"); InitializeObjectAttributes(&ObjectAttributes, diff --git a/reactos/ntoskrnl/io/iomgr.c b/reactos/ntoskrnl/io/iomgr.c index f2174105404..94cc7449fb8 100644 --- a/reactos/ntoskrnl/io/iomgr.c +++ b/reactos/ntoskrnl/io/iomgr.c @@ -1,4 +1,4 @@ -/* $Id: iomgr.c,v 1.42 2003/11/14 15:17:08 ekohl Exp $ +/* $Id: iomgr.c,v 1.43 2003/11/17 02:12:51 hyperion Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -16,6 +16,7 @@ #include #include #include +#include #define NDEBUG #include @@ -233,7 +234,7 @@ IoInit (VOID) IoDeviceObjectType->Create = IopCreateDevice; IoDeviceObjectType->DuplicationNotify = NULL; - RtlInitUnicodeStringFromLiteral(&IoDeviceObjectType->TypeName, L"Device"); + RtlRosInitUnicodeStringFromLiteral(&IoDeviceObjectType->TypeName, L"Device"); ObpCreateTypeObject(IoDeviceObjectType); @@ -262,14 +263,14 @@ IoInit (VOID) IoFileObjectType->Create = IopCreateFile; IoFileObjectType->DuplicationNotify = NULL; - RtlInitUnicodeStringFromLiteral(&IoFileObjectType->TypeName, L"File"); + RtlRosInitUnicodeStringFromLiteral(&IoFileObjectType->TypeName, L"File"); ObpCreateTypeObject(IoFileObjectType); /* * Create the '\Driver' object directory */ - RtlInitUnicodeStringFromLiteral(&DirName, L"\\Driver"); + RtlRosInitUnicodeStringFromLiteral(&DirName, L"\\Driver"); InitializeObjectAttributes(&ObjectAttributes, &DirName, 0, @@ -282,7 +283,7 @@ IoInit (VOID) /* * Create the '\FileSystem' object directory */ - RtlInitUnicodeStringFromLiteral(&DirName, + RtlRosInitUnicodeStringFromLiteral(&DirName, L"\\FileSystem"); InitializeObjectAttributes(&ObjectAttributes, &DirName, @@ -296,7 +297,7 @@ IoInit (VOID) /* * Create the '\Device' directory */ - RtlInitUnicodeStringFromLiteral(&DirName, + RtlRosInitUnicodeStringFromLiteral(&DirName, L"\\Device"); InitializeObjectAttributes(&ObjectAttributes, &DirName, @@ -310,7 +311,7 @@ IoInit (VOID) /* * Create the '\??' directory */ - RtlInitUnicodeStringFromLiteral(&DirName, + RtlRosInitUnicodeStringFromLiteral(&DirName, L"\\??"); InitializeObjectAttributes(&ObjectAttributes, &DirName, @@ -324,7 +325,7 @@ IoInit (VOID) /* * Create the '\ArcName' directory */ - RtlInitUnicodeStringFromLiteral(&DirName, + RtlRosInitUnicodeStringFromLiteral(&DirName, L"\\ArcName"); InitializeObjectAttributes(&ObjectAttributes, &DirName, @@ -346,9 +347,9 @@ IoInit (VOID) /* * Create link from '\DosDevices' to '\??' directory */ - RtlInitUnicodeStringFromLiteral(&LinkName, + RtlRosInitUnicodeStringFromLiteral(&LinkName, L"\\DosDevices"); - RtlInitUnicodeStringFromLiteral(&DirName, + RtlRosInitUnicodeStringFromLiteral(&DirName, L"\\??"); IoCreateSymbolicLink(&LinkName, &DirName); diff --git a/reactos/ntoskrnl/io/pnproot.c b/reactos/ntoskrnl/io/pnproot.c index d8e639c1a94..8f05b7e7fc2 100644 --- a/reactos/ntoskrnl/io/pnproot.c +++ b/reactos/ntoskrnl/io/pnproot.c @@ -1,4 +1,4 @@ -/* $Id: pnproot.c,v 1.17 2003/10/16 12:50:30 ekohl Exp $ +/* $Id: pnproot.c,v 1.18 2003/11/17 02:12:51 hyperion Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -14,6 +14,7 @@ #include #include #include +#include #define NDEBUG #include @@ -452,7 +453,7 @@ PnpRootFdoEnumerateDevices( return STATUS_INSUFFICIENT_RESOURCES; } - RtlInitUnicodeStringFromLiteral( + RtlRosInitUnicodeStringFromLiteral( &KeyName, L"\\Registry\\Machine\\System\\CurrentControlSet\\Enum\\" \ ENUM_NAME_ROOT); diff --git a/reactos/ntoskrnl/io/resource.c b/reactos/ntoskrnl/io/resource.c index 0828defc4ad..ef1125e4981 100644 --- a/reactos/ntoskrnl/io/resource.c +++ b/reactos/ntoskrnl/io/resource.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: resource.c,v 1.12 2003/07/10 15:47:00 royce Exp $ +/* $Id: resource.c,v 1.13 2003/11/17 02:12:51 hyperion Exp $ * * PROJECT: ReactOS kernel * FILE: ntoskrnl/io/resource.c @@ -29,6 +29,7 @@ /* INCLUDES *****************************************************************/ #include +#include #include @@ -195,7 +196,7 @@ IoReportHalResourceUsage(PUNICODE_STRING HalDescription, HANDLE DescriptionKey; /* Open/Create 'RESOURCEMAP' key. */ - RtlInitUnicodeStringFromLiteral(&Name, + RtlRosInitUnicodeStringFromLiteral(&Name, L"\\Registry\\Machine\\HARDWARE\\RESOURCEMAP"); InitializeObjectAttributes(&ObjectAttributes, &Name, @@ -213,7 +214,7 @@ IoReportHalResourceUsage(PUNICODE_STRING HalDescription, return(Status); /* Open/Create 'Hardware Abstraction Layer' key */ - RtlInitUnicodeStringFromLiteral(&Name, + RtlRosInitUnicodeStringFromLiteral(&Name, L"Hardware Abstraction Layer"); InitializeObjectAttributes(&ObjectAttributes, &Name, @@ -249,7 +250,7 @@ IoReportHalResourceUsage(PUNICODE_STRING HalDescription, return(Status); /* Add '.Raw' value. */ - RtlInitUnicodeStringFromLiteral(&Name, + RtlRosInitUnicodeStringFromLiteral(&Name, L".Raw"); Status = NtSetValueKey(DescriptionKey, &Name, @@ -264,7 +265,7 @@ IoReportHalResourceUsage(PUNICODE_STRING HalDescription, } /* Add '.Translated' value. */ - RtlInitUnicodeStringFromLiteral(&Name, + RtlRosInitUnicodeStringFromLiteral(&Name, L".Translated"); Status = NtSetValueKey(DescriptionKey, &Name, diff --git a/reactos/ntoskrnl/kd/dlog.c b/reactos/ntoskrnl/kd/dlog.c index b54c637bed3..081fa05a34a 100644 --- a/reactos/ntoskrnl/kd/dlog.c +++ b/reactos/ntoskrnl/kd/dlog.c @@ -1,4 +1,4 @@ -/* $Id: dlog.c,v 1.8 2003/10/12 17:05:45 hbirr Exp $ +/* $Id: dlog.c,v 1.9 2003/11/17 02:12:51 hyperion Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -16,6 +16,7 @@ #include #include #include +#include /* GLOBALS *******************************************************************/ @@ -119,7 +120,7 @@ DebugLogInit2(VOID) UNICODE_STRING FileName; IO_STATUS_BLOCK Iosb; - RtlInitUnicodeStringFromLiteral(&FileName, L"\\SystemRoot\\debug.log"); + RtlRosInitUnicodeStringFromLiteral(&FileName, L"\\SystemRoot\\debug.log"); InitializeObjectAttributes(&ObjectAttributes, &FileName, 0, diff --git a/reactos/ntoskrnl/ldr/init.c b/reactos/ntoskrnl/ldr/init.c index e7a7bfa0786..2366071cdb9 100644 --- a/reactos/ntoskrnl/ldr/init.c +++ b/reactos/ntoskrnl/ldr/init.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: init.c,v 1.43 2003/11/16 21:02:07 ekohl Exp $ +/* $Id: init.c,v 1.44 2003/11/17 02:12:51 hyperion Exp $ * * PROJECT: ReactOS kernel * FILE: ntoskrnl/ldr/init.c @@ -45,6 +45,7 @@ #include #include #include +#include #define NDEBUG #include @@ -397,7 +398,7 @@ LdrLoadInitialProcess(PHANDLE ProcessHandle, NTSTATUS Status; /* Get the absolute path to smss.exe. */ - RtlInitUnicodeStringFromLiteral(&ImagePath, + RtlRosInitUnicodeStringFromLiteral(&ImagePath, L"\\SystemRoot\\system32\\smss.exe"); /* Map process image */ diff --git a/reactos/ntoskrnl/ldr/sysdll.c b/reactos/ntoskrnl/ldr/sysdll.c index e00e1ca7b6c..d1ffe28e6ab 100644 --- a/reactos/ntoskrnl/ldr/sysdll.c +++ b/reactos/ntoskrnl/ldr/sysdll.c @@ -18,6 +18,7 @@ #include #include #include +#include #define NDEBUG #include @@ -80,7 +81,7 @@ NTSTATUS LdrpMapSystemDll(HANDLE ProcessHandle, OBJECT_ATTRIBUTES FileObjectAttributes; HANDLE FileHandle; HANDLE NTDllSectionHandle; - UNICODE_STRING DllPathname = UNICODE_STRING_INITIALIZER(L"\\SystemRoot\\system32\\ntdll.dll"); + UNICODE_STRING DllPathname = ROS_STRING_INITIALIZER(L"\\SystemRoot\\system32\\ntdll.dll"); PIMAGE_DOS_HEADER DosHeader; PIMAGE_NT_HEADERS NTHeaders; PEPROCESS Process; diff --git a/reactos/ntoskrnl/lpc/port.c b/reactos/ntoskrnl/lpc/port.c index 505d0c71372..21e10dfb59e 100644 --- a/reactos/ntoskrnl/lpc/port.c +++ b/reactos/ntoskrnl/lpc/port.c @@ -1,4 +1,4 @@ -/* $Id: port.c,v 1.14 2003/10/12 17:05:48 hbirr Exp $ +/* $Id: port.c,v 1.15 2003/11/17 02:12:51 hyperion Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -21,6 +21,7 @@ #include #include #include +#include #define NDEBUG #include @@ -45,7 +46,7 @@ NiInitPort (VOID) { ExPortType = ExAllocatePool(NonPagedPool,sizeof(OBJECT_TYPE)); - RtlInitUnicodeStringFromLiteral(&ExPortType->TypeName,L"Port"); + RtlRosInitUnicodeStringFromLiteral(&ExPortType->TypeName,L"Port"); ExPortType->Tag = TAG('L', 'P', 'R', 'T'); ExPortType->MaxObjects = ULONG_MAX; diff --git a/reactos/ntoskrnl/mm/pagefile.c b/reactos/ntoskrnl/mm/pagefile.c index 4673b25671f..4cae2772946 100644 --- a/reactos/ntoskrnl/mm/pagefile.c +++ b/reactos/ntoskrnl/mm/pagefile.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: pagefile.c,v 1.37 2003/10/12 17:05:48 hbirr Exp $ +/* $Id: pagefile.c,v 1.38 2003/11/17 02:12:51 hyperion Exp $ * * PROJECT: ReactOS kernel * FILE: ntoskrnl/mm/pagefile.c @@ -34,6 +34,7 @@ #include #include #include +#include #define NDEBUG #include @@ -664,7 +665,7 @@ MmInitializeCrashDump(HANDLE PageFileHandle, ULONG PageFileNum) } /* Load the diskdump driver. */ - RtlInitUnicodeStringFromLiteral(&DiskDumpName, L"DiskDump"); + RtlRosInitUnicodeStringFromLiteral(&DiskDumpName, L"DiskDump"); ModuleObject = LdrGetModuleObject(&DiskDumpName); if (ModuleObject == NULL) { diff --git a/reactos/ntoskrnl/mm/section.c b/reactos/ntoskrnl/mm/section.c index 3fd36afc54c..265348c222c 100644 --- a/reactos/ntoskrnl/mm/section.c +++ b/reactos/ntoskrnl/mm/section.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: section.c,v 1.133 2003/10/22 18:20:38 hbirr Exp $ +/* $Id: section.c,v 1.134 2003/11/17 02:12:51 hyperion Exp $ * * PROJECT: ReactOS kernel * FILE: ntoskrnl/mm/section.c @@ -39,6 +39,7 @@ #include #include #include +#include #define NDEBUG #include @@ -2101,7 +2102,7 @@ MmCreatePhysicalMemorySection(VOID) PSECTION_OBJECT PhysSection; NTSTATUS Status; OBJECT_ATTRIBUTES Obj; - UNICODE_STRING Name = UNICODE_STRING_INITIALIZER(L"\\Device\\PhysicalMemory"); + UNICODE_STRING Name = ROS_STRING_INITIALIZER(L"\\Device\\PhysicalMemory"); LARGE_INTEGER SectionSize; /* @@ -2147,7 +2148,7 @@ MmInitSectionImplementation(VOID) { MmSectionObjectType = ExAllocatePool(NonPagedPool,sizeof(OBJECT_TYPE)); - RtlInitUnicodeStringFromLiteral(&MmSectionObjectType->TypeName, L"Section"); + RtlRosInitUnicodeStringFromLiteral(&MmSectionObjectType->TypeName, L"Section"); MmSectionObjectType->Tag = TAG('S', 'E', 'C', 'T'); MmSectionObjectType->TotalObjects = 0; diff --git a/reactos/ntoskrnl/ob/namespc.c b/reactos/ntoskrnl/ob/namespc.c index f6ad86b1ec4..f374c95a6e8 100644 --- a/reactos/ntoskrnl/ob/namespc.c +++ b/reactos/ntoskrnl/ob/namespc.c @@ -1,4 +1,4 @@ -/* $Id: namespc.c,v 1.43 2003/10/19 17:33:54 ekohl Exp $ +/* $Id: namespc.c,v 1.44 2003/11/17 02:12:51 hyperion Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -17,6 +17,7 @@ #include #include #include +#include #define NDEBUG #include @@ -370,7 +371,7 @@ ObInit(VOID) ObDirectoryType->Create = ObpCreateDirectory; ObDirectoryType->DuplicationNotify = NULL; - RtlInitUnicodeStringFromLiteral(&ObDirectoryType->TypeName, + RtlRosInitUnicodeStringFromLiteral(&ObDirectoryType->TypeName, L"Directory"); /* create 'type' object type*/ @@ -395,7 +396,7 @@ ObInit(VOID) ObTypeObjectType->Create = NULL; ObTypeObjectType->DuplicationNotify = NULL; - RtlInitUnicodeStringFromLiteral(&ObTypeObjectType->TypeName, + RtlRosInitUnicodeStringFromLiteral(&ObTypeObjectType->TypeName, L"ObjectType"); /* create root directory */ @@ -410,7 +411,7 @@ ObInit(VOID) (PVOID*)&NameSpaceRoot); /* create '\ObjectTypes' directory */ - RtlInitUnicodeStringFromLiteral(&Name, + RtlRosInitUnicodeStringFromLiteral(&Name, L"\\ObjectTypes"); InitializeObjectAttributes(&ObjectAttributes, &Name, diff --git a/reactos/ntoskrnl/ob/symlink.c b/reactos/ntoskrnl/ob/symlink.c index 88a04ef3e65..7a4153b718f 100644 --- a/reactos/ntoskrnl/ob/symlink.c +++ b/reactos/ntoskrnl/ob/symlink.c @@ -1,4 +1,4 @@ -/* $Id: symlink.c,v 1.6 2003/10/14 14:45:23 ekohl Exp $ +/* $Id: symlink.c,v 1.7 2003/11/17 02:12:51 hyperion Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -15,6 +15,7 @@ #define NTOS_MODE_KERNEL #include #include +#include #define NDEBUG #include @@ -185,7 +186,7 @@ ObInitSymbolicLinkImplementation (VOID) ObSymbolicLinkType->Create = ObpCreateSymbolicLink; ObSymbolicLinkType->DuplicationNotify = NULL; - RtlInitUnicodeStringFromLiteral(&ObSymbolicLinkType->TypeName, + RtlRosInitUnicodeStringFromLiteral(&ObSymbolicLinkType->TypeName, L"SymbolicLink"); ObpCreateTypeObject(ObSymbolicLinkType); diff --git a/reactos/ntoskrnl/ps/locale.c b/reactos/ntoskrnl/ps/locale.c index 3f6e2d068f7..13fd6559df9 100644 --- a/reactos/ntoskrnl/ps/locale.c +++ b/reactos/ntoskrnl/ps/locale.c @@ -1,4 +1,4 @@ -/* $Id: locale.c,v 1.5 2003/10/12 17:05:50 hbirr Exp $ +/* $Id: locale.c,v 1.6 2003/11/17 02:12:51 hyperion Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -13,6 +13,7 @@ #include #include +#include #define NDEBUG #include @@ -57,9 +58,9 @@ PiInitDefaultLocale(VOID) ValueInfo = (PKEY_VALUE_PARTIAL_INFORMATION)ValueBuffer; /* read system locale */ - RtlInitUnicodeStringFromLiteral(&KeyName, + RtlRosInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\System\\CurrentControlSet\\Control\\Nls\\Language"); - RtlInitUnicodeStringFromLiteral(&ValueName, + RtlRosInitUnicodeStringFromLiteral(&ValueName, L"Default"); InitializeObjectAttributes(&ObjectAttributes, @@ -97,9 +98,9 @@ PiInitDefaultLocale(VOID) } /* read default thread locale */ - RtlInitUnicodeStringFromLiteral(&KeyName, + RtlRosInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\User\\.Default\\Control Panel\\International"); - RtlInitUnicodeStringFromLiteral(&ValueName, + RtlRosInitUnicodeStringFromLiteral(&ValueName, L"Locale"); InitializeObjectAttributes(&ObjectAttributes, @@ -199,17 +200,17 @@ NtSetDefaultLocale(IN BOOLEAN ThreadOrSystem, &UserKey); if (!NT_SUCCESS(Status)) return(Status); - RtlInitUnicodeStringFromLiteral(&KeyName, + RtlRosInitUnicodeStringFromLiteral(&KeyName, L"Control Panel\\International"); - RtlInitUnicodeStringFromLiteral(&ValueName, + RtlRosInitUnicodeStringFromLiteral(&ValueName, L"Locale"); } else { /* system locale */ - RtlInitUnicodeStringFromLiteral(&KeyName, + RtlRosInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\System\\CurrentControlSet\\Control\\Nls\\Language"); - RtlInitUnicodeStringFromLiteral(&ValueName, + RtlRosInitUnicodeStringFromLiteral(&ValueName, L"Default"); } diff --git a/reactos/ntoskrnl/ps/process.c b/reactos/ntoskrnl/ps/process.c index 10ab3af18b2..e48ae5948ad 100644 --- a/reactos/ntoskrnl/ps/process.c +++ b/reactos/ntoskrnl/ps/process.c @@ -1,4 +1,4 @@ -/* $Id: process.c,v 1.119 2003/10/12 17:05:50 hbirr Exp $ +/* $Id: process.c,v 1.120 2003/11/17 02:12:51 hyperion Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -30,6 +30,7 @@ #include #include #include +#include #define NDEBUG #include @@ -261,7 +262,7 @@ PsInitProcessManagment(VOID) PsProcessType->Create = NULL; PsProcessType->DuplicationNotify = NULL; - RtlInitUnicodeStringFromLiteral(&PsProcessType->TypeName, L"Process"); + RtlRosInitUnicodeStringFromLiteral(&PsProcessType->TypeName, L"Process"); ObpCreateTypeObject(PsProcessType); diff --git a/reactos/ntoskrnl/ps/psmgr.c b/reactos/ntoskrnl/ps/psmgr.c index c87170278a1..9e7992de10b 100644 --- a/reactos/ntoskrnl/ps/psmgr.c +++ b/reactos/ntoskrnl/ps/psmgr.c @@ -1,4 +1,4 @@ -/* $Id: psmgr.c,v 1.17 2003/10/12 17:05:50 hbirr Exp $ +/* $Id: psmgr.c,v 1.18 2003/11/17 02:12:51 hyperion Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -79,10 +79,10 @@ PsGetVersion ( ) { if (MajorVersion) - *MajorVersion = KERNEL_VERSION_MAJOR; + *MajorVersion = 4; if (MinorVersion) - *MinorVersion = KERNEL_VERSION_MINOR; + *MinorVersion = 0; if (BuildNumber) *BuildNumber = NtBuildNumber; diff --git a/reactos/ntoskrnl/ps/thread.c b/reactos/ntoskrnl/ps/thread.c index de34a4ea32a..39c1c148515 100644 --- a/reactos/ntoskrnl/ps/thread.c +++ b/reactos/ntoskrnl/ps/thread.c @@ -1,4 +1,4 @@ -/* $Id: thread.c,v 1.121 2003/11/02 01:16:21 ekohl Exp $ +/* $Id: thread.c,v 1.122 2003/11/17 02:12:51 hyperion Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -28,6 +28,7 @@ #include #include #include +#include #define NDEBUG #include @@ -481,7 +482,7 @@ PsInitThreadManagment(VOID) PsThreadType->Create = NULL; PsThreadType->DuplicationNotify = NULL; - RtlInitUnicodeStringFromLiteral(&PsThreadType->TypeName, L"Thread"); + RtlRosInitUnicodeStringFromLiteral(&PsThreadType->TypeName, L"Thread"); ObpCreateTypeObject(PsThreadType); diff --git a/reactos/services/eventlog/logport.c b/reactos/services/eventlog/logport.c index 67672cd0529..1e924ce83ab 100644 --- a/reactos/services/eventlog/logport.c +++ b/reactos/services/eventlog/logport.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: logport.c,v 1.5 2003/11/14 17:13:32 weiden Exp $ +/* $Id: logport.c,v 1.6 2003/11/17 02:12:51 hyperion Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -33,6 +33,7 @@ #include #include #include +#include #include "eventlog.h" @@ -60,7 +61,7 @@ InitLogPort(VOID) ConnectPortHandle = NULL; MessagePortHandle = NULL; - RtlInitUnicodeStringFromLiteral(&PortName, + RtlRosInitUnicodeStringFromLiteral(&PortName, L"\\ErrorLogPort"); InitializeObjectAttributes(&ObjectAttributes, &PortName, diff --git a/reactos/subsys/csrss/api/conio.c b/reactos/subsys/csrss/api/conio.c index 3aed6a8e85b..2360af475fa 100644 --- a/reactos/subsys/csrss/api/conio.c +++ b/reactos/subsys/csrss/api/conio.c @@ -1,4 +1,4 @@ -/* $Id: conio.c,v 1.55 2003/10/23 06:53:20 gvg Exp $ +/* $Id: conio.c,v 1.56 2003/11/17 02:12:51 hyperion Exp $ * * reactos/subsys/csrss/api/conio.c * @@ -16,6 +16,8 @@ #include #include #include +#include +#include #include "api.h" #include "usercsr.h" @@ -71,7 +73,7 @@ CsrInitTextConsoleSupport(VOID) IO_STATUS_BLOCK Iosb; CONSOLE_SCREEN_BUFFER_INFO ScrInfo; - RtlInitUnicodeStringFromLiteral(&DeviceName, L"\\??\\BlueScreen"); + RtlRosInitUnicodeStringFromLiteral(&DeviceName, L"\\??\\BlueScreen"); InitializeObjectAttributes(&ObjectAttributes, &DeviceName, 0, @@ -785,10 +787,10 @@ inline BOOLEAN CsrpGetIntersection( CsrpInitRect( *Intersection, - RtlMax(Rect1.Top, Rect2.Top), - RtlMax(Rect1.Left, Rect2.Left), - RtlMin(Rect1.Bottom, Rect2.Bottom), - RtlMin(Rect1.Right, Rect2.Right)); + RtlRosMax(Rect1.Top, Rect2.Top), + RtlRosMax(Rect1.Left, Rect2.Left), + RtlRosMin(Rect1.Bottom, Rect2.Bottom), + RtlRosMin(Rect1.Right, Rect2.Right)); return TRUE; } @@ -817,10 +819,10 @@ inline BOOLEAN CsrpGetUnion( { CsrpInitRect( *Union, - RtlMin(Rect1.Top, Rect2.Top), - RtlMin(Rect1.Left, Rect2.Left), - RtlMax(Rect1.Bottom, Rect2.Bottom), - RtlMax(Rect1.Right, Rect2.Right)); + RtlRosMin(Rect1.Top, Rect2.Top), + RtlRosMin(Rect1.Left, Rect2.Left), + RtlRosMax(Rect1.Bottom, Rect2.Bottom), + RtlRosMax(Rect1.Right, Rect2.Right)); } } return TRUE; @@ -2397,8 +2399,8 @@ CSR_API(CsrWriteConsoleOutput) } WriteRegion = Request->Data.WriteConsoleOutputRequest.WriteRegion; - SizeY = RtlMin(BufferSize.Y - BufferCoord.Y, CsrpRectHeight(WriteRegion)); - SizeX = RtlMin(BufferSize.X - BufferCoord.X, CsrpRectWidth(WriteRegion)); + SizeY = RtlRosMin(BufferSize.Y - BufferCoord.Y, CsrpRectHeight(WriteRegion)); + SizeX = RtlRosMin(BufferSize.X - BufferCoord.X, CsrpRectWidth(WriteRegion)); WriteRegion.Bottom = WriteRegion.Top + SizeY - 1; WriteRegion.Right = WriteRegion.Left + SizeX - 1; @@ -2872,8 +2874,8 @@ CSR_API(CsrReadConsoleOutput) return Reply->Status ; } - SizeY = RtlMin(BufferSize.Y - BufferCoord.Y, CsrpRectHeight(ReadRegion)); - SizeX = RtlMin(BufferSize.X - BufferCoord.X, CsrpRectWidth(ReadRegion)); + SizeY = RtlRosMin(BufferSize.Y - BufferCoord.Y, CsrpRectHeight(ReadRegion)); + SizeX = RtlRosMin(BufferSize.X - BufferCoord.X, CsrpRectWidth(ReadRegion)); ReadRegion.Bottom = ReadRegion.Top + SizeY; ReadRegion.Right = ReadRegion.Left + SizeX; diff --git a/reactos/subsys/csrss/csrss.c b/reactos/subsys/csrss/csrss.c index f4f2d8deeb5..8d1fd0b12d9 100644 --- a/reactos/subsys/csrss/csrss.c +++ b/reactos/subsys/csrss/csrss.c @@ -1,4 +1,4 @@ -/* $Id: csrss.c,v 1.14 2002/10/25 22:08:20 chorns Exp $ +/* $Id: csrss.c,v 1.15 2003/11/17 02:12:51 hyperion Exp $ * * csrss.c - Client/Server Runtime subsystem * @@ -34,6 +34,7 @@ #include #include #include +#include #include "api.h" @@ -88,7 +89,7 @@ VOID STDCALL NtProcessStartup(PPEB Peb) argv[argc-1] = &(ArgBuffer[afterlastspace]); } - RtlInitUnicodeStringFromLiteral(&UnicodeString, + RtlRosInitUnicodeStringFromLiteral(&UnicodeString, L"\\CsrssInitDone"); InitializeObjectAttributes(&ObjectAttributes, &UnicodeString, diff --git a/reactos/subsys/csrss/init.c b/reactos/subsys/csrss/init.c index a5e3147e768..d5d1e0bb625 100644 --- a/reactos/subsys/csrss/init.c +++ b/reactos/subsys/csrss/init.c @@ -1,4 +1,4 @@ -/* $Id: init.c,v 1.22 2003/10/20 18:02:04 gvg Exp $ +/* $Id: init.c,v 1.23 2003/11/17 02:12:51 hyperion Exp $ * * reactos/subsys/csrss/init.c * @@ -14,6 +14,7 @@ #include #include #include +#include #include "api.h" @@ -88,7 +89,7 @@ CsrInitVideo(VOID) InitializeVideoAddressSpace(); - RtlInitUnicodeStringFromLiteral(&DeviceName, L"\\??\\DISPLAY1"); + RtlRosInitUnicodeStringFromLiteral(&DeviceName, L"\\??\\DISPLAY1"); InitializeObjectAttributes(&ObjectAttributes, &DeviceName, 0, @@ -144,7 +145,7 @@ CsrServerInitialization ( CsrInitVideo(); /* NEW NAMED PORT: \ApiPort */ - RtlInitUnicodeStringFromLiteral(&PortName, L"\\Windows\\ApiPort"); + RtlRosInitUnicodeStringFromLiteral(&PortName, L"\\Windows\\ApiPort"); InitializeObjectAttributes(&ObAttributes, &PortName, 0, @@ -190,7 +191,7 @@ CsrServerInitialization ( NtClose(ApiPortHandle); return FALSE; } - RtlInitUnicodeStringFromLiteral( &RefreshEventName, L"\\TextConsoleRefreshEvent" ); + RtlRosInitUnicodeStringFromLiteral( &RefreshEventName, L"\\TextConsoleRefreshEvent" ); InitializeObjectAttributes( &RefreshEventAttr, &RefreshEventName, 0, NULL, NULL ); Status = NtCreateEvent( &RefreshEventHandle, STANDARD_RIGHTS_ALL, &RefreshEventAttr, FALSE, FALSE ); if( !NT_SUCCESS( Status ) ) diff --git a/reactos/subsys/csrss/video.c b/reactos/subsys/csrss/video.c index 315b7c38ec3..3c28fc3f854 100644 --- a/reactos/subsys/csrss/video.c +++ b/reactos/subsys/csrss/video.c @@ -1,8 +1,9 @@ -/* $Id: video.c,v 1.7 2003/10/20 18:02:04 gvg Exp $ +/* $Id: video.c,v 1.8 2003/11/17 02:12:51 hyperion Exp $ * * ReactOS Project */ #include +#include ULONG InitializeVideoAddressSpace(VOID) @@ -20,7 +21,7 @@ InitializeVideoAddressSpace(VOID) /* * Open the physical memory section */ - RtlInitUnicodeStringFromLiteral(&PhysMemName, L"\\Device\\PhysicalMemory"); + RtlRosInitUnicodeStringFromLiteral(&PhysMemName, L"\\Device\\PhysicalMemory"); InitializeObjectAttributes(&ObjectAttributes, &PhysMemName, 0, diff --git a/reactos/subsys/smss/init.c b/reactos/subsys/smss/init.c index d56364ed1e2..a23e9fa9527 100644 --- a/reactos/subsys/smss/init.c +++ b/reactos/subsys/smss/init.c @@ -1,4 +1,4 @@ -/* $Id: init.c,v 1.51 2003/11/14 17:13:32 weiden Exp $ +/* $Id: init.c,v 1.52 2003/11/17 02:12:51 hyperion Exp $ * * init.c - Session Manager initialization * @@ -33,6 +33,7 @@ #include #include #include +#include #include "smss.h" @@ -704,7 +705,7 @@ SmSetEnvironmentVariables(VOID) SharedUserData->NtSystemRoot); /* Set SystemRoot = "C:\reactos" */ - RtlInitUnicodeStringFromLiteral(&EnvVariable, + RtlRosInitUnicodeStringFromLiteral(&EnvVariable, L"SystemRoot"); RtlInitUnicodeString(&EnvValue, ValueBuffer); @@ -716,7 +717,7 @@ SmSetEnvironmentVariables(VOID) ValueBuffer[2] = 0; /* Set SystemDrive = "C:" */ - RtlInitUnicodeStringFromLiteral(&EnvVariable, + RtlRosInitUnicodeStringFromLiteral(&EnvVariable, L"SystemDrive"); RtlInitUnicodeString(&EnvValue, ValueBuffer); @@ -747,7 +748,7 @@ SmLoadSubsystems(VOID) NTSTATUS Status; /* Load kernel mode subsystem (aka win32k.sys) */ - RtlInitUnicodeStringFromLiteral(&ImageInfo.ModuleName, + RtlRosInitUnicodeStringFromLiteral(&ImageInfo.ModuleName, L"\\SystemRoot\\system32\\win32k.sys"); Status = NtSetSystemInformation(SystemLoadAndCallImage, @@ -776,7 +777,7 @@ SignalInitEvent() UNICODE_STRING UnicodeString; HANDLE ReactOSInitEvent; - RtlInitUnicodeStringFromLiteral(&UnicodeString, L"\\ReactOSInitDone"); + RtlRosInitUnicodeStringFromLiteral(&UnicodeString, L"\\ReactOSInitDone"); InitializeObjectAttributes(&ObjectAttributes, &UnicodeString, EVENT_ALL_ACCESS, @@ -925,7 +926,7 @@ InitSessionManager(HANDLE Children[]) DPRINT("SM: initializing csrss\n"); /* Run csrss.exe */ - RtlInitUnicodeStringFromLiteral(&UnicodeString, + RtlRosInitUnicodeStringFromLiteral(&UnicodeString, L"\\CsrssInitDone"); InitializeObjectAttributes(&ObjectAttributes, &UnicodeString, @@ -1036,7 +1037,7 @@ InitSessionManager(HANDLE Children[]) Children[CHILD_WINLOGON] = ProcessInfo.ProcessHandle; /* Create the \DbgSsApiPort object (LPC) */ - RtlInitUnicodeStringFromLiteral(&UnicodeString, + RtlRosInitUnicodeStringFromLiteral(&UnicodeString, L"\\DbgSsApiPort"); InitializeObjectAttributes(&ObjectAttributes, &UnicodeString, @@ -1059,7 +1060,7 @@ InitSessionManager(HANDLE Children[]) #endif /* Create the \DbgUiApiPort object (LPC) */ - RtlInitUnicodeStringFromLiteral(&UnicodeString, + RtlRosInitUnicodeStringFromLiteral(&UnicodeString, L"\\DbgUiApiPort"); InitializeObjectAttributes(&ObjectAttributes, &UnicodeString, diff --git a/reactos/subsys/smss/smapi.c b/reactos/subsys/smss/smapi.c index 75211ac534d..fca6c8297d9 100644 --- a/reactos/subsys/smss/smapi.c +++ b/reactos/subsys/smss/smapi.c @@ -1,4 +1,4 @@ -/* $Id: smapi.c,v 1.9 2002/09/08 10:23:46 chorns Exp $ +/* $Id: smapi.c,v 1.10 2003/11/17 02:12:51 hyperion Exp $ * * Reactos Session Manager * @@ -8,6 +8,7 @@ #include #include #include +#include #include "smss.h" @@ -78,7 +79,7 @@ SmCreateApiPort(VOID) UNICODE_STRING UnicodeString; NTSTATUS Status; - RtlInitUnicodeStringFromLiteral(&UnicodeString, + RtlRosInitUnicodeStringFromLiteral(&UnicodeString, L"\\SmApiPort"); InitializeObjectAttributes(&ObjectAttributes, &UnicodeString, diff --git a/reactos/subsys/system/services/database.c b/reactos/subsys/system/services/database.c index ceadcf3d414..85d9417c00d 100644 --- a/reactos/subsys/system/services/database.c +++ b/reactos/subsys/system/services/database.c @@ -1,4 +1,4 @@ -/* $Id: database.c,v 1.11 2003/11/14 17:13:33 weiden Exp $ +/* $Id: database.c,v 1.12 2003/11/17 02:12:51 hyperion Exp $ * * service control manager * @@ -27,6 +27,7 @@ #define NTOS_MODE_USER #include +#include #include #include @@ -247,7 +248,7 @@ ScmCreateServiceDataBase(VOID) if (!NT_SUCCESS(Status)) return(Status); - RtlInitUnicodeStringFromLiteral(&ServicesKeyName, + RtlRosInitUnicodeStringFromLiteral(&ServicesKeyName, L"\\Registry\\Machine\\System\\CurrentControlSet\\Services"); InitializeObjectAttributes(&ObjectAttributes, @@ -329,12 +330,12 @@ ScmCheckDriver(PSERVICE Service) if (Service->Type == SERVICE_KERNEL_DRIVER) { - RtlInitUnicodeStringFromLiteral(&DirName, + RtlRosInitUnicodeStringFromLiteral(&DirName, L"\\Driver"); } else { - RtlInitUnicodeStringFromLiteral(&DirName, + RtlRosInitUnicodeStringFromLiteral(&DirName, L"\\FileSystem"); } diff --git a/reactos/subsys/system/usetup/registry.c b/reactos/subsys/system/usetup/registry.c index a3311f131f4..e45813da456 100644 --- a/reactos/subsys/system/usetup/registry.c +++ b/reactos/subsys/system/usetup/registry.c @@ -28,6 +28,7 @@ #include #include +#include #include "usetup.h" #include "registry.h" @@ -614,7 +615,7 @@ SetInstallPathValue(PUNICODE_STRING InstallPath) NTSTATUS Status; /* Create the 'secret' InstallPath key */ - RtlInitUnicodeStringFromLiteral (&KeyName, + RtlRosInitUnicodeStringFromLiteral (&KeyName, L"\\Registry\\Machine\\HARDWARE"); InitializeObjectAttributes (&ObjectAttributes, &KeyName, @@ -630,7 +631,7 @@ SetInstallPathValue(PUNICODE_STRING InstallPath) return FALSE; } - RtlInitUnicodeStringFromLiteral (&ValueName, + RtlRosInitUnicodeStringFromLiteral (&ValueName, L"InstallPath"); Status = NtSetValueKey (KeyHandle, &ValueName, diff --git a/reactos/subsys/win32k/misc/driver.c b/reactos/subsys/win32k/misc/driver.c index 5f2da037204..89ab462c5e3 100644 --- a/reactos/subsys/win32k/misc/driver.c +++ b/reactos/subsys/win32k/misc/driver.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: driver.c,v 1.31 2003/11/07 17:40:02 gvg Exp $ +/* $Id: driver.c,v 1.32 2003/11/17 02:12:52 hyperion Exp $ * * GDI Driver support routines * (mostly swiped from Wine) @@ -33,6 +33,7 @@ #include #include #include +#include #define NDEBUG #include @@ -245,7 +246,7 @@ PDEVICE_OBJECT DRIVER_FindMPDriver(LPCWSTR Name) PFILE_OBJECT VideoFileObject; PDEVICE_OBJECT VideoDeviceObject; - RtlInitUnicodeStringFromLiteral(&DeviceName, L"\\??\\DISPLAY1"); + RtlRosInitUnicodeStringFromLiteral(&DeviceName, L"\\??\\DISPLAY1"); InitializeObjectAttributes(&ObjectAttributes, &DeviceName, 0, diff --git a/reactos/subsys/win32k/ntuser/input.c b/reactos/subsys/win32k/ntuser/input.c index fdab8237763..7873dd4ba49 100644 --- a/reactos/subsys/win32k/ntuser/input.c +++ b/reactos/subsys/win32k/ntuser/input.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: input.c,v 1.18 2003/11/11 22:17:18 weiden Exp $ +/* $Id: input.c,v 1.19 2003/11/17 02:12:52 hyperion Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -40,6 +40,7 @@ #include #include #include +#include #define NDEBUG #include @@ -64,7 +65,7 @@ KeyboardThreadMain(PVOID StartContext) IO_STATUS_BLOCK Iosb; NTSTATUS Status; - RtlInitUnicodeStringFromLiteral(&KeyboardDeviceName, L"\\??\\Keyboard"); + RtlRosInitUnicodeStringFromLiteral(&KeyboardDeviceName, L"\\??\\Keyboard"); InitializeObjectAttributes(&KeyboardObjectAttributes, &KeyboardDeviceName, 0, @@ -265,7 +266,7 @@ InitInputImpl(VOID) * Failures here don't result in a failure return, the system must be * able to operate without mouse */ - RtlInitUnicodeStringFromLiteral(&MouseDeviceName, L"\\??\\MouseClass"); + RtlRosInitUnicodeStringFromLiteral(&MouseDeviceName, L"\\??\\MouseClass"); InitializeObjectAttributes(&MouseObjectAttributes, &MouseDeviceName, 0, diff --git a/reactos/subsys/win32k/ntuser/winsta.c b/reactos/subsys/win32k/ntuser/winsta.c index bc3808c6e91..9abc6a96330 100644 --- a/reactos/subsys/win32k/ntuser/winsta.c +++ b/reactos/subsys/win32k/ntuser/winsta.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: winsta.c,v 1.42 2003/11/11 22:17:18 weiden Exp $ +/* $Id: winsta.c,v 1.43 2003/11/17 02:12:52 hyperion Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -50,6 +50,7 @@ #include #include #include +#include #define NDEBUG #include @@ -145,7 +146,7 @@ InitWindowStationImpl(VOID) /* * Create the '\Windows\WindowStations' directory */ - RtlInitUnicodeStringFromLiteral(&UnicodeString, + RtlRosInitUnicodeStringFromLiteral(&UnicodeString, WINSTA_ROOT_NAME); InitializeObjectAttributes(&ObjectAttributes, -- 2.17.1