Moved and renamed some ReactOS specific macros

svn path=/trunk/; revision=6672
This commit is contained in:
KJK::Hyperion 2003-11-17 02:12:52 +00:00
parent 8da4aa2712
commit 40e2bff3e7
83 changed files with 466 additions and 390 deletions

View file

@ -3,6 +3,7 @@
#include <stdio.h>
#include <windows.h>
#include <ddk/ntddk.h>
#include <rosrtl/string.h>
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;

View file

@ -3,6 +3,7 @@
#include <stdio.h>
#include <windows.h>
#include <ddk/ntddk.h>
#include <rosrtl/string.h>
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) {

View file

@ -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 <ddk/ntddk.h>
#include <rosrtl/string.h>
#include <windows.h>
#include <napi/lpc.h>
#include <stdarg.h>
@ -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;

View file

@ -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 <ddk/ntddk.h>
#include <rosrtl/string.h>
#include <windows.h>
#include <napi/lpc.h>
#include <stdarg.h>
@ -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;

View file

@ -3,6 +3,7 @@
#include <stdio.h>
#include <windows.h>
#include <ddk/ntddk.h>
#include <rosrtl/string.h>
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) {

View file

@ -41,6 +41,7 @@ Copyright notice:
#include <ddk/ntddkbd.h>
#include <ddk/ntdd8042.h>
#include <rosrtl/string.h>
////////////////////////////////////////////////////
// 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;

View file

@ -47,6 +47,7 @@ Copyright notice:
#include <ddk/ntddk.h>
#include <debug.h>
#include <rosrtl/string.h>
#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);

View file

@ -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 <ddk/ntddk.h>
#include <ddk/ntddbeep.h>
#include <rosrtl/string.h>
#define NDEBUG
#include <debug.h>
@ -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");

View file

@ -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 <roskrnl.h>
#include <ddk/ntddblue.h>
#include <rosrtl/string.h>
#include <string.h>
#include <defines.h>
@ -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");

View file

@ -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 <ddk/ntddk.h>
#include <ddk/ntbootvid.h>
#include <reactos/resource.h>
#include <rosrtl/string.h>
#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);

View file

@ -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 <ddk/ntddk.h>
#include <rosrtl/string.h>
/* 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))
{

View file

@ -19,7 +19,7 @@
#include "floppy.h"
#define NDEBUG
#include <debug.h>
#include <rosrtl/string.h>
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,

View file

@ -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 <ddk/ntddk.h>
#include <rosrtl/string.h>
#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
(

View file

@ -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 <ddk/ntddk.h>
#include <rosrtl/string.h>
#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");

View file

@ -1,6 +1,7 @@
#include <ntddk.h>
#include "ramdrv.h"
#include <debug.h>
#include <rosrtl/string.h>
#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,

View file

@ -1,4 +1,5 @@
#include <ntddk.h>
#include <rosrtl/string.h>
#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;

View file

@ -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 <ddk/ntddk.h>
#include <rosrtl/string.h>
#define NDEBUG
#include <debug.h>
@ -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");

View file

@ -10,6 +10,7 @@
/* INCLUDES *****************************************************************/
#include <ddk/ntddk.h>
#include <rosrtl/string.h>
//#define NDEBUG
#include <debug.h>
@ -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");

View file

@ -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 <ddk/ntddk.h>
#include <rosrtl/string.h>
#define NDEBUG
#include <debug.h>
@ -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))

View file

@ -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 <ddk/ntddk.h>
#include <rosrtl/string.h>
#define NDEBUG
#include <debug.h>
@ -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))

View file

@ -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 <ddk/ntddk.h>
#include <rosrtl/string.h>
#define NDEBUG
#include <debug.h>
@ -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))

View file

@ -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 <ddk/ntddk.h>
#include <rosrtl/minmax.h>
#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;

View file

@ -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 <ddk/ntddk.h>
#include <rosrtl/string.h>
//#define NDEBUG
#include <debug.h>
@ -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");

View file

@ -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 <ddk/ntddk.h>
#include <rosrtl/string.h>
#define NDEBUG
#include <debug.h>
@ -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");

View file

