Modified: trunk/reactos/lib/kernel32/file/find.c
Modified: trunk/reactos/lib/kernel32/k32.h
Modified: trunk/reactos/lib/kernel32/misc/comm.c
Modified: trunk/reactos/lib/kernel32/misc/computername.c
Modified: trunk/reactos/lib/kernel32/misc/dllmain.c
Modified: trunk/reactos/lib/kernel32/misc/lang.c
--- trunk/reactos/lib/kernel32/file/find.c 2005-06-20 04:07:49 UTC (rev 16134)
+++ trunk/reactos/lib/kernel32/file/find.c 2005-06-20 04:18:03 UTC (rev 16135)
@@ -94,7 +94,7 @@
PKERNEL32_FIND_FILE_DATA IData;
IO_STATUS_BLOCK IoStatusBlock;
UNICODE_STRING NtPathU;
- UNICODE_STRING PatternStr;
+ UNICODE_STRING PatternStr = RTL_CONSTANT_STRING(L"*");
NTSTATUS Status;
PWSTR e1, e2;
WCHAR CurrentDir[256];
@@ -234,12 +234,8 @@
}
/* change pattern: "*.*" --> "*" */
- if (!wcscmp (SearchPattern, L"*.*"))
+ if (wcscmp (SearchPattern, L"*.*"))
{
- RtlRosInitUnicodeStringFromLiteral(&PatternStr, L"*");
- }
- else
- {
RtlInitUnicodeString(&PatternStr, SearchPattern);
}
--- trunk/reactos/lib/kernel32/k32.h 2005-06-20 04:07:49 UTC (rev 16134)
+++ trunk/reactos/lib/kernel32/k32.h 2005-06-20 04:18:03 UTC (rev 16135)
@@ -34,7 +34,6 @@
/* FIXME: KILL ROSRTL */
#include <rosrtl/thread.h>
-#include <rosrtl/string.h>
#include <rosrtl/registry.h>
/* Internal Kernel32 Header */
--- trunk/reactos/lib/kernel32/misc/comm.c 2005-06-20 04:07:49 UTC (rev 16134)
+++ trunk/reactos/lib/kernel32/misc/comm.c 2005-06-20 04:18:03 UTC (rev 16135)
@@ -210,8 +210,8 @@
BOOL bRetVal;
ULONG_PTR nValue;
static COMMDCB_PARAM_STRFLAG a_BoolFlags[] = {
- { ROS_STRING_INITIALIZER(L"off"), FALSE },
- { ROS_STRING_INITIALIZER(L"on"), TRUE }
+ { RTL_CONSTANT_STRING(L"off"), FALSE },
+ { RTL_CONSTANT_STRING(L"on"), TRUE }
};
/* try to recognize the next flag as a boolean */
@@ -339,9 +339,9 @@
BOOL bRetVal;
ULONG_PTR nValue;
static COMMDCB_PARAM_STRFLAG a_DTRFlags[] = {
- { ROS_STRING_INITIALIZER(L"hs"), DTR_CONTROL_HANDSHAKE },
- { ROS_STRING_INITIALIZER(L"off"), DTR_CONTROL_DISABLE },
- { ROS_STRING_INITIALIZER(L"on"), DTR_CONTROL_ENABLE }
+ { RTL_CONSTANT_STRING(L"hs"), DTR_CONTROL_HANDSHAKE },
+ { RTL_CONSTANT_STRING(L"off"), DTR_CONTROL_DISABLE },
+ { RTL_CONSTANT_STRING(L"on"), DTR_CONTROL_ENABLE }
};
(void)Timeouts;
@@ -450,10 +450,10 @@
DWORD nRetVal;
ULONG_PTR nValue;
static COMMDCB_PARAM_STRFLAG a_RTSFlags[] = {
- { 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 }
+ { RTL_CONSTANT_STRING(L"hs"), RTS_CONTROL_HANDSHAKE },
+ { RTL_CONSTANT_STRING(L"off"), RTS_CONTROL_DISABLE },
+ { RTL_CONSTANT_STRING(L"on"), RTS_CONTROL_ENABLE },
+ { RTL_CONSTANT_STRING(L"tg"), RTS_CONTROL_TOGGLE }
};
(void)Timeouts;
@@ -480,9 +480,9 @@
BOOL bRetVal;
ULONG_PTR nValue;
static COMMDCB_PARAM_STRFLAG a_StopFlags[] = {
- { ROS_STRING_INITIALIZER(L"1"), ONESTOPBIT },
- { ROS_STRING_INITIALIZER(L"1.5"), ONE5STOPBITS },
- { ROS_STRING_INITIALIZER(L"2"), TWOSTOPBITS }
+ { RTL_CONSTANT_STRING(L"1"), ONESTOPBIT },
+ { RTL_CONSTANT_STRING(L"1.5"), ONE5STOPBITS },
+ { RTL_CONSTANT_STRING(L"2"), TWOSTOPBITS }
};
(void)Timeouts;
@@ -572,7 +572,7 @@
/* FUNCTIONS */
#define COMMDCB_PARAM(__P__) \
{ \
- ROS_STRING_INITIALIZER( L""#__P__ ), \
+ RTL_CONSTANT_STRING( L""#__P__ ), \
(ULONG_PTR)&COMMDCB_ ## __P__ ## Param \
}
--- trunk/reactos/lib/kernel32/misc/computername.c 2005-06-20 04:07:49 UTC (rev 16134)
+++ trunk/reactos/lib/kernel32/misc/computername.c 2005-06-20 04:18:03 UTC (rev 16135)
@@ -144,7 +144,9 @@
case ComputerNameDnsFullyQualified:
RtlInitUnicodeString(&Dot,L".");
- RosInitializeString(&ResultString,0,*nSize * sizeof(WCHAR),lpBuffer);
+ RtlInitUnicodeString(&ResultString, NULL);
+ ResultString.Length = *nSize * sizeof(WCHAR);
+ ResultString.MaximumLength = *nSize * sizeof(WCHAR);
RtlInitUnicodeString(&RegKey,
L"\\Registry\\Machine\\System"
L"\\CurrentControlSet\\Services\\Tcpip"
--- trunk/reactos/lib/kernel32/misc/dllmain.c 2005-06-20 04:07:49 UTC (rev 16134)
+++ trunk/reactos/lib/kernel32/misc/dllmain.c 2005-06-20 04:18:03 UTC (rev 16135)
@@ -47,7 +47,7 @@
OpenBaseDirectory(PHANDLE DirHandle)
{
OBJECT_ATTRIBUTES ObjectAttributes;
- UNICODE_STRING Name = ROS_STRING_INITIALIZER(L"\\BaseNamedObjects");
+ UNICODE_STRING Name = RTL_CONSTANT_STRING(L"\\BaseNamedObjects");
NTSTATUS Status;
InitializeObjectAttributes(&ObjectAttributes,
--- trunk/reactos/lib/kernel32/misc/lang.c 2005-06-20 04:07:49 UTC (rev 16134)
+++ trunk/reactos/lib/kernel32/misc/lang.c 2005-06-20 04:18:03 UTC (rev 16135)
@@ -293,7 +293,8 @@
{
NTSTATUS result;
HANDLE langKey;
- UNICODE_STRING langKeyName;
+ UNICODE_STRING langKeyName = RTL_CONSTANT_STRING(
+ L"\\Registry\\Machine\\System\\CurrentControlSet\\Control\\Nls\\Locale");
OBJECT_ATTRIBUTES objectAttributes;
ULONG index, length;
unsigned char fullInfo[sizeof(KEY_VALUE_FULL_INFORMATION)+255*2]; //FIXME: MAX_PATH*2
@@ -314,9 +315,6 @@
// Open language registry key
//FIXME: Should we use critical section here?
- RtlRosInitUnicodeStringFromLiteral(&langKeyName,
- L"\\Registry\\Machine\\System\\CurrentControlSet\\Control\\Nls\\Locale");
-
InitializeObjectAttributes(&objectAttributes,
&langKeyName,
OBJ_CASE_INSENSITIVE,