Started NLS support and improved Rtl string functions.

svn path=/trunk/; revision=771
This commit is contained in:
Eric Kohl 1999-11-15 16:02:50 +00:00
parent c114003cb5
commit 85a3f3844c
17 changed files with 2249 additions and 865 deletions

View file

@ -1,4 +1,4 @@
/* $Id: rtl.h,v 1.16 1999/10/31 22:44:39 ea Exp $
/* $Id: rtl.h,v 1.17 1999/11/15 15:55:00 ekohl Exp $
*
*/
@ -16,7 +16,7 @@ typedef struct _CONTROLLER_OBJECT
ULONG Spare1;
LARGE_INTEGER Spare2;
} CONTROLLER_OBJECT, *PCONTROLLER_OBJECT;
typedef struct _STRING
{
USHORT Length;
@ -54,6 +54,12 @@ typedef struct _TIME_FIELDS
CSHORT Weekday;
} TIME_FIELDS, *PTIME_FIELDS;
typedef struct _RTL_BITMAP
{
ULONG SizeOfBitMap;
PULONG Buffer;
} RTL_BITMAP, *PRTL_BITMAP;
/*
* PURPOSE: Flags for RtlQueryRegistryValues
*/
@ -102,6 +108,19 @@ enum
RTL_REGISTRY_VALUE,
};
#if defined(__NTOSKRNL__) || defined(__NTDLL__)
#define NLS_MB_CODE_PAGE_TAG NlsMbCodePageTag
#define NLS_MB_OEM_CODE_PAGE_TAG NlsMbOemCodePageTag
#else
#define NLS_MB_CODE_PAGE_TAG (*NlsMbCodePageTag)
#define NLS_MB_OEM_CODE_PAGE_TAG (*NlsMbOemCodePageTag)
#endif /* __NTOSKRNL__ || __NTDLL__ */
extern BOOLEAN NLS_MB_CODE_PAGE_TAG;
extern BOOLEAN NLS_MB_OEM_CODE_PAGE_TAG;
/*
* FUNCTION: Sets up a parameter of type OBJECT_ATTRIBUTES for a
* subsequent call to ZwCreateXXX or ZwOpenXXX
@ -170,12 +189,20 @@ RemoveTailList (
PLIST_ENTRY ListHead
);
WCHAR
STDCALL
RtlAnsiCharToUnicodeChar (
PCHAR AnsiChar
);
ULONG
STDCALL
RtlAnsiStringToUnicodeSize (
PANSI_STRING AnsiString
);
NTSTATUS
STDCALL
RtlAnsiStringToUnicodeString (
PUNICODE_STRING DestinationString,
PANSI_STRING SourceString,
@ -183,18 +210,35 @@ RtlAnsiStringToUnicodeString (
);
NTSTATUS
STDCALL
RtlAppendAsciizToString(
PSTRING Destination,
PCSZ Source
);
NTSTATUS
STDCALL
RtlAppendStringToString(
PSTRING Destination,
PSTRING Source
);
NTSTATUS
STDCALL
RtlAppendUnicodeStringToString (
PUNICODE_STRING Destination,
PUNICODE_STRING Source
);
NTSTATUS
STDCALL
RtlAppendUnicodeToString (
PUNICODE_STRING Destination,
PWSTR Source
);
NTSTATUS
STDCALL
RtlCharToInteger (
PCSZ String,
ULONG Base,
@ -209,6 +253,7 @@ RtlCheckRegistryKey (
);
ULONG
STDCALL
RtlCompareMemory (
PVOID Source1,
PVOID Source2,
@ -216,13 +261,15 @@ RtlCompareMemory (
);
LONG
STDCALL
RtlCompareString (
PSTRING String1,
PSTRING String2,
PSTRING String2,
BOOLEAN CaseInsensitive
);
LONG
STDCALL
RtlCompareUnicodeString (
PUNICODE_STRING String1,
PUNICODE_STRING String2,
@ -254,12 +301,14 @@ RtlCopyMemory (
);
VOID
STDCALL
RtlCopyString (
PSTRING DestinationString,
PSTRING SourceString
);
VOID
STDCALL
RtlCopyUnicodeString (
PUNICODE_STRING DestinationString,
PUNICODE_STRING SourceString
@ -278,6 +327,13 @@ RtlCreateSecurityDescriptor (
ULONG Revision
);
BOOLEAN
STDCALL
RtlCreateUnicodeString (
PUNICODE_STRING Destination,
PWSTR Source
);
NTSTATUS
STDCALL
RtlDeleteRegistryValue (
@ -306,6 +362,7 @@ RtlEnlargedUnsignedMultiply (
);
BOOLEAN
STDCALL
RtlEqualString (
PSTRING String1,
PSTRING String2,
@ -313,6 +370,7 @@ RtlEqualString (
);
BOOLEAN
STDCALL
RtlEqualUnicodeString (
PUNICODE_STRING String1,
PUNICODE_STRING String2,
@ -348,34 +406,61 @@ RtlFillMemory (
);
VOID
STDCALL
RtlFillMemoryUlong (
PVOID Destination,
ULONG Length,
ULONG Fill
);
VOID
STDCALL
RtlFreeAnsiString (
PANSI_STRING AnsiString
);
VOID
STDCALL
RtlFreeOemString (
PSTRING OemString
);
VOID
STDCALL
RtlFreeUnicodeString (
PUNICODE_STRING UnicodeString
);
VOID
STDCALL
RtlGetDefaultCodePage (
PUSHORT AnsiCodePage,
PUSHORT OemCodePage
);
VOID
STDCALL
RtlInitAnsiString (
PANSI_STRING DestinationString,
PCSZ SourceString
);
VOID
STDCALL
RtlInitString (
PSTRING DestinationString,
PCSZ SourceString
);
VOID
STDCALL
RtlInitUnicodeString (
PUNICODE_STRING DestinationString,
PCWSTR SourceString
);
NTSTATUS
STDCALL
RtlIntegerToUnicodeString (
ULONG Value,
ULONG Base,
@ -397,16 +482,6 @@ RtlLargeIntegerAnd (
/* MISSING FUNCTIONS GO HERE */
LARGE_INTEGER
RtlConvertLongToLargeInteger (
LONG SignedInteger
);
LARGE_INTEGER
RtlConvertUlongToLargeInteger (
ULONG UnsignedInteger
);
LARGE_INTEGER
RtlEnlargedIntegerMultiply (
LONG Multiplicand,
@ -581,11 +656,53 @@ RtlMoveMemory (
ULONG Length
);
NTSTATUS
STDCALL
RtlMultiByteToUnicodeN (
PWCHAR UnicodeString,
ULONG UnicodeSize,
PULONG ResultSize,
PCHAR MbString,
ULONG MbSize
);
NTSTATUS
STDCALL
RtlMultiByteToUnicodeSize (
PULONG UnicodeSize,
PCHAR MbString,
ULONG MbSize
);
ULONG
STDCALL
RtlOemStringToUnicodeSize (
PANSI_STRING AnsiString
);
NTSTATUS
STDCALL
RtlOemStringToUnicodeString (
PUNICODE_STRING DestinationString,
PANSI_STRING SourceString,
BOOLEAN AllocateDestinationString
);
NTSTATUS
STDCALL
RtlOemToUnicodeN (
PWCHAR UnicodeString,
ULONG UnicodeSize,
PULONG ResultSize,
PCHAR OemString,
ULONG OemSize
);
NTSTATUS
STDCALL
RtlQueryRegistryValues (
ULONG RelativeTo,
PWSTR Path,
PWSTR Path,
PRTL_QUERY_REGISTRY_TABLE QueryTable,
PVOID Context,
PVOID Environment
@ -664,10 +781,10 @@ typedef struct {
HANDLE
STDCALL
RtlCreateHeap (
ULONG Flags,
PVOID BaseAddress,
ULONG SizeToReserve,
ULONG SizeToCommit,
ULONG Flags,
PVOID BaseAddress,
ULONG SizeToReserve,
ULONG SizeToCommit,
PVOID Unknown,
PRTL_HEAP_DEFINITION Definition
);
@ -675,8 +792,8 @@ RtlCreateHeap (
PVOID
STDCALL
RtlAllocateHeap (
HANDLE Heap,
ULONG Flags,
HANDLE Heap,
ULONG Flags,
ULONG Size
);
@ -684,12 +801,19 @@ RtlAllocateHeap (
BOOLEAN
STDCALL
RtlFreeHeap (
HANDLE Heap,
ULONG Flags,
HANDLE Heap,
ULONG Flags,
PVOID Address
);
ULONG
STDCALL
RtlUnicodeStringToAnsiSize (
IN PUNICODE_STRING UnicodeString
);
NTSTATUS
STDCALL
RtlUnicodeStringToAnsiString (
IN OUT PANSI_STRING DestinationString,
IN PUNICODE_STRING SourceString,
@ -697,20 +821,65 @@ RtlUnicodeStringToAnsiString (
);
NTSTATUS
STDCALL
RtlUnicodeStringToInteger (
IN PUNICODE_STRING String,
IN ULONG Base,
OUT PULONG Value
);
ULONG
STDCALL
RtlUnicodeStringToOemSize (
IN PUNICODE_STRING UnicodeString
);
NTSTATUS
RtlUpcaseUnicodeString (
IN OUT PUNICODE_STRING DestinationString,
STDCALL
RtlUnicodeStringToOemString (
IN OUT PANSI_STRING DestinationString,
IN PUNICODE_STRING SourceString,
IN BOOLEAN AllocateDestinationString
);
NTSTATUS
STDCALL
RtlUnicodeToMultiByteN (
PCHAR MbString,
ULONG MbSize,
PULONG ResultSize,
PWCHAR UnicodeString,
ULONG UnicodeSize
);
NTSTATUS
STDCALL
RtlUnicodeToMultiByteSize (
PULONG MbSize,
PWCHAR UnicodeString,
ULONG UnicodeSize
);
NTSTATUS
STDCALL
RtlUnicodeToOemN (
PCHAR OemString,
ULONG OemSize,
PULONG ResultSize,
PWCHAR UnicodeString,
ULONG UnicodeSize
);
NTSTATUS
STDCALL
RtlUpcaseUnicodeString (
PUNICODE_STRING DestinationString,
PUNICODE_STRING SourceString,
BOOLEAN AllocateDestinationString
);
VOID
STDCALL
RtlUpperString (
PSTRING DestinationString,
PSTRING SourceString
@ -846,9 +1015,6 @@ RtlCreateUserProcess(PUNICODE_STRING ApplicationName,
PSECURITY_DESCRIPTOR ThreadSd,
WINBOOL bInheritHandles,
DWORD dwCreationFlags,
// LPVOID lpEnvironment,
// LPCWSTR lpCurrentDirectory,
// LPSTARTUPINFO lpStartupInfo,
PCLIENT_ID ClientId,
PHANDLE ProcessHandle,
PHANDLE ThreadHandle);

View file

@ -40,36 +40,19 @@
#endif
#define STATUS_REPARSE (0x00000104)
#define STATUS_MORE_ENTRIES (0x00000105)
#define STATUS_NOTIFY_ENUM_DIR (0x10C)
#define STATUS_NOT_ALL_ASSIGNED (0x00000106)
#define STATUS_SOME_NOT_MAPPED (0x00000107)
#define STATUS_OPLOCK_BREAK_IN_PROCESS (0x00000108)
#define STATUS_VOLUME_MOUNTED (0x00000109)
#define STATUS_RXACT_COMMITTED (0x0000010A)
#define STATUS_NOTIFY_CLEANUP (0x0000010B)
#define STATUS_NOTIFY_ENUM_DIR (0x0000010C)
#define STATUS_NO_QUOTAS_NO_ACCOUNT (0x0000010D)
#define STATUS_PRIMARY_TRANSPORT_CONNECT_FAILED (0x0000010E)
#define STATUS_OBJECT_EXISTS (0x40000000)
#define STATUS_THREAD_WAS_SUSPENDED (0x40000001)
#define STATUS_WORKING_SET_LIMIT_RANGE (0x40000002)
#define STATUS_UNSUCCESSFUL (0xC0000001)
#define STATUS_NOT_IMPLEMENTED (0xC0000002)
#define STATUS_INVALID_INFO_CLASS (0xC0000003)
#define STATUS_INFO_LENGTH_MISMATCH (0xC0000004)
#define STATUS_ACCESS_VIOLATION (0xC0000005)
#define STATUS_IN_PAGE_ERROR (0xC0000006)
#define STATUS_PAGEFILE_QUOTA (0xC0000007)
#define STATUS_INVALID_HANDLE (0xC0000008)
#define STATUS_BAD_INITIAL_STACK (0xC0000009)
#define STATUS_BAD_INITIAL_PC (0xC000000A)
#define STATUS_INVALID_CID (0xC000000B)
#define STATUS_TIMER_NOT_CANCELED (0xC000000C)
#define STATUS_INVALID_PARAMETER (0xC000000D)
#define STATUS_NO_SUCH_DEVICE (0xC000000E)
#define STATUS_NO_SUCH_FILE (0xC000000F)
#define STATUS_GUARD_PAGE_VIOLATION (0x80000001)
#define STATUS_DATATYPE_MISALIGNMENT (0x80000002)
#define STATUS_BREAKPOINT (0x80000003)
#define STATUS_SINGLE_STEP (0x80000004)
#define STATUS_BUFFER_OVERFLOW (0x80000005)
#define STATUS_NO_MORE_FILES (0x80000006)
#define STATUS_WAKE_SYSTEM_DEBUGGER (0x80000007)
#define STATUS_IMAGE_NOT_AT_BASE (0x40000003)
#define STATUS_RXACT_STATE_CREATED (0x40000004)
#define STATUS_SEGMENT_NOTIFICATION (0x40000005)
@ -109,6 +92,14 @@
#define STATUS_CARDBUS_NOT_SUPPORTED (0x40000027)
#define STATUS_WX86_CREATEWX86TIB (0x40000028)
#define STATUS_GUARD_PAGE_VIOLATION (0x80000001)
#define STATUS_DATATYPE_MISALIGNMENT (0x80000002)
#define STATUS_BREAKPOINT (0x80000003)
#define STATUS_SINGLE_STEP (0x80000004)
#define STATUS_BUFFER_OVERFLOW (0x80000005)
#define STATUS_NO_MORE_FILES (0x80000006)
#define STATUS_WAKE_SYSTEM_DEBUGGER (0x80000007)
#define STATUS_HANDLES_CLOSED (0x8000000A)
#define STATUS_NO_INHERITANCE (0x8000000B)
#define STATUS_GUID_SUBSTITUTION_MADE (0x8000000C)
@ -139,6 +130,21 @@
#define STATUS_ALREADY_DISCONNECTED (0x80000025)
#define STATUS_LONGJUMP (0x80000026)
#define STATUS_UNSUCCESSFUL (0xC0000001)
#define STATUS_NOT_IMPLEMENTED (0xC0000002)
#define STATUS_INVALID_INFO_CLASS (0xC0000003)
#define STATUS_INFO_LENGTH_MISMATCH (0xC0000004)
#define STATUS_ACCESS_VIOLATION (0xC0000005)
#define STATUS_IN_PAGE_ERROR (0xC0000006)
#define STATUS_PAGEFILE_QUOTA (0xC0000007)
#define STATUS_INVALID_HANDLE (0xC0000008)
#define STATUS_BAD_INITIAL_STACK (0xC0000009)
#define STATUS_BAD_INITIAL_PC (0xC000000A)
#define STATUS_INVALID_CID (0xC000000B)
#define STATUS_TIMER_NOT_CANCELED (0xC000000C)
#define STATUS_INVALID_PARAMETER (0xC000000D)
#define STATUS_NO_SUCH_DEVICE (0xC000000E)
#define STATUS_NO_SUCH_FILE (0xC000000F)
#define STATUS_INVALID_DEVICE_REQUEST (0xc0000010)
#define STATUS_END_OF_FILE (0xc0000011)
#define STATUS_WRONG_VOLUME (0xc0000012)
@ -155,7 +161,6 @@
#define STATUS_ILLEGAL_INSTRUCTION (0xc000001D)
#define STATUS_INVALID_LOCK_SEQUENCE (0xc000001E)
#define STATUS_INVALID_VIEW_SIZE (0xc000001F)
#define STATUS_INVALID_FILE_FOR_SECTION (0xc0000020)
#define STATUS_ALREADY_COMMITTED (0xc0000021)
#define STATUS_ACCESS_DENIED (0xc0000022)

View file

@ -1,4 +1,4 @@
; $Id: ntdll.def,v 1.21 1999/11/14 13:04:01 ariadne Exp $
; $Id: ntdll.def,v 1.22 1999/11/15 15:57:55 ekohl Exp $
;
; ReactOS Operating System
;
@ -6,6 +6,9 @@ LIBRARY ntdll.dll
EXPORTS
InitializeObjectAttributes
NlsAnsiCodePage
NlsMbCodePageTag
NlsMbOemCodePageTag
NtAcceptConnectPort@24
NtAccessCheck@32
NtAccessCheckAndAuditAlarm@44
@ -428,38 +431,42 @@ ZwW32Call@20
ZwYieldExecution@0
RtlAllocateHeap@12
RtlAnsiCharToUnicodeChar@4
RtlAnsiStringToUnicodeSize
RtlAnsiStringToUnicodeString
RtlAppendUnicodeStringToString
RtlAppendUnicodeToString
RtlCharToInteger
RtlAnsiStringToUnicodeSize@4
RtlAnsiStringToUnicodeString@12
RtlAppendUnicodeStringToString@12
RtlAppendUnicodeToString@12
RtlCharToInteger@12
RtlCreateHeap@24
RtlCreateUserProcess@32
RtlCreateUserThread@40
RtlCompactHeap@8
RtlCompareString
RtlCompareUnicodeString
RtlCompareString@12
RtlCompareUnicodeString@12
RtlConvertLongToLargeInteger
RtlConvertUlongToLargeInteger
RtlCopyString
RtlCopyUnicodeString
RtlCopyString@8
RtlCopyUnicodeString@8
RtlDestroyHeap@4
RtlEnlargedIntegerMultiply
RtlEnlargedUnsignedDivide
RtlEnlargedUnsignedMultiply
RtlEqualString
RtlEqualUnicodeString
RtlEqualString@12
RtlEqualUnicodeString@12
RtlExtendedIntegerMultiply
RtlExtendedLargeIntegerDivide
RtlExtendedMagicDivide
RtlFillMemory@12
RtlFreeAnsiString
RtlFreeAnsiString@4
RtlFreeHeap@12
RtlFreeUnicodeString
RtlFreeUnicodeString@4
RtlGetProcessHeap@0
RtlInitAnsiString
RtlInitAnsiString@8
RtlInitializeContext@20
RtlInitString
RtlInitUnicodeString
RtlIntegerToUnicodeString
RtlInitString@8
RtlInitUnicodeString@8
RtlIntegerToUnicodeString@12
RtlLargeIntegerAdd
RtlLargeIntegerArithmeticShift
RtlLargeIntegerDivide
RtlLargeIntegerNegate
RtlLargeIntegerShiftLeft
@ -468,20 +475,20 @@ RtlLargeIntegerSubtract
RtlLengthSecurityDescriptor
RtlLockHeap@4
RtlMoveMemory@12
RtlMultiByteToUnicodeN@0
RtlMultiByteToUnicodeN@20
RtlNtStatusToDosError
RtlReAllocateHeap@16
RtlSizeHeap@12
RtlUnlockHeap@4
RtlUnicodeStringToAnsiSize
RtlUnicodeStringToAnsiString
RtlUnicodeStringToInteger
RtlUnicodeToMultiByteN@0
RtlUnicodeToMultiByteSize@0
RtlUnicodeStringToAnsiSize@4
RtlUnicodeStringToAnsiString@12
RtlUnicodeStringToInteger@12
RtlUnicodeToMultiByteN@20
RtlUnicodeToMultiByteSize@12
RtlUnwind@0
RtlUpcaseString
RtlUpcaseUnicodeChar@0
RtlUpcaseUnicodeString
RtlUpcaseString@8
RtlUpcaseUnicodeChar
RtlUpcaseUnicodeString@12
RtlUpcaseUnicodeToMultiByteN@0
RtlValidateHeap@12
RtlZeroMemory@8

View file

@ -1,4 +1,4 @@
; $Id: ntdll.edf,v 1.10 1999/11/12 12:01:10 dwelch Exp $
; $Id: ntdll.edf,v 1.11 1999/11/15 15:57:55 ekohl Exp $
;
; ReactOS Operating System
;
@ -6,6 +6,9 @@ LIBRARY ntdll.dll
EXPORTS
InitializeObjectAttributes
NlsAnsiCodePage
NlsMbCodePageTag
NlsMbOemCodePageTag
NtAcceptConnectPort=NtAcceptConnectPort@24
NtAccessCheck=NtAccessCheck@32
NtAccessCheckAndAuditAlarm=NtAccessCheckAndAuditAlarm@44
@ -428,38 +431,42 @@ ZwW32Call=ZwW32Call@20
ZwYieldExecution=ZwYieldExecution@0
RtlAllocateHeap=RtlAllocateHeap@12
RtlAnsiCharToUnicodeChar=RtlAnsiCharToUnicodeChar@4
RtlAnsiStringToUnicodeSize
RtlAnsiStringToUnicodeString
RtlAppendUnicodeStringToString
RtlAppendUnicodeToString
RtlCharToInteger
RtlAnsiStringToUnicodeSize=RtlAnsiStringToUnicodeSize@4
RtlAnsiStringToUnicodeString=RtlAnsiStringToUnicodeString@12
RtlAppendUnicodeStringToString=RtlAppendUnicodeStringToString@8
RtlAppendUnicodeToString=RtlAppendUnicodeToString@8
RtlCharToInteger=RtlCharToInteger@12
RtlCreateHeap=RtlCreateHeap@24
RtlCreateUserProcess=RtlCreateUserProcess@32
RtlCreateUserThread=RtlCreateUserThread@40
RtlCompactHeap=RtlCompactHeap@8
RtlCompareString
RtlCompareUnicodeString
RtlCompareString=RtlCompareString@12
RtlCompareUnicodeString=RtlCompareUnicodeString@12
RtlConvertLongToLargeInteger
RtlConvertUlongToLargeInteger
RtlCopyString
RtlCopyUnicodeString
RtlCopyString=RtlCopyString@8
RtlCopyUnicodeString=RtlCopyUnicodeString@8
RtlDestroyHeap=RtlDestroyHeap@4
RtlEnlargedIntegerMultiply
RtlEnlargedUnsignedDivide
RtlEnlargedUnsignedMultiply
RtlEqualString
RtlEqualUnicodeString
RtlEqualString=RtlEqualString@12
RtlEqualUnicodeString=RtlEqualUnicodeString@12
RtlExtendedIntegerMultiply
RtlExtendedLargeIntegerDivide
RtlExtendedMagicDivide
RtlFillMemory=RtlFillMemory@12
RtlFreeAnsiString
RtlFreeAnsiString=RtlFreeAnsiString@4
RtlFreeHeap=RtlFreeHeap@12
RtlFreeUnicodeString
RtlFreeUnicodeString=RtlFreeUnicodeString@4
RtlGetProcessHeap=RtlGetProcessHeap@0
RtlInitAnsiString
RtlInitAnsiString=RtlInitAnsiString@8
RtlInitializeContext=RtlInitializeContext@20
RtlInitString
RtlInitUnicodeString
RtlIntegerToUnicodeString
RtlInitString=RtlInitString@8
RtlInitUnicodeString=RtlInitUnicodeString@8
RtlIntegerToUnicodeString=RtlIntegerToUnicodeString@12
RtlLargeIntegerAdd
RtlLargeIntegerArithmeticShift
RtlLargeIntegerDivide
RtlLargeIntegerNegate
RtlLargeIntegerShiftLeft
@ -468,20 +475,20 @@ RtlLargeIntegerSubtract
RtlLengthSecurityDescriptor
RtlLockHeap=RtlLockHeap@4
RtlMoveMemory=RtlMoveMemory@12
RtlMultiByteToUnicodeN=RtlMultiByteToUnicodeN@0
RtlMultiByteToUnicodeN=RtlMultiByteToUnicodeN@20
RtlNtStatusToDosError
RtlReAllocateHeap=RtlReAllocateHeap@16
RtlSizeHeap=RtlSizeHeap@12
RtlUnlockHeap=RtlUnlockHeap@4
RtlUnicodeStringToAnsiSize
RtlUnicodeStringToAnsiString
RtlUnicodeStringToInteger
RtlUnicodeToMultiByteN=RtlUnicodeToMultiByteN@0
RtlUnicodeToMultiByteSize=RtlUnicodeToMultiByteSize@0
RtlUnicodeStringToAnsiSize=RtlUnicodeStringToAnsiSize@4
RtlUnicodeStringToAnsiString=RtlUnicodeStringToAnsiString@12
RtlUnicodeStringToInteger=RtlUnicodeStringToInteger@12
RtlUnicodeToMultiByteN=RtlUnicodeToMultiByteN@20
RtlUnicodeToMultiByteSize=RtlUnicodeToMultiByteSize@12
RtlUnwind=RtlUnwind@0
RtlUpcaseString
RtlUpcaseString=RtlUpcaseString@8
RtlUpcaseUnicodeChar=RtlUpcaseUnicodeChar@0
RtlUpcaseUnicodeString
RtlUpcaseUnicodeString=RtlUpcaseUnicodeString@12
RtlUpcaseUnicodeToMultiByteN=RtlUpcaseUnicodeToMultiByteN@0
RtlValidateHeap=RtlValidateHeap@12
RtlZeroMemory=RtlZeroMemory@8

View file

@ -1,10 +1,10 @@
# $Id: makefile,v 1.25 1999/10/26 19:47:05 ea Exp $
# $Id: makefile,v 1.26 1999/11/15 15:57:27 ekohl Exp $
#
# ReactOS Operating System
#
TARGET=ntdll
BASE_CFLAGS = -I../../include
BASE_CFLAGS = -I../../include -D__NTDLL__
IMAGE_BASE = 0x77f60000
@ -25,7 +25,7 @@ all: $(DLLTARGET)
RTL_OBJECTS = rtl/critical.o rtl/error.o rtl/heap.o rtl/largeint.o \
rtl/mem.o rtl/namespc.o rtl/security.o rtl/unicode.o \
rtl/thread.o rtl/process.o
rtl/thread.o rtl/process.o rtl/nls.o
STDLIB_OBJECTS = stdlib/atoi.o stdlib/atol.o stdlib/splitp.o \
stdlib/strtol.o stdlib/strtoul.o

198
reactos/lib/ntdll/rtl/nls.c Normal file
View file

@ -0,0 +1,198 @@
/* $Id: nls.c,v 1.1 1999/11/15 15:59:29 ekohl Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/rtl/nls.c
* PURPOSE: National Language Support (NLS) functions
* UPDATE HISTORY:
* 20/08/99 Created by Emanuele Aliberti
* 10/11/99 Added translation functions.
*
* NOTE:
* Multi-byte code pages are not supported yet. Even single-byte code
* pages are not supported properly. Only stupid CHAR->WCHAR and
* WCHAR->CHAR (Attention: data loss!!!) translation is done.
*
* TODO:
* 1) Implement code to initialize the translation tables.
* 2) Use fixed translation table for translation.
* 3) Add loading of translation tables (NLS files).
* 4) Add multi-byte translation code.
*/
#include <ddk/ntddk.h>
//#include <internal/nls.h>
BOOLEAN
NlsMbCodePageTag = FALSE;
BOOLEAN
NlsMbOemCodePageTag = FALSE;
BYTE
NlsLeadByteInfo = 0; /* ? */
USHORT
NlsOemLeadByteInfo = 0;
USHORT
NlsAnsiCodePage = 0;
USHORT
NlsOemCodePage = 0; /* not exported */
#if 0
WCHAR AnsiToUnicodeTable[256];
WCHAR OemToUnicodeTable[256];
CHAR UnicodeToAnsiTable [65536];
CHAR UnicodeToOemTable [65536];
#endif
/* FUNCTIONS *****************************************************************/
VOID
STDCALL
RtlGetDefaultCodePage (PUSHORT AnsiCodePage,
PUSHORT OemCodePage)
{
*AnsiCodePage = NlsAnsiCodePage;
*OemCodePage = NlsOemCodePage;
}
NTSTATUS
STDCALL
RtlMultiByteToUnicodeN(PWCHAR UnicodeString,
ULONG UnicodeSize,
PULONG ResultSize,
PCHAR MbString,
ULONG MbSize)
{
ULONG Size = 0;
ULONG i;
if (NlsMbCodePageTag == FALSE)
{
/* single-byte code page */
if (MbSize > (UnicodeSize / sizeof(WCHAR)))
Size = UnicodeSize / sizeof(WCHAR);
else
Size = MbSize;
if (ResultSize != NULL)
*ResultSize = Size * sizeof(WCHAR);
for (i = 0; i < Size; i++)
{
*UnicodeString = *MbString;
#if 0
*UnicodeString = AnsiToUnicodeTable[*MbString];
#endif
UnicodeString++;
MbString++;
};
}
else
{
/* multi-byte code page */
/* FIXME */
}
return STATUS_SUCCESS;
}
NTSTATUS
STDCALL
RtlMultiByteToUnicodeSize(PULONG UnicodeSize,
PCHAR MbString,
ULONG MbSize)
{
if (NlsMbCodePageTag == FALSE)
{
/* single-byte code page */
*UnicodeSize = MbSize * sizeof (WCHAR);
}
else
{
/* multi-byte code page */
/* FIXME */
}
return STATUS_SUCCESS;
}
NTSTATUS
STDCALL
RtlUnicodeToMultiByteN(PCHAR MbString,
ULONG MbSize,
PULONG ResultSize,
PWCHAR UnicodeString,
ULONG UnicodeSize)
{
ULONG Size = 0;
ULONG i;
if (NlsMbCodePageTag == FALSE)
{
/* single-byte code page */
if (UnicodeSize > (MbSize * sizeof(WCHAR)))
Size = MbSize;
else
Size = UnicodeSize / sizeof(WCHAR);
if (ResultSize != NULL)
*ResultSize = Size;
for (i = 0; i < Size; i++)
{
*MbString = *UnicodeString;
#if 0
*MbString = UnicodeToAnsiTable[*UnicodeString];
#endif
MbString++;
UnicodeString++;
};
}
else
{
/* multi-byte code page */
/* FIXME */
}
return STATUS_SUCCESS;
}
NTSTATUS
STDCALL
RtlUnicodeToMultiByteSize(PULONG MbSize,
PWCHAR UnicodeString,
ULONG UnicodeSize)
{
if (NlsMbCodePageTag == FALSE)
{
/* single-byte code page */
*MbSize = UnicodeSize / sizeof (WCHAR);
}
else
{
/* multi-byte code page */
/* FIXME */
}
return STATUS_SUCCESS;
}
/* EOF */

File diff suppressed because it is too large Load diff

View file

@ -1,4 +1,4 @@
/* $Id: rtl.c,v 1.1 1999/09/12 21:54:16 ea Exp $
/* $Id: rtl.c,v 1.2 1999/11/15 16:02:50 ekohl Exp $
*
* reactos/lib/psxdll/misc/rtl.c
*
@ -15,13 +15,13 @@
WCHAR
STDCALL
RtlAnsiCharToUnicodeChar (
CHAR AnsiChar
PCHAR AnsiChar
)
{
/* FIXME: it should probably call RtlMultiByteToUnicodeN
* with length==1.
*/
return (WCHAR) AnsiChar;
return (WCHAR) *AnsiChar;
}
@ -57,31 +57,43 @@ RtlMoveMemory (
}
VOID
NTSTATUS
STDCALL
RtlMultiByteToUnicodeN (
VOID
PWCHAR UnicodeString,
ULONG UnicodeSize,
PULONG ResultSize,
PCHAR MbString,
ULONG MbSize
)
{
return STATUS_NOT_IMPLEMENTED;
}
VOID
NTSTATUS
STDCALL
RtlUnicodeToMultiByteN (
VOID
PCHAR MbString,
ULONG MbSize,
PULONG ResultSize,
PWCHAR UnicodeString,
ULONG UnicodeSize
)
{
return STATUS_NOT_IMPLEMENTED;
}
ULONG
NTSTATUS
STDCALL
RtlUnicodeToMultiByteSize (
VOID
PULONG MbSize,
PWCHAR UnicodeString,
ULONG UnicodeSize
)
{
return 0;
return STATUS_NOT_IMPLEMENTED;
}

View file

@ -1,4 +1,4 @@
; $Id: psxdll.def,v 1.4 1999/10/26 19:47:06 ea Exp $
; $Id: psxdll.def,v 1.5 1999/11/15 16:02:36 ekohl Exp $
;
; psxdll.def
;
@ -14,9 +14,9 @@ ntdll.RtlSizeHeap@12
ntdll.RtlAnsiCharToUnicodeChar@4
ntdll.RtlFillMemory@12
ntdll.RtlMoveMemory@12
ntdll.RtlMultiByteToUnicodeN@0
ntdll.RtlUnicodeToMultiByteN@0
ntdll.RtlUnicodeToMultiByteSize@0
ntdll.RtlMultiByteToUnicodeN@20
ntdll.RtlUnicodeToMultiByteN@20
ntdll.RtlUnicodeToMultiByteSize@12
ntdll.RtlUnwind@0
ntdll.RtlUpcaseUnicodeChar@0
ntdll.RtlUpcaseUnicodeToMultiByteN@0
@ -31,9 +31,9 @@ HeapSize@12
RtlAnsiCharToUnicodeChar@4
RtlFillMemory@12
RtlMoveMemory@12
RtlMultiByteToUnicodeN@0
RtlUnicodeToMultiByteN@0
RtlUnicodeToMultiByteSize@0
RtlMultiByteToUnicodeN@20
RtlUnicodeToMultiByteN@20
RtlUnicodeToMultiByteSize@12
RtlUnwind@0
RtlUpcaseUnicodeChar@0
RtlUpcaseUnicodeToMultiByteN@0

View file

@ -1,4 +1,4 @@
; $Id: psxdll.edf,v 1.3 1999/10/26 19:47:06 ea Exp $
; $Id: psxdll.edf,v 1.4 1999/11/15 16:02:36 ekohl Exp $
;
; psxdll.edf
;
@ -14,9 +14,9 @@ ntdll.RtlSizeHeap@12
ntdll.RtlAnsiCharToUnicodeChar@4
ntdll.RtlFillMemory@12
ntdll.RtlMoveMemory@12
ntdll.RtlMultiByteToUnicodeN@0
ntdll.RtlUnicodeToMultiByteN@0
ntdll.RtlUnicodeToMultiByteSize@0
ntdll.RtlMultiByteToUnicodeN@20
ntdll.RtlUnicodeToMultiByteN@20
ntdll.RtlUnicodeToMultiByteSize@12
ntdll.RtlUnwind@0
ntdll.RtlUpcaseUnicodeChar@0
ntdll.RtlUpcaseUnicodeToMultiByteN@0
@ -31,9 +31,9 @@ HeapSize=HeapSize@12
RtlAnsiCharToUnicodeChar=RtlAnsiCharToUnicodeChar@4
RtlFillMemory=RtlFillMemory@12
RtlMoveMemory=RtlMoveMemory@12
RtlMultiByteToUnicodeN=RtlMultiByteToUnicodeN@0
RtlUnicodeToMultiByteN=RtlUnicodeToMultiByteN@0
RtlUnicodeToMultiByteSize=RtlUnicodeToMultiByteSize@0
RtlMultiByteToUnicodeN=RtlMultiByteToUnicodeN@20
RtlUnicodeToMultiByteN=RtlUnicodeToMultiByteN@20
RtlUnicodeToMultiByteSize=RtlUnicodeToMultiByteSize@12
RtlUnwind=RtlUnwind@0
RtlUpcaseUnicodeChar=RtlUpcaseUnicodeChar@0
RtlUpcaseUnicodeToMultiByteN=RtlUpcaseUnicodeToMultiByteN@0

View file

@ -1,4 +1,4 @@
# $Id: makefile_rex,v 1.36 1999/11/12 12:01:11 dwelch Exp $
# $Id: makefile_rex,v 1.37 1999/11/15 15:56:16 ekohl Exp $
#
# ReactOS Operating System
#
@ -15,13 +15,13 @@ include hal/x86/sources
NT_OBJECTS = nt/port.o nt/channel.o nt/ntevent.o nt/nttimer.o nt/atom.o \
nt/evtpair.o nt/ntsem.o nt/mutant.o nt/misc.o nt/plugplay.o \
nt/profile.o nt/nt.o nt/zw.o
nt/profile.o nt/nt.o nt/zw.o
RTL_OBJECTS = rtl/vsprintf.o rtl/lookas.o rtl/unicode.o rtl/time.o \
rtl/unalign.o rtl/mem.o rtl/largeint.o rtl/ctype.o \
rtl/list.o rtl/slist.o rtl/interlck.o rtl/return.o \
rtl/wstring.o rtl/memcpy.o rtl/memmove.o rtl/memset.o \
rtl/memchr.o rtl/string.o rtl/stdlib.o
rtl/memchr.o rtl/nls.o rtl/string.o rtl/stdlib.o
KE_OBJECTS = ke/main.o ke/timer.o ke/error.o ke/catch.o \
ke/dpc.o ke/wait.o ke/kqueue.o ke/dispatch.o \

View file

@ -1,4 +1,4 @@
; $Id: ntoskrnl.def,v 1.24 1999/11/09 18:04:26 ekohl Exp $
; $Id: ntoskrnl.def,v 1.25 1999/11/15 15:56:16 ekohl Exp $
;
; reactos/ntoskrnl/ntoskrnl.def
;
@ -120,6 +120,8 @@ KeSynchronizeExecution
KeWaitForSingleObject
MmGetSystemAddressForMdl
MmMapIoSpace
NlsMbCodePageTag
NlsMbOemCodePageTag
NtAddAtom@8
NtAdjustPrivilegesToken@24
NtAllocateLocallyUniqueId@4
@ -172,22 +174,41 @@ NtUnlockFile@20
;NtVdmControl@8 <--- ?
NtWaitForSingleObject@12
NtWriteFile@36
RtlAnsiStringToUnicodeString
RtlAnsiCharToUnicodeChar@4
RtlAnsiStringToUnicodeSize@4
RtlAnsiStringToUnicodeString@12
RtlAppendAsciizToString@8
RtlAppendStringToString@8
RtlAppendUnicodeStringToString@8
RtlAppendUnicodeToString@8
RtlCharToInteger@12
RtlCompareMemory@12
RtlCompareString@12
RtlCompareUnicodeString@12
RtlConvertLongToLargeInteger
RtlConvertUlongToLargeInteger
RtlCopyMemory
RtlCopyString@8
RtlCopyUnicodeString@8
RtlCreateUnicodeString@8
RtlEnlargedIntegerMultiply
RtlEnlargedUnsignedDivide
RtlEnlargedUnsignedMultiply
RtlEqualString@12
RtlEqualUnicodeString@12
RtlExtendedIntegerMultiply
RtlExtendedLargeIntegerDivide
RtlExtendedMagicDivide
RtlFillMemory@12
RtlFillMemoryUlong@12
RtlFreeUnicodeString
RtlInitAnsiString
RtlInitUnicodeString
RtlFreeAnsiString@4
RtlFreeOemString@4
RtlFreeUnicodeString@4
RtlGetDefaultCodePage@8
RtlInitAnsiString@8
RtlInitString@8
RtlInitUnicodeString@8
RtlIntegerToUnicodeString@12
RtlLargeIntegerAdd
RtlLargeIntegerArithmeticShift
RtlLargeIntegerDivide
@ -196,12 +217,28 @@ RtlLargeIntegerShiftLeft
RtlLargeIntegerShiftRight
RtlLargeIntegerSubtract
RtlMoveMemory@12
RtlMultiByteToUnicodeN@20
RtlMultiByteToUnicodeSize@12
RtlOemStringToUnicodeSize@4
RtlOemStringToUnicodeString@12
RtlOemToUnicodeN@20
RtlSecondsSince1970ToTime
RtlSecondsSince1980ToTime
RtlTimeFieldsToTime
RtlTimeToSecondsSince1970
RtlTimeToSecondsSince1980
RtlTimeToTimeFields
RtlUnicodeStringToAnsiSize@4
RtlUnicodeStringToAnsiString@12
RtlUnicodeStringToInteger@12
RtlUnicodeStringToOemSize@4
RtlUnicodeStringToOemString@12
RtlUnicodeToMultiByteN@20
RtlUnicodeToMultiByteSize@12
RtlUnicodeToOemN@20
RtlUpcaseUnicodeString@12
RtlUpcaseString@8
RtlUpperString@8
RtlZeroMemory@8
ZwAccessCheckAndAuditAlarm@44
ZwAlertThread@4

View file

@ -1,4 +1,4 @@
; $Id: ntoskrnl.edf,v 1.11 1999/11/09 18:04:26 ekohl Exp $
; $Id: ntoskrnl.edf,v 1.12 1999/11/15 15:56:16 ekohl Exp $
;
; reactos/ntoskrnl/ntoskrnl.def
;
@ -120,12 +120,14 @@ KeSynchronizeExecution
KeWaitForSingleObject
MmGetSystemAddressForMdl
MmMapIoSpace
NlsMbCodePageTag
NlsMbOemCodePageTag
NtAddAtom=NtAddAtom@8
NtAdjustPrivilegesToken=NtAdjustPrivilegesToken@24
NtAllocateLocallyUniqueId=NtAllocateLocallyUniqueId@4
NtAllocateUuids=NtAllocateUuids@12
NtAllocateVirtualMemory=NtAllocateVirtualMemory@24
;NtBuildNumber <--- variable?
;NtBuildNumber <--- variable
NtClose=NtClose@4
;NtConnectPort@32
NtConnectPort=NtConnectPort@8
@ -140,7 +142,7 @@ NtDuplicateToken=NtDuplicateToken@24
NtFindAtom=NtFindAtom@8
NtFreeVirtualMemory=NtFreeVirtualMemory@16
NtFsControlFile=NtFsControlFile@40
;NtGlobalFlag <--- variable?
;NtGlobalFlag <--- variable
NtLockFile=NtLockFile@40
NtMapViewOfSection=NtMapViewOfSection@40
NtNotifyChangeDirectoryFile=NtNotifyChangeDirectoryFile@36
@ -172,22 +174,41 @@ NtUnlockFile=NtUnlockFile@20
;NtVdmControl@8 <--- ?
NtWaitForSingleObject=NtWaitForSingleObject@12
NtWriteFile=NtWriteFile@36
RtlAnsiStringToUnicodeString
RtlAnsiCharToUnicodeChar=RtlAnsiCharToUnicodeChar@4
RtlAnsiStringToUnicodeSize=RtlAnsiStringToUnicodeSize@4
RtlAnsiStringToUnicodeString=RtlAnsiStringToUnicodeString@12
RtlAppendAsciizToString=RtlAppendAsciizToString@8
RtlAppendStringToString=RtlAppendStringToString@8
RtlAppendUnicodeStringToString=RtlAppendUnicodeStringToString@8
RtlAppendUnicodeToString=RtlAppendUnicodeToString@8
RtlCharToInteger=RtlCharToInteger@12
RtlCompareMemory=RtlCompareMemory@12
RtlCompareString=RtlCompareString@12
RtlCompareUnicodeString=RtlCompareUnicodeString@12
RtlConvertLongToLargeInteger
RtlConvertUlongToLargeInteger
RtlCopyMemory
RtlCopyString=RtlCopyString@8
RtlCopyUnicodeString=RtlCopyUnicodeString@8
RtlCreateUnicodeString=RtlCreateUnicodeString@8
RtlEnlargedIntegerMultiply
RtlEnlargedUnsignedDivide
RtlEnlargedUnsignedMultiply
RtlEqualString=RtlEqualString@12
RtlEqualUnicodeString=RtlEqualUnicodeString@12
RtlExtendedIntegerMultiply
RtlExtendedLargeIntegerDivide
RtlExtendedMagicDivide
RtlFillMemory=RtlFillMemory@12
RtlFillMemoryUlong=RtlFillMemoryUlong@12
RtlFreeUnicodeString
RtlInitAnsiString
RtlInitUnicodeString
RtlFreeAnsiString=RtlFreeAnsiString@4
RtlFreeOemString=RtlFreeOemString@4
RtlFreeUnicodeString=RtlFreeUnicodeString@4
RtlGetDefaultCodePage=RtlGetDefaultCodePage@8
RtlInitAnsiString=RtlInitAnsiString@8
RtlInitString=RtlInitString@8
RtlInitUnicodeString=RtlInitUnicodeString@8
RtlIntegerToUnicodeString=RtlIntegerToUnicodeString@12
RtlLargeIntegerAdd
RtlLargeIntegerArithmeticShift
RtlLargeIntegerDivide
@ -196,12 +217,26 @@ RtlLargeIntegerShiftLeft
RtlLargeIntegerShiftRight
RtlLargeIntegerSubtract
RtlMoveMemory=RtlMoveMemory@12
RtlMultiByteToUnicodeN=RtlMultiByteToUnicodeN@20
RtlMultiByteToUnicodeSize=RtlMultiByteToUnicodeSize@12
RtlOemStringToUnicodeSize=RtlOemStringToUnicodeSize@4
RtlOemStringToUnicodeString=RtlOemStringToUnicodeString@12
RtlSecondsSince1970ToTime
RtlSecondsSince1980ToTime
RtlTimeFieldsToTime
RtlTimeToSecondsSince1970
RtlTimeToSecondsSince1980
RtlTimeToTimeFields
RtlUnicodeStringToAnsiSize=RtlUnicodeStringToAnsiSize@4
RtlUnicodeStringToAnsiString=RtlUnicodeStringToAnsiString@12
RtlUnicodeStringToInteger=RtlUnicodeStringToInteger@12
RtlUnicodeStringToOemSize=RtlUnicodeStringToOemSize@4
RtlUnicodeStringToOemString=RtlUnicodeStringToOemString@12
RtlUnicodeToMultiByteN=RtlUnicodeToMultiByteN@20
RtlUnicodeToMultiByteSize=RtlUnicodeToMultiByteSize@12
RtlUpcaseUnicodeString=RtlUpcaseUnicodeString@12
RtlUpcaseString=RtlUpcaseString@8
RtlUpperString=RtlUpperString@8
RtlZeroMemory=RtlZeroMemory@8
ZwAccessCheckAndAuditAlarm=ZwAccessCheckAndAuditAlarm@44
ZwAlertThread=ZwAlertThread@4

287
reactos/ntoskrnl/rtl/nls.c Normal file
View file

@ -0,0 +1,287 @@
/* $Id: nls.c,v 1.1 1999/11/15 15:57:01 ekohl Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/rtl/nls.c
* PURPOSE: National Language Support (NLS) functions
* UPDATE HISTORY:
* 20/08/99 Created by Emanuele Aliberti
* 10/11/99 Added translation functions.
*
* NOTE:
* Multi-byte code pages are not supported yet. Even single-byte code
* pages are not supported properly. Only stupid CHAR->WCHAR and
* WCHAR->CHAR (Attention: data loss!!!) translation is done.
*
* TODO:
* 1) Implement code to initialize the translation tables.
* 2) Use fixed translation table for translation.
* 3) Add loading of translation tables (NLS files).
* 4) Add multi-byte translation code.
*/
#include <ddk/ntddk.h>
//#include <internal/nls.h>
BOOLEAN
NlsMbCodePageTag = FALSE;
BOOLEAN
NlsMbOemCodePageTag = FALSE;
BYTE
NlsLeadByteInfo = 0; /* ? */
USHORT
NlsOemLeadByteInfo = 0;
USHORT
NlsAnsiCodePage = 0;
USHORT
NlsOemCodePage = 0; /* not exported */
#if 0
WCHAR AnsiToUnicodeTable[256];
WCHAR OemToUnicodeTable[256];
CHAR UnicodeToAnsiTable [65536];
CHAR UnicodeToOemTable [65536];
#endif
/* FUNCTIONS *****************************************************************/
VOID
STDCALL
RtlGetDefaultCodePage (PUSHORT AnsiCodePage,
PUSHORT OemCodePage)
{
*AnsiCodePage = NlsAnsiCodePage;
*OemCodePage = NlsOemCodePage;
}
NTSTATUS
STDCALL
RtlMultiByteToUnicodeN(PWCHAR UnicodeString,
ULONG UnicodeSize,
PULONG ResultSize,
PCHAR MbString,
ULONG MbSize)
{
ULONG Size = 0;
ULONG i;
if (NlsMbCodePageTag == FALSE)
{
/* single-byte code page */
if (MbSize > (UnicodeSize / sizeof(WCHAR)))
Size = UnicodeSize / sizeof(WCHAR);
else
Size = MbSize;
if (ResultSize != NULL)
*ResultSize = Size * sizeof(WCHAR);
for (i = 0; i < Size; i++)
{
*UnicodeString = *MbString;
#if 0
*UnicodeString = AnsiToUnicodeTable[*MbString];
#endif
UnicodeString++;
MbString++;
};
}
else
{
/* multi-byte code page */
/* FIXME */
}
return STATUS_SUCCESS;
}
NTSTATUS
STDCALL
RtlMultiByteToUnicodeSize(PULONG UnicodeSize,
PCHAR MbString,
ULONG MbSize)
{
if (NlsMbCodePageTag == FALSE)
{
/* single-byte code page */
*UnicodeSize = MbSize * sizeof (WCHAR);
}
else
{
/* multi-byte code page */
/* FIXME */
}
return STATUS_SUCCESS;
}
NTSTATUS
STDCALL
RtlOemToUnicodeN(PWCHAR UnicodeString,
ULONG UnicodeSize,
PULONG ResultSize,
PCHAR OemString,
ULONG OemSize)
{
ULONG Size = 0;
ULONG i;
if (NlsMbOemCodePageTag == FALSE)
{
/* single-byte code page */
if (OemSize > (UnicodeSize / sizeof(WCHAR)))
Size = UnicodeSize / sizeof(WCHAR);
else
Size = OemSize;
if (ResultSize != NULL)
*ResultSize = Size * sizeof(WCHAR);
for (i = 0; i < Size; i++)
{
*UnicodeString = *OemString;
#if 0
*UnicodeString = OemToUnicodeTable[*OemString];
#endif
UnicodeString++;
OemString++;
};
}
else
{
/* multi-byte code page */
/* FIXME */
}
return STATUS_SUCCESS;
}
NTSTATUS
STDCALL
RtlUnicodeToMultiByteN(PCHAR MbString,
ULONG MbSize,
PULONG ResultSize,
PWCHAR UnicodeString,
ULONG UnicodeSize)
{
ULONG Size = 0;
ULONG i;
if (NlsMbCodePageTag == FALSE)
{
/* single-byte code page */
if (UnicodeSize > (MbSize * sizeof(WCHAR)))
Size = MbSize;
else
Size = UnicodeSize / sizeof(WCHAR);
if (ResultSize != NULL)
*ResultSize = Size;
for (i = 0; i < Size; i++)
{
*MbString = *UnicodeString;
#if 0
*MbString = UnicodeToAnsiTable[*UnicodeString];
#endif
MbString++;
UnicodeString++;
};
}
else
{
/* multi-byte code page */
/* FIXME */
}
return STATUS_SUCCESS;
}
NTSTATUS
STDCALL
RtlUnicodeToMultiByteSize(PULONG MbSize,
PWCHAR UnicodeString,
ULONG UnicodeSize)
{
if (NlsMbCodePageTag == FALSE)
{
/* single-byte code page */
*MbSize = UnicodeSize / sizeof (WCHAR);
}
else
{
/* multi-byte code page */
/* FIXME */
}
return STATUS_SUCCESS;
}
NTSTATUS
STDCALL
RtlUnicodeToOemN(PCHAR OemString,
ULONG OemSize,
PULONG ResultSize,
PWCHAR UnicodeString,
ULONG UnicodeSize)
{
ULONG Size = 0;
ULONG i;
if (NlsMbOemCodePageTag == FALSE)
{
/* single-byte code page */
if (UnicodeSize > (OemSize * sizeof(WCHAR)))
Size = OemSize;
else
Size = UnicodeSize / sizeof(WCHAR);
if (ResultSize != NULL)
*ResultSize = Size;
for (i = 0; i < Size; i++)
{
*OemString = *UnicodeString;
#if 0
*OemString = UnicodeToOemTable[*UnicodeString];
#endif
OemString++;
UnicodeString++;
};
}
else
{
/* multi-byte code page */
/* FIXME */
}
return STATUS_SUCCESS;
}
/* EOF */

File diff suppressed because it is too large Load diff

View file

@ -151,11 +151,11 @@ STUB(PATHOBJ_bPolyLineTo)
STUB(PATHOBJ_vEnumStart)
STUB(PATHOBJ_vEnumStartClipLines)
STUB(PATHOBJ_vGetBounds)
STUB(RtlAnsiCharToUnicodeChar)
STUB(RtlMultiByteToUnicodeN)
//STUB(RtlAnsiCharToUnicodeChar)
//STUB(RtlMultiByteToUnicodeN)
STUB(RtlRaiseException)
STUB(RtlUnicodeToMultiByteN)
STUB(RtlUnicodeToMultiByteSize)
//STUB(RtlUnicodeToMultiByteN)
//STUB(RtlUnicodeToMultiByteSize)
STUB(RtlUnwind)
STUB(RtlUpcaseUnicodeChar)
STUB(RtlUpcaseUnicodeToMultiByteN)

View file

@ -1,4 +1,4 @@
; $Id: win32k.def,v 1.5 1999/10/23 22:40:49 rex Exp $
; $Id: win32k.def,v 1.6 1999/11/15 16:02:00 ekohl Exp $
;
; win32k.def
;
@ -155,15 +155,15 @@ PATHOBJ_vEnumStart
PATHOBJ_vEnumStartClipLines
PATHOBJ_vGetBounds
; RtlAnsiCharToUnicodeChar = NTOSKRNL.RtlAnsiCharToUnicodeChar
RtlAnsiCharToUnicodeChar
;RtlAnsiCharToUnicodeChar
; RtlMultiByteToUnicodeN = NTOSKRNL.RtlMultiByteToUnicodeN
RtlMultiByteToUnicodeN
;RtlMultiByteToUnicodeN
; RtlRaiseException = NTOSKRNL.RtlRaiseException
RtlRaiseException
; RtlUnicodeToMultiByteN = NTOSKRNL.RtlUnicodeToMultiByteN
RtlUnicodeToMultiByteN
;RtlUnicodeToMultiByteN
; RtlUnicodeToMultiByteSize = NTOSKRNL.RtlUnicodeToMultiByteSize
RtlUnicodeToMultiByteSize
;RtlUnicodeToMultiByteSize
; RtlUnwind = NTOSKRNL.RtlUnwind
RtlUnwind
; RtlUpcaseUnicodeChar = NTOSKRNL.RtlUpcaseUnicodeChar