@ -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 <wchar.h>
#include <limits.h>
#include <ntos.h>
#include <rosrtl/string.h>
#define NDEBUG
#include <debug.h>
@ -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))

View file

@ -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 <ddk/ntddk.h>
#include <rosrtl/string.h>
#include <wchar.h>
#include <ntos.h>
@ -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)

View file

@ -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 <ddk/ntddk.h>
#include <rosrtl/string.h>
#define NDEBUG
#include <debug.h>
@ -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,

View file

@ -13,6 +13,7 @@
#include <string.h>
#include <ntos/keyboard.h>
#include <ntos/minmax.h>
#include <rosrtl/string.h>
#include <ddk/ntddkbd.h>
#include <ddk/ntdd8042.h>
@ -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");

View file

@ -13,6 +13,7 @@
#include <ddk/ntddk.h>
#include <ddk/ntddmou.h>
#include <rosrtl/string.h>
#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;

View file

@ -8,6 +8,7 @@
* CSH 01/09-2000 Created
*/
#include <afd.h>
#include <rosrtl/string.h>
#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,

View file

@ -15,6 +15,7 @@
#include <rawip.h>
#include <udp.h>
#include <tcp.h>
#include <rosrtl/string.h>
#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)) {

View file

@ -8,6 +8,7 @@
* CSH 01/09-2000 Created
*/
#include <wshtcpip.h>
#include <rosrtl/string.h>
#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:

View file

@ -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 <ddk/srb.h>
#include <ddk/scsi.h>
#include <ddk/ntddscsi.h>
#include <rosrtl/string.h>
#define NDEBUG
#include <debug.h>
@ -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,

View file

@ -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 (

View file

@ -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 */

View file

@ -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 */

View file

@ -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 <ntos.h>
#include <ddk/ntddk.h>
#include <rosrtl/string.h>
#include <ntdll/rtl.h>
#include <windows.h>
#include <wchar.h>
@ -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");

View file

@ -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;

View file

@ -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,

View file

@ -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
{

View file

@ -25,3 +25,4 @@
#include <csrss/csrss.h>
#include <reactos/buildno.h>
#include <rosrtl/thread.h>
#include <rosrtl/string.h>

View file

@ -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 \
}

View file

@ -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,

View file

@ -10,6 +10,7 @@
#include <string.h>
#include <msafd.h>
#include <helpers.h>
#include <rosrtl/string.h>
#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,

View file

@ -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 <ddk/ntddk.h>
#include <ntdll/csr.h>
#include <string.h>
#include <rosrtl/string.h>
#include <csrss/csrss.h>
@ -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;

View file

@ -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 <ddk/ntddk.h>
#include <ntdll/rtl.h>
#include <rosrtl/string.h>
#include <ntdll/dbg.h>
#include <napi/lpc.h>
@ -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;

View file

@ -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 <ddk/ntddk.h>
#include <ntdll/rtl.h>
#include <rosrtl/string.h>
#include <ntos/minmax.h>
#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))

View file

@ -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 <windows.h>
#include <ddk/ntddk.h>
#include <rosrtl/string.h>
#include <napi/lpc.h>
#include <lsass/lsass.h>
#include <string.h>
@ -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;

View file

@ -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 <roscfg.h>
#include <internal/ob.h>
#include <reactos/bugcodes.h>
#include <rosrtl/string.h>
#define NDEBUG
#include <internal/debug.h>
@ -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;

View file

@ -13,6 +13,7 @@
#include <internal/ob.h>
#include <ntos/minmax.h>
#include <reactos/bugcodes.h>
#include <rosrtl/string.h>
#define NDEBUG
#include <internal/debug.h>
@ -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;

View file

@ -9,6 +9,8 @@
/* INCLUDES *****************************************************************/
#include <ddk/ntddk.h>
#include <rosrtl/string.h>
#include <rosrtl/minmax.h>
#include <roscfg.h>
#include <limits.h>
#include <string.h>
@ -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,

View file

@ -40,6 +40,7 @@
#include <ntdll/ldr.h>
#include <internal/safe.h>
#include <internal/kd.h>
#include <rosrtl/string.h>
#define NDEBUG
#include <internal/debug.h>
@ -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)
{

View file

@ -28,6 +28,7 @@
#include <ddk/ntddk.h>
#include <internal/ex.h>
#include <internal/ob.h>
#include <rosrtl/string.h>
#include <wchar.h>
#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);
}

