#include <stdio.h>
#include <windows.h>
#include <ddk/ntddk.h>
+#include <rosrtl/string.h>
HANDLE OutputHandle;
HANDLE InputHandle;
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;
#include <stdio.h>
#include <windows.h>
#include <ddk/ntddk.h>
+#include <rosrtl/string.h>
HANDLE OutputHandle;
HANDLE InputHandle;
NTSTATUS Status;
dprintf("Create key '\\Registry\\Machine\\Software\\testkey':\n");
- RtlInitUnicodeStringFromLiteral(&KeyName,
+ RtlRosInitUnicodeStringFromLiteral(&KeyName,
L"\\Registry\\Machine\\Software\\testkey");
InitializeObjectAttributes(&ObjectAttributes,
&KeyName,
NTSTATUS Status;
dprintf("Delete key '\\Registry\\Machine\\Software\\testkey':\n");
- RtlInitUnicodeStringFromLiteral(&KeyName,
+ RtlRosInitUnicodeStringFromLiteral(&KeyName,
L"\\Registry\\Machine\\Software\\testkey");
InitializeObjectAttributes(&ObjectAttributes,
&KeyName,
KEY_BASIC_INFORMATION KeyInformation[5];
dprintf("Enumerate key '\\Registry\\Machine\\Software':\n");
- RtlInitUnicodeStringFromLiteral(&KeyName,
+ RtlRosInitUnicodeStringFromLiteral(&KeyName,
L"\\Registry\\Machine\\Software");
InitializeObjectAttributes(&ObjectAttributes,
&KeyName,
NTSTATUS Status;
dprintf("Create key '\\Registry\\Machine\\Software\\testkey':\n");
- RtlInitUnicodeStringFromLiteral(&KeyName,
+ RtlRosInitUnicodeStringFromLiteral(&KeyName,
L"\\Registry\\Machine\\Software\\testkey");
InitializeObjectAttributes(&ObjectAttributes,
&KeyName,
if (!NT_SUCCESS(Status))
return;
- RtlInitUnicodeStringFromLiteral(&ValueName,
+ RtlRosInitUnicodeStringFromLiteral(&ValueName,
L"TestValue");
dprintf("NtSetValueKey:\n");
Status = NtSetValueKey(hKey,
NTSTATUS Status;
dprintf("Create key '\\Registry\\Machine\\Software\\testkey':\n");
- RtlInitUnicodeStringFromLiteral(&KeyName,
+ RtlRosInitUnicodeStringFromLiteral(&KeyName,
L"\\Registry\\Machine\\Software\\testkey");
InitializeObjectAttributes(&ObjectAttributes,
&KeyName,
if (!NT_SUCCESS(Status))
return;
- RtlInitUnicodeStringFromLiteral(&ValueName,
+ RtlRosInitUnicodeStringFromLiteral(&ValueName,
L"TestValue");
dprintf("NtSetValueKey:\n");
Status = NtSetValueKey(hKey,
NTSTATUS Status;
dprintf("Open key '\\Registry\\Machine\\Software\\testkey':\n");
- RtlInitUnicodeStringFromLiteral(&KeyName,
+ RtlRosInitUnicodeStringFromLiteral(&KeyName,
L"\\Registry\\Machine\\Software\\testkey");
InitializeObjectAttributes(&ObjectAttributes,
&KeyName,
return;
dprintf("Delete value:\n");
- RtlInitUnicodeStringFromLiteral(&ValueName,
+ RtlRosInitUnicodeStringFromLiteral(&ValueName,
L"TestValue");
Status = NtDeleteValueKey(KeyHandle,
&ValueName);
NTSTATUS Status;
dprintf("Open key '\\Registry\\Machine\\Software\\testkey':\n");
- RtlInitUnicodeStringFromLiteral(&KeyName,
+ RtlRosInitUnicodeStringFromLiteral(&KeyName,
L"\\Registry\\Machine\\Software\\testkey");
InitializeObjectAttributes(&ObjectAttributes,
&KeyName,
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];
#if 0
dprintf("NtOpenKey \\Registry\\Machine : ");
- RtlInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine");
+ RtlRosInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine");
InitializeObjectAttributes(&ObjectAttributes,
&KeyName,
OBJ_CASE_INSENSITIVE,
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);
if(Status==0)
{
dprintf("NtQueryValueKey : ");
- RtlInitUnicodeStringFromLiteral(&KeyName, L"CmdLine");
+ RtlRosInitUnicodeStringFromLiteral(&KeyName, L"CmdLine");
Status=NtQueryValueKey(hKey,&KeyName,KeyValueFullInformation
,&KeyValueInformation[0], sizeof(KeyValueInformation)
,&Length);
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
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
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,
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,
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,
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,
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);
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
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))
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,
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))
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
dprintf("Query value\n");
dprintf(" Value: TestValue\n");
- RtlInitUnicodeStringFromLiteral(&ValueName, L"TestValue");
+ RtlRosInitUnicodeStringFromLiteral(&ValueName, L"TestValue");
Status=NtQueryValueKey(hKey,
&ValueName,
KeyValueFullInformation,
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,
}
dprintf("Delete link value\n");
- RtlInitUnicodeStringFromLiteral(&ValueName, L"SymbolicLinkValue");
+ RtlRosInitUnicodeStringFromLiteral(&ValueName, L"SymbolicLinkValue");
Status = NtDeleteValueKey(hKey,
&ValueName);
dprintf(" NtDeleteValueKey() called (Status %lx)\n",Status);
// 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);
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,
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);
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];
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,
//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) {
-/* $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>
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;
-/* $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>
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;
#include <stdio.h>
#include <windows.h>
#include <ddk/ntddk.h>
+#include <rosrtl/string.h>
HANDLE OutputHandle;
HANDLE InputHandle;
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];
NtClose(hKey);
dprintf("NtOpenKey \\Registry\\Machine : ");
- RtlInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine");
+ RtlRosInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine");
InitializeObjectAttributes(&ObjectAttributes,
&KeyName,
OBJ_CASE_INSENSITIVE,
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);
if(Status==0)
{
dprintf("NtQueryValueKey : ");
- RtlInitUnicodeStringFromLiteral(&KeyName, L"CmdLine");
+ RtlRosInitUnicodeStringFromLiteral(&KeyName, L"CmdLine");
Status=NtQueryValueKey(hKey,&KeyName,KeyValueFullInformation
,&KeyValueInformation[0], sizeof(KeyValueInformation)
,&Length);
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
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,
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,
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,
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,
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
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
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,
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,
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,
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,
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);
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
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))
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,
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))
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
dprintf("Query value\n");
dprintf(" Value: TestValue\n");
- RtlInitUnicodeStringFromLiteral(&ValueName, L"TestValue");
+ RtlRosInitUnicodeStringFromLiteral(&ValueName, L"TestValue");
Status=NtQueryValueKey(hKey,
&ValueName,
KeyValueFullInformation,
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,
}
dprintf("Delete link value\n");
- RtlInitUnicodeStringFromLiteral(&ValueName, L"SymbolicLinkValue");
+ RtlRosInitUnicodeStringFromLiteral(&ValueName, L"SymbolicLinkValue");
Status = NtDeleteValueKey(hKey,
&ValueName);
dprintf(" NtDeleteValueKey() called (Status %lx)\n",Status);
// 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);
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,
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);
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];
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,
//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) {
#include <ddk/ntddkbd.h>
#include <ddk/ntdd8042.h>
+#include <rosrtl/string.h>
////////////////////////////////////////////////////
// GLOBALS
{
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;
#include <ddk/ntddk.h>
#include <debug.h>
+#include <rosrtl/string.h>
#include "precomp.h"
#include "serial.h"
//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,
&DeviceObject);
DeviceObject->Flags = DeviceObject->Flags | DO_BUFFERED_IO;
- RtlInitUnicodeStringFromLiteral(&SymlinkName, L"\\??\\Pice");
+ RtlRosInitUnicodeStringFromLiteral(&SymlinkName, L"\\??\\Pice");
IoCreateSymbolicLink(&SymlinkName, &DeviceName);
return(STATUS_SUCCESS);
-/* $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
#include <ddk/ntddk.h>
#include <ddk/ntddbeep.h>
+#include <rosrtl/string.h>
#define NDEBUG
#include <debug.h>
{
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");
-/* $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
#include <roskrnl.h>
#include <ddk/ntddblue.h>
+#include <rosrtl/string.h>
#include <string.h>
#include <defines.h>
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");
-/* $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
#include <ddk/ntddk.h>
#include <ddk/ntbootvid.h>
#include <reactos/resource.h>
+#include <rosrtl/string.h>
#include "../../../ntoskrnl/include/internal/v86m.h"
/*
* Open the physical memory section
*/
- RtlInitUnicodeStringFromLiteral(&PhysMemName, L"\\Device\\PhysicalMemory");
+ RtlRosInitUnicodeStringFromLiteral(&PhysMemName, L"\\Device\\PhysicalMemory");
InitializeObjectAttributes(&ObjectAttributes,
&PhysMemName,
0,
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);
-/* $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
/* INCLUDES */
#include <ddk/ntddk.h>
+#include <rosrtl/string.h>
/* FUNCTIONS */
NTSTATUS STDCALL_FUNC
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);
return Status;
}
- RtlInitUnicodeStringFromLiteral(&DosName, L"\\DosDevices\\DebugOut");
+ RtlRosInitUnicodeStringFromLiteral(&DosName, L"\\DosDevices\\DebugOut");
Status = IoCreateSymbolicLink(&DosName, &DeviceName);
if (! NT_SUCCESS(Status))
{
#include "floppy.h"
#define NDEBUG
#include <debug.h>
-
+#include <rosrtl/string.h>
FLOPPY_CONTROLLER_PARAMETERS ControllerParameters[FLOPPY_MAX_CONTROLLERS] =
{
#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,
-/* $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
/* INCLUDES */
#include <ddk/ntddk.h>
+#include <rosrtl/string.h>
#include "null.h"
/* OBJECTS */
DriverObject->DriverUnload = (PDRIVER_UNLOAD)NullUnload;
/* create null device */
- RtlInitUnicodeStringFromLiteral(&wstrDeviceName, L"\\Device\\Null");
+ RtlRosInitUnicodeStringFromLiteral(&wstrDeviceName, L"\\Device\\Null");
nErrCode = IoCreateDevice
(
pdoNullDevice->DeviceExtension = (PVOID)&nxNull;
/* create zero device */
- RtlInitUnicodeStringFromLiteral(&wstrDeviceName, L"\\Device\\Zero");
+ RtlRosInitUnicodeStringFromLiteral(&wstrDeviceName, L"\\Device\\Zero");
nErrCode = IoCreateDevice
(
-/* $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
/* FUNCTIONS **************************************************************/
#include <ddk/ntddk.h>
+#include <rosrtl/string.h>
#include "parallel.h"
*/
{
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");
#include <ntddk.h>
#include "ramdrv.h"
#include <debug.h>
+#include <rosrtl/string.h>
#include "../../lib/bzip2/bzlib.h"
NTSTATUS STDCALL RamdrvDispatchDeviceControl(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;
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,
#include <ntddk.h>
+#include <rosrtl/string.h>
#include "vgavideo.h"
#define NDEBUG
{
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;
* 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
/* INCLUDES *****************************************************************/
#include <ddk/ntddk.h>
+#include <rosrtl/string.h>
#define NDEBUG
#include <debug.h>
{
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");
/* INCLUDES *****************************************************************/
#include <ddk/ntddk.h>
+#include <rosrtl/string.h>
//#define NDEBUG
#include <debug.h>
{
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");
* 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
/* INCLUDES *****************************************************************/
#include <ddk/ntddk.h>
+#include <rosrtl/string.h>
#define NDEBUG
#include <debug.h>
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))
* 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
/* INCLUDES *****************************************************************/
#include <ddk/ntddk.h>
+#include <rosrtl/string.h>
#define NDEBUG
#include <debug.h>
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))
* 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
/* INCLUDES *****************************************************************/
#include <ddk/ntddk.h>
+#include <rosrtl/string.h>
#define NDEBUG
#include <debug.h>
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))
-/* $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
/* INCLUDES ******************************************************************/
#include <ddk/ntddk.h>
+#include <rosrtl/minmax.h>
#include "npfs.h"
#define NDEBUG
/* 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);
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;
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);
{
if (Length > 0)
{
- CopyLength = RtlMin(Length, Fcb->WriteQuotaAvailable);
+ CopyLength = RtlRosMin(Length, Fcb->WriteQuotaAvailable);
memcpy(Buffer, Fcb->Data, CopyLength);
Information = CopyLength;
* 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
/* INCLUDES *****************************************************************/
#include <ddk/ntddk.h>
+#include <rosrtl/string.h>
//#define NDEBUG
#include <debug.h>
{
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");
* 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
/* INCLUDES *****************************************************************/
#include <ddk/ntddk.h>
+#include <rosrtl/string.h>
#define NDEBUG
#include <debug.h>
{
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");
-/* $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
#include <wchar.h>
#include <limits.h>
#include <ntos.h>
+#include <rosrtl/string.h>
#define NDEBUG
#include <debug.h>
NTSTATUS Status = STATUS_SUCCESS;
UNICODE_STRING NameU;
- RtlInitUnicodeStringFromLiteral(&NameU, L"\\");
+ RtlRosInitUnicodeStringFromLiteral(&NameU, L"\\");
FCB = vfatNewFCB(&NameU);
memset(FCB->entry.Filename, ' ', 11);
PVFATFCB FCB;
UNICODE_STRING NameU;
- RtlInitUnicodeStringFromLiteral(&NameU, L"\\");
+ RtlRosInitUnicodeStringFromLiteral(&NameU, L"\\");
FCB = vfatGrabFCBFromTable (pVCB, &NameU);
if (FCB == NULL)
pFCB,
pFileNameU);
- RtlInitUnicodeStringFromLiteral(&RootNameU, L"\\");
+ RtlRosInitUnicodeStringFromLiteral(&RootNameU, L"\\");
// Trivial case, open of the root directory on volume
if (RtlEqualUnicodeString(pFileNameU, &RootNameU, FALSE))
* 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
/* INCLUDES *****************************************************************/
#include <ddk/ntddk.h>
+#include <rosrtl/string.h>
#include <wchar.h>
#include <ntos.h>
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)
{
ExInitializeResourceLite(&DeviceExt->FatResource);
InitializeListHead(&DeviceExt->FcbListHead);
- RtlInitUnicodeStringFromLiteral(&NameU, L"\\$$Volume$$");
+ RtlRosInitUnicodeStringFromLiteral(&NameU, L"\\$$Volume$$");
VolumeFcb = vfatNewFCB(&NameU);
if (VolumeFcb == NULL)
* 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
/* INCLUDES *****************************************************************/
#include <ddk/ntddk.h>
+#include <rosrtl/string.h>
#define NDEBUG
#include <debug.h>
*/
{
PDEVICE_OBJECT DeviceObject;
- UNICODE_STRING DeviceName = UNICODE_STRING_INITIALIZER(L"\\Fat");
+ UNICODE_STRING DeviceName = ROS_STRING_INITIALIZER(L"\\Fat");
NTSTATUS Status;
Status = IoCreateDevice(DriverObject,
#include <string.h>
#include <ntos/keyboard.h>
#include <ntos/minmax.h>
+#include <rosrtl/string.h>
#include <ddk/ntddkbd.h>
#include <ddk/ntdd8042.h>
*/
{
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");
#include <ddk/ntddk.h>
#include <ddk/ntddmou.h>
+#include <rosrtl/string.h>
#include "mouclass.h"
#define NDEBUG
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;
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;
* CSH 01/09-2000 Created
*/
#include <afd.h>
+#include <rosrtl/string.h>
#ifdef DBG
{
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,
#include <rawip.h>
#include <udp.h>
#include <tcp.h>
+#include <rosrtl/string.h>
#ifdef DBG
DWORD DebugTraceLevel = MIN_TRACE;
/* 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)) {
}
/* 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)) {
}
/* 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)) {
}
/* 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)) {
* CSH 01/09-2000 Created
*/
#include <wshtcpip.h>
+#include <rosrtl/string.h>
#ifdef DBG
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:
* 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
#include <ddk/srb.h>
#include <ddk/scsi.h>
#include <ddk/ntddscsi.h>
+#include <rosrtl/string.h>
#define NDEBUG
#include <debug.h>
}
/* Open or create the 'Scsi' subkey */
- RtlInitUnicodeStringFromLiteral(&KeyName,
+ RtlRosInitUnicodeStringFromLiteral(&KeyName,
L"\\Registry\\Machine\\Hardware\\DeviceMap\\Scsi");
InitializeObjectAttributes(&ObjectAttributes,
&KeyName,
-/* $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 $
*
*/
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 (
--- /dev/null
+/* $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 */
--- /dev/null
+/* $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 */
-/* $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
#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>
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");
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");
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");
{
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");
-/* $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
/* 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;
-/* $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
Value.MaximumLength = (nBufferLength - 1) * sizeof(WCHAR);
Value.Buffer = lpBuffer;
- RtlInitUnicodeStringFromLiteral (&Name,
+ RtlRosInitUnicodeStringFromLiteral (&Name,
L"TMP");
Status = RtlQueryEnvironmentVariable_U (NULL,
&Value);
if (!NT_SUCCESS(Status) && Status != STATUS_BUFFER_TOO_SMALL)
{
- RtlInitUnicodeStringFromLiteral (&Name,
+ RtlRosInitUnicodeStringFromLiteral (&Name,
L"TEMP");
Status = RtlQueryEnvironmentVariable_U (NULL,
-/* $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
/* change pattern: "*.*" --> "*" */
if (!wcscmp (SearchPattern, L"*.*"))
{
- RtlInitUnicodeStringFromLiteral(&PatternStr, L"*");
+ RtlRosInitUnicodeStringFromLiteral(&PatternStr, L"*");
}
else
{
#include <csrss/csrss.h>
#include <reactos/buildno.h>
#include <rosrtl/thread.h>
+#include <rosrtl/string.h>
-/* $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
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 */
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;
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;
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;
/* FUNCTIONS */
#define COMMDCB_PARAM(__P__) \
{ \
- UNICODE_STRING_INITIALIZER(_L(#__P__)), \
+ ROS_STRING_INITIALIZER(_L(#__P__)), \
(ULONG_PTR)&COMMDCB_ ## __P__ ## Param \
}
-/* $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
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,
#include <string.h>
#include <msafd.h>
#include <helpers.h>
+#include <rosrtl/string.h>
#ifdef DBG
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,
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,
-/* $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
#include <ddk/ntddk.h>
#include <ntdll/csr.h>
#include <string.h>
+#include <rosrtl/string.h>
#include <csrss/csrss.h>
{
return(Status);
}
- RtlInitUnicodeStringFromLiteral(&PortName, L"\\Windows\\ApiPort");
+ RtlRosInitUnicodeStringFromLiteral(&PortName, L"\\Windows\\ApiPort");
ConnectInfoLength = 0;
LpcWrite.Length = sizeof(LPC_SECTION_WRITE);
LpcWrite.SectionHandle = CsrSectionHandle;
-/* $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
#include <ddk/ntddk.h>
#include <ntdll/rtl.h>
+#include <rosrtl/string.h>
#include <ntdll/dbg.h>
#include <napi/lpc.h>
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);
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;
-/* $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
#include <ddk/ntddk.h>
#include <ntdll/rtl.h>
+#include <rosrtl/string.h>
#include <ntos/minmax.h>
#define NDEBUG
{
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))
-/* $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
#include <windows.h>
#include <ddk/ntddk.h>
+#include <rosrtl/string.h>
#include <napi/lpc.h>
#include <lsass/lsass.h>
#include <string.h>
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;
-/* $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
#include <roscfg.h>
#include <internal/ob.h>
#include <reactos/bugcodes.h>
+#include <rosrtl/string.h>
#define NDEBUG
#include <internal/debug.h>
DPRINT("Link target '%S'\n", TargetNameBuffer);
- RtlInitUnicodeStringFromLiteral(&LinkName,
+ RtlRosInitUnicodeStringFromLiteral(&LinkName,
L"\\Registry\\Machine\\SYSTEM\\CurrentControlSet");
InitializeObjectAttributes(&ObjectAttributes,
&LinkName,
return(Status);
}
- RtlInitUnicodeStringFromLiteral(&LinkValue,
+ RtlRosInitUnicodeStringFromLiteral(&LinkValue,
L"SymbolicLinkValue");
Status = NtSetValueKey(KeyHandle,
&LinkValue,
NTSTATUS Status;
/* Create 'ControlSet001' key */
- RtlInitUnicodeStringFromLiteral (&ControlSetKeyName,
+ RtlRosInitUnicodeStringFromLiteral (&ControlSetKeyName,
L"\\Registry\\Machine\\SYSTEM\\ControlSet001");
InitializeObjectAttributes (&ObjectAttributes,
&ControlSetKeyName,
NtClose (KeyHandle);
/* Link 'CurrentControlSet' to 'ControlSet001' key */
- RtlInitUnicodeStringFromLiteral (&ControlSetLinkName,
+ RtlRosInitUnicodeStringFromLiteral (&ControlSetLinkName,
L"\\Registry\\Machine\\SYSTEM\\CurrentControlSet");
InitializeObjectAttributes (&ObjectAttributes,
&ControlSetLinkName,
return Status;
}
- RtlInitUnicodeStringFromLiteral (&ControlSetValueName,
+ RtlRosInitUnicodeStringFromLiteral (&ControlSetValueName,
L"SymbolicLinkValue");
Status = NtSetValueKey (KeyHandle,
&ControlSetValueName,
if (SetupBoot == TRUE)
{
- RtlInitUnicodeStringFromLiteral(&KeyName,
+ RtlRosInitUnicodeStringFromLiteral(&KeyName,
L"\\Registry\\Machine\\HARDWARE");
InitializeObjectAttributes(&ObjectAttributes,
&KeyName,
return(Status);
}
- RtlInitUnicodeStringFromLiteral(&ValueName,
+ RtlRosInitUnicodeStringFromLiteral(&ValueName,
L"InstallPath");
BufferSize = sizeof(KEY_VALUE_PARTIAL_INFORMATION) + 4096;
#include <internal/ob.h>
#include <ntos/minmax.h>
#include <reactos/bugcodes.h>
+#include <rosrtl/string.h>
#define NDEBUG
#include <internal/debug.h>
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;
/* INCLUDES *****************************************************************/
#include <ddk/ntddk.h>
+#include <rosrtl/string.h>
+#include <rosrtl/minmax.h>
#include <roscfg.h>
#include <limits.h>
#include <string.h>
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);
}
else
{
- ValueString->Length = RtlMin(SourceString->Length,
+ ValueString->Length = RtlRosMin(SourceString->Length,
ValueString->MaximumLength - sizeof(WCHAR));
memcpy(ValueString->Buffer,
SourceString->Buffer,
break;
ValueString->Buffer[0] = 0;
}
- ValueString->Length = RtlMin(ValueInfo->DataLength,
+ ValueString->Length = RtlRosMin(ValueInfo->DataLength,
ValueString->MaximumLength) - sizeof(WCHAR);
memcpy(ValueString->Buffer,
ValueInfo->Data,
#include <ntdll/ldr.h>
#include <internal/safe.h>
#include <internal/kd.h>
+#include <rosrtl/string.h>
#define NDEBUG
#include <internal/debug.h>
* is created after their module entries
*/
- RtlInitUnicodeStringFromLiteral(&ModuleName, KERNEL_MODULE_NAME);
+ RtlRosInitUnicodeStringFromLiteral(&ModuleName, KERNEL_MODULE_NAME);
ModuleObject = LdrGetModuleObject(&ModuleName);
if (ModuleObject != NULL)
{
&ModuleObject->TextSection->SymbolInfo);
}
- RtlInitUnicodeStringFromLiteral(&ModuleName, HAL_MODULE_NAME);
+ RtlRosInitUnicodeStringFromLiteral(&ModuleName, HAL_MODULE_NAME);
ModuleObject = LdrGetModuleObject(&ModuleName);
if (ModuleObject != NULL)
{
#include <ddk/ntddk.h>
#include <internal/ex.h>
#include <internal/ob.h>
+#include <rosrtl/string.h>
#include <wchar.h>
#define NDEBUG
ExWindowStationObjectType->OkayToClose = NULL;
ExWindowStationObjectType->Create = ExpWinStaObjectCreate;
ExWindowStationObjectType->DuplicationNotify = NULL;
- RtlInitUnicodeStringFromLiteral(&ExWindowStationObjectType->TypeName, L"WindowStation");
+ RtlRosInitUnicodeStringFromLiteral(&ExWindowStationObjectType->TypeName, L"WindowStation");
ObpCreateTypeObject(ExWindowStationObjectType);
ExDesktopObjectType->OkayToClose = NULL;
ExDesktopObjectType->Create = ExpDesktopObjectCreate;
ExDesktopObjectType->DuplicationNotify = NULL;
- RtlInitUnicodeStringFromLiteral(&ExDesktopObjectType->TypeName, L"Desktop");
+ RtlRosInitUnicodeStringFromLiteral(&ExDesktopObjectType->TypeName, L"Desktop");
ObpCreateTypeObject(ExDesktopObjectType);
}
-/* $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
#include <roskrnl.h>
#include <ntos/bootvid.h>
#include <ddk/ntbootvid.h>
+#include <rosrtl/string.h>
#define NDEBUG
#include <internal/debug.h>
OBJECT_ATTRIBUTES ObjectAttributes;
UNICODE_STRING BootVidName;
- RtlInitUnicodeStringFromLiteral(&BootVidName, L"\\Device\\BootVid");
+ RtlRosInitUnicodeStringFromLiteral(&BootVidName, L"\\Device\\BootVid");
InitializeObjectAttributes(&ObjectAttributes,
&BootVidName,
0,
* 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
/* INCLUDES *****************************************************************/
#include <ddk/ntddk.h>
+#include <rosrtl/string.h>
#include "internal/io.h"
#include "internal/xhal.h"
DPRINT("DeviceName: %wZ\n", &DeviceName);
/* create the '\SystemRoot' link */
- RtlInitUnicodeStringFromLiteral(&LinkName,
+ RtlRosInitUnicodeStringFromLiteral(&LinkName,
L"\\SystemRoot");
Status = IoCreateSymbolicLink(&LinkName,
-/* $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
#include <internal/mm.h>
#include <internal/ke.h>
#include <internal/kd.h>
+#include <rosrtl/string.h>
#include <roscfg.h>
IoDriverObjectType->OkayToClose = NULL;
IoDriverObjectType->Create = IopCreateDriver;
IoDriverObjectType->DuplicationNotify = NULL;
- RtlInitUnicodeStringFromLiteral(&IoDriverObjectType->TypeName, L"Driver");
+ RtlRosInitUnicodeStringFromLiteral(&IoDriverObjectType->TypeName, L"Driver");
ObpCreateTypeObject(IoDriverObjectType);
}
return(Status);
/* Enumerate services and create the service list */
- RtlInitUnicodeStringFromLiteral(&ServicesKeyName,
+ RtlRosInitUnicodeStringFromLiteral(&ServicesKeyName,
L"\\Registry\\Machine\\System\\CurrentControlSet\\Services");
InitializeObjectAttributes(&ObjectAttributes,
-/* $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
#include <internal/ob.h>
#include <internal/io.h>
#include <internal/pool.h>
+#include <rosrtl/string.h>
#define NDEBUG
#include <internal/debug.h>
IoDeviceObjectType->Create = IopCreateDevice;
IoDeviceObjectType->DuplicationNotify = NULL;
- RtlInitUnicodeStringFromLiteral(&IoDeviceObjectType->TypeName, L"Device");
+ RtlRosInitUnicodeStringFromLiteral(&IoDeviceObjectType->TypeName, L"Device");
ObpCreateTypeObject(IoDeviceObjectType);
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,
/*
* Create the '\FileSystem' object directory
*/
- RtlInitUnicodeStringFromLiteral(&DirName,
+ RtlRosInitUnicodeStringFromLiteral(&DirName,
L"\\FileSystem");
InitializeObjectAttributes(&ObjectAttributes,
&DirName,
/*
* Create the '\Device' directory
*/
- RtlInitUnicodeStringFromLiteral(&DirName,
+ RtlRosInitUnicodeStringFromLiteral(&DirName,
L"\\Device");
InitializeObjectAttributes(&ObjectAttributes,
&DirName,
/*
* Create the '\??' directory
*/
- RtlInitUnicodeStringFromLiteral(&DirName,
+ RtlRosInitUnicodeStringFromLiteral(&DirName,
L"\\??");
InitializeObjectAttributes(&ObjectAttributes,
&DirName,
/*
* Create the '\ArcName' directory
*/
- RtlInitUnicodeStringFromLiteral(&DirName,
+ RtlRosInitUnicodeStringFromLiteral(&DirName,
L"\\ArcName");
InitializeObjectAttributes(&ObjectAttributes,
&DirName,
/*
* Create link from '\DosDevices' to '\??' directory
*/
- RtlInitUnicodeStringFromLiteral(&LinkName,
+ RtlRosInitUnicodeStringFromLiteral(&LinkName,
L"\\DosDevices");
- RtlInitUnicodeStringFromLiteral(&DirName,
+ RtlRosInitUnicodeStringFromLiteral(&DirName,
L"\\??");
IoCreateSymbolicLink(&LinkName,
&DirName);
-/* $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
#include <ddk/ntddk.h>
#include <reactos/bugcodes.h>
#include <internal/io.h>
+#include <rosrtl/string.h>
#define NDEBUG
#include <internal/debug.h>
return STATUS_INSUFFICIENT_RESOURCES;
}
- RtlInitUnicodeStringFromLiteral(
+ RtlRosInitUnicodeStringFromLiteral(
&KeyName,
L"\\Registry\\Machine\\System\\CurrentControlSet\\Enum\\" \
ENUM_NAME_ROOT);
* 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
/* INCLUDES *****************************************************************/
#include <ddk/ntddk.h>
+#include <rosrtl/string.h>
#include <internal/debug.h>
HANDLE DescriptionKey;
/* Open/Create 'RESOURCEMAP' key. */
- RtlInitUnicodeStringFromLiteral(&Name,
+ RtlRosInitUnicodeStringFromLiteral(&Name,
L"\\Registry\\Machine\\HARDWARE\\RESOURCEMAP");
InitializeObjectAttributes(&ObjectAttributes,
&Name,
return(Status);
/* Open/Create 'Hardware Abstraction Layer' key */
- RtlInitUnicodeStringFromLiteral(&Name,
+ RtlRosInitUnicodeStringFromLiteral(&Name,
L"Hardware Abstraction Layer");
InitializeObjectAttributes(&ObjectAttributes,
&Name,
return(Status);
/* Add '.Raw' value. */
- RtlInitUnicodeStringFromLiteral(&Name,
+ RtlRosInitUnicodeStringFromLiteral(&Name,
L".Raw");
Status = NtSetValueKey(DescriptionKey,
&Name,
}
/* Add '.Translated' value. */
- RtlInitUnicodeStringFromLiteral(&Name,
+ RtlRosInitUnicodeStringFromLiteral(&Name,
L".Translated");
Status = NtSetValueKey(DescriptionKey,
&Name,
-/* $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
#include <roscfg.h>
#include <internal/kd.h>
#include <ntos/minmax.h>
+#include <rosrtl/string.h>
/* GLOBALS *******************************************************************/
UNICODE_STRING FileName;
IO_STATUS_BLOCK Iosb;
- RtlInitUnicodeStringFromLiteral(&FileName, L"\\SystemRoot\\debug.log");
+ RtlRosInitUnicodeStringFromLiteral(&FileName, L"\\SystemRoot\\debug.log");
InitializeObjectAttributes(&ObjectAttributes,
&FileName,
0,
* 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
#include <internal/ps.h>
#include <internal/ldr.h>
#include <napi/teb.h>
+#include <rosrtl/string.h>
#define NDEBUG
#include <internal/debug.h>
NTSTATUS Status;
/* Get the absolute path to smss.exe. */
- RtlInitUnicodeStringFromLiteral(&ImagePath,
+ RtlRosInitUnicodeStringFromLiteral(&ImagePath,
L"\\SystemRoot\\system32\\smss.exe");
/* Map process image */
#include <internal/ob.h>
#include <internal/ps.h>
#include <internal/ldr.h>
+#include <rosrtl/string.h>
#define NDEBUG
#include <internal/debug.h>
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;
-/* $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
#include <internal/port.h>
#include <internal/dbg.h>
#include <internal/pool.h>
+#include <rosrtl/string.h>
#define NDEBUG
#include <internal/debug.h>
{
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;
* 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
#include <napi/core.h>
#include <internal/ps.h>
#include <internal/ldr.h>
+#include <rosrtl/string.h>
#define NDEBUG
#include <internal/debug.h>
}
/* Load the diskdump driver. */
- RtlInitUnicodeStringFromLiteral(&DiskDumpName, L"DiskDump");
+ RtlRosInitUnicodeStringFromLiteral(&DiskDumpName, L"DiskDump");
ModuleObject = LdrGetModuleObject(&DiskDumpName);
if (ModuleObject == NULL)
{
* 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
#include <internal/cc.h>
#include <ddk/ntifs.h>
#include <ntos/minmax.h>
+#include <rosrtl/string.h>
#define NDEBUG
#include <internal/debug.h>
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;
/*
{
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;
-/* $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
#include <internal/ob.h>
#include <internal/io.h>
#include <internal/pool.h>
+#include <rosrtl/string.h>
#define NDEBUG
#include <internal/debug.h>
ObDirectoryType->Create = ObpCreateDirectory;
ObDirectoryType->DuplicationNotify = NULL;
- RtlInitUnicodeStringFromLiteral(&ObDirectoryType->TypeName,
+ RtlRosInitUnicodeStringFromLiteral(&ObDirectoryType->TypeName,
L"Directory");
/* create 'type' object type*/
ObTypeObjectType->Create = NULL;
ObTypeObjectType->DuplicationNotify = NULL;
- RtlInitUnicodeStringFromLiteral(&ObTypeObjectType->TypeName,
+ RtlRosInitUnicodeStringFromLiteral(&ObTypeObjectType->TypeName,
L"ObjectType");
/* create root directory */
(PVOID*)&NameSpaceRoot);
/* create '\ObjectTypes' directory */
- RtlInitUnicodeStringFromLiteral(&Name,
+ RtlRosInitUnicodeStringFromLiteral(&Name,
L"\\ObjectTypes");
InitializeObjectAttributes(&ObjectAttributes,
&Name,
-/* $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
#define NTOS_MODE_KERNEL
#include <ntos.h>
#include <internal/ob.h>
+#include <rosrtl/string.h>
#define NDEBUG
#include <internal/debug.h>
ObSymbolicLinkType->Create = ObpCreateSymbolicLink;
ObSymbolicLinkType->DuplicationNotify = NULL;
- RtlInitUnicodeStringFromLiteral(&ObSymbolicLinkType->TypeName,
+ RtlRosInitUnicodeStringFromLiteral(&ObSymbolicLinkType->TypeName,
L"SymbolicLink");
ObpCreateTypeObject(ObSymbolicLinkType);
-/* $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
#include <ddk/ntddk.h>
#include <internal/ps.h>
+#include <rosrtl/string.h>
#define NDEBUG
#include <internal/debug.h>
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,
}
/* read default thread locale */
- RtlInitUnicodeStringFromLiteral(&KeyName,
+ RtlRosInitUnicodeStringFromLiteral(&KeyName,
L"\\Registry\\User\\.Default\\Control Panel\\International");
- RtlInitUnicodeStringFromLiteral(&ValueName,
+ RtlRosInitUnicodeStringFromLiteral(&ValueName,
L"Locale");
InitializeObjectAttributes(&ObjectAttributes,
&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");
}
-/* $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
#include <internal/se.h>
#include <internal/kd.h>
#include <internal/nls.h>
+#include <rosrtl/string.h>
#define NDEBUG
#include <internal/debug.h>
PsProcessType->Create = NULL;
PsProcessType->DuplicationNotify = NULL;
- RtlInitUnicodeStringFromLiteral(&PsProcessType->TypeName, L"Process");
+ RtlRosInitUnicodeStringFromLiteral(&PsProcessType->TypeName, L"Process");
ObpCreateTypeObject(PsProcessType);
-/* $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
)
{
if (MajorVersion)
- *MajorVersion = KERNEL_VERSION_MAJOR;
+ *MajorVersion = 4;
if (MinorVersion)
- *MinorVersion = KERNEL_VERSION_MINOR;
+ *MinorVersion = 0;
if (BuildNumber)
*BuildNumber = NtBuildNumber;
-/* $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
#include <internal/pool.h>
#include <ntos/minmax.h>
#include <internal/ldr.h>
+#include <rosrtl/string.h>
#define NDEBUG
#include <internal/debug.h>
PsThreadType->Create = NULL;
PsThreadType->DuplicationNotify = NULL;
- RtlInitUnicodeStringFromLiteral(&PsThreadType->TypeName, L"Thread");
+ RtlRosInitUnicodeStringFromLiteral(&PsThreadType->TypeName, L"Thread");
ObpCreateTypeObject(PsThreadType);
* 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
#include <ntos.h>
#include <napi/lpc.h>
#include <windows.h>
+#include <rosrtl/string.h>
#include "eventlog.h"
ConnectPortHandle = NULL;
MessagePortHandle = NULL;
- RtlInitUnicodeStringFromLiteral(&PortName,
+ RtlRosInitUnicodeStringFromLiteral(&PortName,
L"\\ErrorLogPort");
InitializeObjectAttributes(&ObjectAttributes,
&PortName,
-/* $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
*
#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"
IO_STATUS_BLOCK Iosb;
CONSOLE_SCREEN_BUFFER_INFO ScrInfo;
- RtlInitUnicodeStringFromLiteral(&DeviceName, L"\\??\\BlueScreen");
+ RtlRosInitUnicodeStringFromLiteral(&DeviceName, L"\\??\\BlueScreen");
InitializeObjectAttributes(&ObjectAttributes,
&DeviceName,
0,
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;
}
{
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;
}
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;
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;
-/* $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
*
#include <ddk/ntddk.h>
#include <ntdll/rtl.h>
#include <csrss/csrss.h>
+#include <rosrtl/string.h>
#include "api.h"
argv[argc-1] = &(ArgBuffer[afterlastspace]);
}
- RtlInitUnicodeStringFromLiteral(&UnicodeString,
+ RtlRosInitUnicodeStringFromLiteral(&UnicodeString,
L"\\CsrssInitDone");
InitializeObjectAttributes(&ObjectAttributes,
&UnicodeString,
-/* $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
*
#include <ntdll/rtl.h>
#include <csrss/csrss.h>
#include <win32k/win32k.h>
+#include <rosrtl/string.h>
#include "api.h"
InitializeVideoAddressSpace();
- RtlInitUnicodeStringFromLiteral(&DeviceName, L"\\??\\DISPLAY1");
+ RtlRosInitUnicodeStringFromLiteral(&DeviceName, L"\\??\\DISPLAY1");
InitializeObjectAttributes(&ObjectAttributes,
&DeviceName,
0,
CsrInitVideo();
/* NEW NAMED PORT: \ApiPort */
- RtlInitUnicodeStringFromLiteral(&PortName, L"\\Windows\\ApiPort");
+ RtlRosInitUnicodeStringFromLiteral(&PortName, L"\\Windows\\ApiPort");
InitializeObjectAttributes(&ObAttributes,
&PortName,
0,
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 ) )
-/* $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)
/*
* Open the physical memory section
*/
- RtlInitUnicodeStringFromLiteral(&PhysMemName, L"\\Device\\PhysicalMemory");
+ RtlRosInitUnicodeStringFromLiteral(&PhysMemName, L"\\Device\\PhysicalMemory");
InitializeObjectAttributes(&ObjectAttributes,
&PhysMemName,
0,
-/* $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
*
#include <ntdll/rtl.h>
#include <ntdll/ldr.h>
#include <napi/lpc.h>
+#include <rosrtl/string.h>
#include "smss.h"
SharedUserData->NtSystemRoot);
/* Set SystemRoot = "C:\reactos" */
- RtlInitUnicodeStringFromLiteral(&EnvVariable,
+ RtlRosInitUnicodeStringFromLiteral(&EnvVariable,
L"SystemRoot");
RtlInitUnicodeString(&EnvValue,
ValueBuffer);
ValueBuffer[2] = 0;
/* Set SystemDrive = "C:" */
- RtlInitUnicodeStringFromLiteral(&EnvVariable,
+ RtlRosInitUnicodeStringFromLiteral(&EnvVariable,
L"SystemDrive");
RtlInitUnicodeString(&EnvValue,
ValueBuffer);
NTSTATUS Status;
/* Load kernel mode subsystem (aka win32k.sys) */
- RtlInitUnicodeStringFromLiteral(&ImageInfo.ModuleName,
+ RtlRosInitUnicodeStringFromLiteral(&ImageInfo.ModuleName,
L"\\SystemRoot\\system32\\win32k.sys");
Status = NtSetSystemInformation(SystemLoadAndCallImage,
UNICODE_STRING UnicodeString;
HANDLE ReactOSInitEvent;
- RtlInitUnicodeStringFromLiteral(&UnicodeString, L"\\ReactOSInitDone");
+ RtlRosInitUnicodeStringFromLiteral(&UnicodeString, L"\\ReactOSInitDone");
InitializeObjectAttributes(&ObjectAttributes,
&UnicodeString,
EVENT_ALL_ACCESS,
DPRINT("SM: initializing csrss\n");
/* Run csrss.exe */
- RtlInitUnicodeStringFromLiteral(&UnicodeString,
+ RtlRosInitUnicodeStringFromLiteral(&UnicodeString,
L"\\CsrssInitDone");
InitializeObjectAttributes(&ObjectAttributes,
&UnicodeString,
Children[CHILD_WINLOGON] = ProcessInfo.ProcessHandle;
/* Create the \DbgSsApiPort object (LPC) */
- RtlInitUnicodeStringFromLiteral(&UnicodeString,
+ RtlRosInitUnicodeStringFromLiteral(&UnicodeString,
L"\\DbgSsApiPort");
InitializeObjectAttributes(&ObjectAttributes,
&UnicodeString,
#endif
/* Create the \DbgUiApiPort object (LPC) */
- RtlInitUnicodeStringFromLiteral(&UnicodeString,
+ RtlRosInitUnicodeStringFromLiteral(&UnicodeString,
L"\\DbgUiApiPort");
InitializeObjectAttributes(&ObjectAttributes,
&UnicodeString,
-/* $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
*
#include <ddk/ntddk.h>
#include <ntdll/rtl.h>
#include <napi/lpc.h>
+#include <rosrtl/string.h>
#include "smss.h"
UNICODE_STRING UnicodeString;
NTSTATUS Status;
- RtlInitUnicodeStringFromLiteral(&UnicodeString,
+ RtlRosInitUnicodeStringFromLiteral(&UnicodeString,
L"\\SmApiPort");
InitializeObjectAttributes(&ObjectAttributes,
&UnicodeString,
-/* $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
*
#define NTOS_MODE_USER
#include <ntos.h>
+#include <rosrtl/string.h>
#include <windows.h>
#include <tchar.h>
if (!NT_SUCCESS(Status))
return(Status);
- RtlInitUnicodeStringFromLiteral(&ServicesKeyName,
+ RtlRosInitUnicodeStringFromLiteral(&ServicesKeyName,
L"\\Registry\\Machine\\System\\CurrentControlSet\\Services");
InitializeObjectAttributes(&ObjectAttributes,
if (Service->Type == SERVICE_KERNEL_DRIVER)
{
- RtlInitUnicodeStringFromLiteral(&DirName,
+ RtlRosInitUnicodeStringFromLiteral(&DirName,
L"\\Driver");
}
else
{
- RtlInitUnicodeStringFromLiteral(&DirName,
+ RtlRosInitUnicodeStringFromLiteral(&DirName,
L"\\FileSystem");
}
#include <ddk/ntddk.h>
#include <ntdll/rtl.h>
+#include <rosrtl/string.h>
#include "usetup.h"
#include "registry.h"
NTSTATUS Status;
/* Create the 'secret' InstallPath key */
- RtlInitUnicodeStringFromLiteral (&KeyName,
+ RtlRosInitUnicodeStringFromLiteral (&KeyName,
L"\\Registry\\Machine\\HARDWARE");
InitializeObjectAttributes (&ObjectAttributes,
&KeyName,
return FALSE;
}
- RtlInitUnicodeStringFromLiteral (&ValueName,
+ RtlRosInitUnicodeStringFromLiteral (&ValueName,
L"InstallPath");
Status = NtSetValueKey (KeyHandle,
&ValueName,
* 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)
#include <wchar.h>
#include <ddk/winddi.h>
#include <ddk/ntddvid.h>
+#include <rosrtl/string.h>
#define NDEBUG
#include <debug.h>
PFILE_OBJECT VideoFileObject;
PDEVICE_OBJECT VideoDeviceObject;
- RtlInitUnicodeStringFromLiteral(&DeviceName, L"\\??\\DISPLAY1");
+ RtlRosInitUnicodeStringFromLiteral(&DeviceName, L"\\??\\DISPLAY1");
InitializeObjectAttributes(&ObjectAttributes,
&DeviceName,
0,
* 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
#include <include/mouse.h>
#include <include/input.h>
#include <include/hotkey.h>
+#include <rosrtl/string.h>
#define NDEBUG
#include <debug.h>
IO_STATUS_BLOCK Iosb;
NTSTATUS Status;
- RtlInitUnicodeStringFromLiteral(&KeyboardDeviceName, L"\\??\\Keyboard");
+ RtlRosInitUnicodeStringFromLiteral(&KeyboardDeviceName, L"\\??\\Keyboard");
InitializeObjectAttributes(&KeyboardObjectAttributes,
&KeyboardDeviceName,
0,
* 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,
* 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
#include <include/color.h>
#include <include/cursoricon.h>
#include <include/hotkey.h>
+#include <rosrtl/string.h>
#define NDEBUG
#include <debug.h>
/*
* Create the '\Windows\WindowStations' directory
*/
- RtlInitUnicodeStringFromLiteral(&UnicodeString,
+ RtlRosInitUnicodeStringFromLiteral(&UnicodeString,
WINSTA_ROOT_NAME);
InitializeObjectAttributes(&ObjectAttributes,