Author: jimtabor
Date: Sat Jan 3 23:06:14 2009
New Revision: 38543
URL:
http://svn.reactos.org/svn/reactos?rev=38543&view=rev
Log:
- Implement large ansi unicode string support. Not sure if we need to add it in win32k.
Added:
trunk/reactos/dll/win32/user32/misc/rtlstr.c (with props)
Modified:
trunk/reactos/dll/win32/user32/user32.rbuild
trunk/reactos/include/reactos/probe.h
trunk/reactos/include/reactos/win32k/ntuser.h
Added: trunk/reactos/dll/win32/user32/misc/rtlstr.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/misc/rtls…
==============================================================================
--- trunk/reactos/dll/win32/user32/misc/rtlstr.c (added)
+++ trunk/reactos/dll/win32/user32/misc/rtlstr.c [iso-8859-1] Sat Jan 3 23:06:14 2009
@@ -1,0 +1,65 @@
+/*
+ * PROJECT: ReactOS user32.dll
+ * FILE: lib/user32/misc/rtlstr.c
+ * PURPOSE: Large Strings
+ * PROGRAMMER:
+ * UPDATE HISTORY:
+ *
+ */
+
+/* INCLUDES ******************************************************************/
+
+#include <user32.h>
+
+#include <wine/debug.h>
+
+WINE_DEFAULT_DEBUG_CHANNEL(user32);
+
+/* FUNCTIONS *****************************************************************/
+VOID
+NTAPI
+RtlInitLargeAnsiString(IN OUT PLARGE_ANSI_STRING DestinationString,
+ IN PCSZ SourceString,
+ IN INT Unknown)
+{
+ ULONG DestSize;
+
+ if (SourceString)
+ {
+ DestSize = strlen(SourceString);
+ DestinationString->Length = DestSize;
+ DestinationString->MaximumLength = DestSize + sizeof(CHAR);
+ }
+ else
+ {
+ DestinationString->Length = 0;
+ DestinationString->MaximumLength = 0;
+ }
+
+ DestinationString->Buffer = (PCHAR)SourceString;
+ DestinationString->bAnsi = TRUE;
+}
+
+VOID
+NTAPI
+RtlInitLargeUnicodeString(IN OUT PLARGE_UNICODE_STRING DestinationString,
+ IN PCWSTR SourceString,
+ IN INT Unknown)
+{
+ ULONG DestSize;
+
+ if (SourceString)
+ {
+ DestSize = wcslen(SourceString) * sizeof(WCHAR);
+ DestinationString->Length = DestSize;
+ DestinationString->MaximumLength = DestSize + sizeof(WCHAR);
+ }
+ else
+ {
+ DestinationString->Length = 0;
+ DestinationString->MaximumLength = 0;
+ }
+
+ DestinationString->Buffer = (PWSTR)SourceString;
+ DestinationString->bAnsi = FALSE;
+}
Propchange: trunk/reactos/dll/win32/user32/misc/rtlstr.c
------------------------------------------------------------------------------
svn:eol-style = native
Modified: trunk/reactos/dll/win32/user32/user32.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/user32.rb…
==============================================================================
--- trunk/reactos/dll/win32/user32/user32.rbuild [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/user32.rbuild [iso-8859-1] Sat Jan 3 23:06:14 2009
@@ -40,6 +40,7 @@
<file>misc.c</file>
<file>object.c</file>
<file>resources.c</file>
+ <file>rtlstr.c</file>
<file>stubs.c</file>
<file>timer.c</file>
<file>winhelp.c</file>
Modified: trunk/reactos/include/reactos/probe.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/probe.h?re…
==============================================================================
--- trunk/reactos/include/reactos/probe.h [iso-8859-1] (original)
+++ trunk/reactos/include/reactos/probe.h [iso-8859-1] Sat Jan 3 23:06:14 2009
@@ -48,6 +48,7 @@
#define ProbeForWriteLargeInteger(Ptr)
ProbeForWriteGenericType(&((PLARGE_INTEGER)Ptr)->QuadPart, LONGLONG)
#define ProbeForWriteUlargeInteger(Ptr)
ProbeForWriteGenericType(&((PULARGE_INTEGER)Ptr)->QuadPart, ULONGLONG)
#define ProbeForWriteUnicodeString(Ptr) ProbeForWriteGenericType((PUNICODE_STRING)Ptr,
UNICODE_STRING)
+#define ProbeForWriteLargeString(Ptr) ProbeForWriteGenericType((PLARGE_STRING)Ptr,
LARGE_STRING)
#define ProbeForWriteIoStatusBlock(Ptr) ProbeForWriteGenericType((PIO_STATUS_BLOCK)Ptr,
IO_STATUS_BLOCK)
#define ProbeForReadGenericType(Ptr, Type, Default) \
@@ -74,6 +75,7 @@
#define ProbeForReadLargeInteger(Ptr) ProbeForReadGenericType((const LARGE_INTEGER
*)(Ptr), LARGE_INTEGER, __emptyLargeInteger)
#define ProbeForReadUlargeInteger(Ptr) ProbeForReadGenericType((const ULARGE_INTEGER
*)(Ptr), ULARGE_INTEGER, __emptyULargeInteger)
#define ProbeForReadUnicodeString(Ptr) ProbeForReadGenericType((const UNICODE_STRING
*)(Ptr), UNICODE_STRING, __emptyUnicodeString)
+#define ProbeForReadLargeString(Ptr) ProbeForReadGenericType((const LARGE_STRING *)(Ptr),
LARGE_STRING, __emptyLargeString)
#define ProbeForReadIoStatusBlock(Ptr) ProbeForReadGenericType((const IO_STATUS_BLOCK
*)(Ptr), IO_STATUS_BLOCK, __emptyIoStatusBlock)
#define ProbeAndZeroHandle(Ptr) \
Modified: trunk/reactos/include/reactos/win32k/ntuser.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/win32k/ntu…
==============================================================================
--- trunk/reactos/include/reactos/win32k/ntuser.h [iso-8859-1] (original)
+++ trunk/reactos/include/reactos/win32k/ntuser.h [iso-8859-1] Sat Jan 3 23:06:14 2009
@@ -4,6 +4,36 @@
struct _W32PROCESSINFO;
struct _W32THREADINFO;
struct _WINDOW;
+
+typedef struct _LARGE_UNICODE_STRING
+{
+ ULONG Length;
+ ULONG MaximumLength:31;
+ ULONG bAnsi:1;
+ PWSTR Buffer;
+} LARGE_UNICODE_STRING, *PLARGE_UNICODE_STRING;
+
+typedef struct _LARGE_STRING
+{
+ ULONG Length;
+ ULONG MaximumLength:31;
+ ULONG bAnsi:1;
+ PVOID Buffer;
+} LARGE_STRING, *PLARGE_STRING;
+//
+// Based on ANSI_STRING
+//
+typedef struct _LARGE_ANSI_STRING
+{
+ ULONG Length;
+ ULONG MaximumLength:31;
+ ULONG bAnsi:1;
+ PCHAR Buffer;
+} LARGE_ANSI_STRING, *PLARGE_ANSI_STRING;
+
+VOID NTAPI RtlInitLargeAnsiString(IN OUT PLARGE_ANSI_STRING,IN PCSZ,IN INT);
+VOID NTAPI RtlInitLargeUnicodeString(IN OUT PLARGE_UNICODE_STRING,IN PCWSTR,IN INT);
+
/* FIXME: UserHMGetHandle needs to be updated once the new handle manager is implemented
*/
#define UserHMGetHandle(obj) ((obj)->hdr.Handle)
@@ -1086,9 +1116,9 @@
NTAPI
NtUserCreateWindowEx(
DWORD dwExStyle,
- PLARGE_UNICODE_STRING plustrClassName,
- PLARGE_UNICODE_STRING plustrClsVesrion,
- PLARGE_UNICODE_STRING plustrWindowName,
+ PLARGE_STRING plstrClassName,
+ PLARGE_STRING plstrClsVesrion,
+ PLARGE_STRING plstrWindowName,
DWORD dwStyle,
int x,
int y,