View file

@ -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 <roskrnl.h>
#include <ntos/bootvid.h>
#include <ddk/ntbootvid.h>
#include <rosrtl/string.h>
#define NDEBUG
#include <internal/debug.h>
@ -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,

View file

@ -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 <ddk/ntddk.h>
#include <rosrtl/string.h>
#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,

View file

@ -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 <internal/mm.h>
#include <internal/ke.h>
#include <internal/kd.h>
#include <rosrtl/string.h>
#include <roscfg.h>
@ -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,

View file

@ -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 <internal/ob.h>
#include <internal/io.h>
#include <internal/pool.h>
#include <rosrtl/string.h>
#define NDEBUG
#include <internal/debug.h>
@ -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);

View file

@ -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 <ddk/ntddk.h>
#include <reactos/bugcodes.h>
#include <internal/io.h>
#include <rosrtl/string.h>
#define NDEBUG
#include <internal/debug.h>
@ -452,7 +453,7 @@ PnpRootFdoEnumerateDevices(
return STATUS_INSUFFICIENT_RESOURCES;
}
RtlInitUnicodeStringFromLiteral(
RtlRosInitUnicodeStringFromLiteral(
&KeyName,
L"\\Registry\\Machine\\System\\CurrentControlSet\\Enum\\" \
ENUM_NAME_ROOT);

View file

@ -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 <ddk/ntddk.h>
#include <rosrtl/string.h>
#include <internal/debug.h>
@ -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,

View file

@ -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 <roscfg.h>
#include <internal/kd.h>
#include <ntos/minmax.h>
#include <rosrtl/string.h>
/* 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,

View file

@ -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 <internal/ps.h>
#include <internal/ldr.h>
#include <napi/teb.h>
#include <rosrtl/string.h>
#define NDEBUG
#include <internal/debug.h>
@ -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 */

View file

@ -18,6 +18,7 @@
#include <internal/ob.h>
#include <internal/ps.h>
#include <internal/ldr.h>
#include <rosrtl/string.h>
#define NDEBUG
#include <internal/debug.h>
@ -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;

View file

@ -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 <internal/port.h>
#include <internal/dbg.h>
#include <internal/pool.h>
#include <rosrtl/string.h>
#define NDEBUG
#include <internal/debug.h>
@ -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;

View file

@ -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 <napi/core.h>
#include <internal/ps.h>
#include <internal/ldr.h>
#include <rosrtl/string.h>
#define NDEBUG
#include <internal/debug.h>
@ -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)
{

View file

@ -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 <internal/cc.h>
#include <ddk/ntifs.h>
#include <ntos/minmax.h>
#include <rosrtl/string.h>
#define NDEBUG
#include <internal/debug.h>
@ -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;

View file

@ -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 <internal/ob.h>
#include <internal/io.h>
#include <internal/pool.h>
#include <rosrtl/string.h>
#define NDEBUG
#include <internal/debug.h>
@ -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,

View file

@ -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 <ntos.h>
#include <internal/ob.h>
#include <rosrtl/string.h>
#define NDEBUG
#include <internal/debug.h>
@ -185,7 +186,7 @@ ObInitSymbolicLinkImplementation (VOID)
ObSymbolicLinkType->Create = ObpCreateSymbolicLink;
ObSymbolicLinkType->DuplicationNotify = NULL;
RtlInitUnicodeStringFromLiteral(&ObSymbolicLinkType->TypeName,
RtlRosInitUnicodeStringFromLiteral(&ObSymbolicLinkType->TypeName,
L"SymbolicLink");
ObpCreateTypeObject(ObSymbolicLinkType);

View file

@ -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 <ddk/ntddk.h>
#include <internal/ps.h>
#include <rosrtl/string.h>
#define NDEBUG
#include <internal/debug.h>
@ -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");
}

View file

@ -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 <internal/se.h>
#include <internal/kd.h>
#include <internal/nls.h>
#include <rosrtl/string.h>
#define NDEBUG
#include <internal/debug.h>
@ -261,7 +262,7 @@ PsInitProcessManagment(VOID)
PsProcessType->Create = NULL;
PsProcessType->DuplicationNotify = NULL;
RtlInitUnicodeStringFromLiteral(&PsProcessType->TypeName, L"Process");
RtlRosInitUnicodeStringFromLiteral(&PsProcessType->TypeName, L"Process");
ObpCreateTypeObject(PsProcessType);

View file

@ -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;

View file

@ -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 <internal/pool.h>
#include <ntos/minmax.h>
#include <internal/ldr.h>
#include <rosrtl/string.h>
#define NDEBUG
#include <internal/debug.h>
@ -481,7 +482,7 @@ PsInitThreadManagment(VOID)
PsThreadType->Create = NULL;
PsThreadType->DuplicationNotify = NULL;
RtlInitUnicodeStringFromLiteral(&PsThreadType->TypeName, L"Thread");
RtlRosInitUnicodeStringFromLiteral(&PsThreadType->TypeName, L"Thread");
ObpCreateTypeObject(PsThreadType);

View file

@ -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 <ntos.h>
#include <napi/lpc.h>
#include <windows.h>
#include <rosrtl/string.h>
#include "eventlog.h"
@ -60,7 +61,7 @@ InitLogPort(VOID)
ConnectPortHandle = NULL;
MessagePortHandle = NULL;
RtlInitUnicodeStringFromLiteral(&PortName,
RtlRosInitUnicodeStringFromLiteral(&PortName,
L"\\ErrorLogPort");
InitializeObjectAttributes(&ObjectAttributes,
&PortName,

View file

@ -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 <ntdll/ldr.h>
#include <ddk/ntddblue.h>
#include <win32k/ntuser.h>
#include <rosrtl/string.h>
#include <rosrtl/minmax.h>
#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;

View file

@ -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 <ddk/ntddk.h>
#include <ntdll/rtl.h>
#include <csrss/csrss.h>
#include <rosrtl/string.h>
#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,

View file

@ -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 <ntdll/rtl.h>
#include <csrss/csrss.h>
#include <win32k/win32k.h>
#include <rosrtl/string.h>
#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 ) )

View file

@ -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 <ddk/ntddk.h>
#include <rosrtl/string.h>
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,

View file

@ -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 <ntdll/rtl.h>
#include <ntdll/ldr.h>
#include <napi/lpc.h>
#include <rosrtl/string.h>
#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,

View file

@ -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 <ddk/ntddk.h>
#include <ntdll/rtl.h>
#include <napi/lpc.h>
#include <rosrtl/string.h>
#include "smss.h"
@ -78,7 +79,7 @@ SmCreateApiPort(VOID)
UNICODE_STRING UnicodeString;
NTSTATUS Status;
RtlInitUnicodeStringFromLiteral(&UnicodeString,
RtlRosInitUnicodeStringFromLiteral(&UnicodeString,
L"\\SmApiPort");
InitializeObjectAttributes(&ObjectAttributes,
&UnicodeString,

View file

@ -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 <ntos.h>
#include <rosrtl/string.h>
#include <windows.h>
#include <tchar.h>
@ -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");
}

View file

@ -28,6 +28,7 @@
#include <ddk/ntddk.h>
#include <ntdll/rtl.h>
#include <rosrtl/string.h>
#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,

View file

@ -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 <wchar.h>
#include <ddk/winddi.h>
#include <ddk/ntddvid.h>
#include <rosrtl/string.h>
#define NDEBUG
#include <debug.h>
@ -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,

View file

@ -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/mouse.h>
#include <include/input.h>
#include <include/hotkey.h>
#include <rosrtl/string.h>
#define NDEBUG
#include <debug.h>
@ -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,

View file

@ -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/color.h>
#include <include/cursoricon.h>
#include <include/hotkey.h>
#include <rosrtl/string.h>
#define NDEBUG
#include <debug.h>
@ -145,7 +146,7 @@ InitWindowStationImpl(VOID)
/*
* Create the '\Windows\WindowStations' directory
*/
RtlInitUnicodeStringFromLiteral(&UnicodeString,
RtlRosInitUnicodeStringFromLiteral(&UnicodeString,
WINSTA_ROOT_NAME);
InitializeObjectAttributes(&ObjectAttributes,