mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 23:03:00 +00:00
- Implementation of RtlDuplicateUnicodeString.
- Copied implementation of RtlGetVersion from ntoskrnl. - Stubs for RtlNtPathNameToDosPathName and RtlpEnsureBufferSize. These functions are needed by native Windows DLLs. - Export RtlRandomEx as a wrapper for RtlRandom. svn path=/trunk/; revision=9376
This commit is contained in:
parent
f4b54419c3
commit
6ea0fbf3f3
6 changed files with 133 additions and 6 deletions
|
@ -1,4 +1,4 @@
|
||||||
; $Id: ntdll.def,v 1.119 2004/05/01 19:21:44 ekohl Exp $
|
; $Id: ntdll.def,v 1.120 2004/05/13 21:01:14 navaraf Exp $
|
||||||
;
|
;
|
||||||
; ReactOS Operating System
|
; ReactOS Operating System
|
||||||
;
|
;
|
||||||
|
@ -369,6 +369,7 @@ RtlDecompressFragment@32
|
||||||
RtlDeleteAce@8
|
RtlDeleteAce@8
|
||||||
RtlDeleteAtomFromAtomTable@8
|
RtlDeleteAtomFromAtomTable@8
|
||||||
RtlDeleteCriticalSection@4
|
RtlDeleteCriticalSection@4
|
||||||
|
RtlDuplicateUnicodeString@12
|
||||||
RtlSetCriticalSectionSpinCount@8
|
RtlSetCriticalSectionSpinCount@8
|
||||||
;RtlDeleteElementGenericTable
|
;RtlDeleteElementGenericTable
|
||||||
;RtlDeleteNoSplay
|
;RtlDeleteNoSplay
|
||||||
|
@ -461,6 +462,7 @@ RtlGetOwnerSecurityDescriptor@12
|
||||||
RtlGetProcessHeaps@8
|
RtlGetProcessHeaps@8
|
||||||
RtlGetSaclSecurityDescriptor@16
|
RtlGetSaclSecurityDescriptor@16
|
||||||
;RtlGetUserInfoHeap
|
;RtlGetUserInfoHeap
|
||||||
|
RtlGetVersion@4
|
||||||
;RtlGuidToPropertySetName
|
;RtlGuidToPropertySetName
|
||||||
RtlIdentifierAuthoritySid@4
|
RtlIdentifierAuthoritySid@4
|
||||||
RtlImageDirectoryEntryToData@16
|
RtlImageDirectoryEntryToData@16
|
||||||
|
@ -521,6 +523,7 @@ RtlMultiByteToUnicodeSize@12
|
||||||
;RtlNewSecurityGrantedAccess
|
;RtlNewSecurityGrantedAccess
|
||||||
;RtlNewSecurityObject
|
;RtlNewSecurityObject
|
||||||
RtlNormalizeProcessParams@4
|
RtlNormalizeProcessParams@4
|
||||||
|
RtlNtPathNameToDosPathName@16
|
||||||
RtlNtStatusToDosError@4
|
RtlNtStatusToDosError@4
|
||||||
;RtlNumberGenericTableElements
|
;RtlNumberGenericTableElements
|
||||||
RtlNumberOfClearBits@4
|
RtlNumberOfClearBits@4
|
||||||
|
@ -634,6 +637,7 @@ RtlValidateProcessHeaps@0
|
||||||
RtlWriteRegistryValue@24
|
RtlWriteRegistryValue@24
|
||||||
;RtlZeroHeap
|
;RtlZeroHeap
|
||||||
RtlZeroMemory@8
|
RtlZeroMemory@8
|
||||||
|
RtlpEnsureBufferSize@12
|
||||||
RtlpNtCreateKey@24
|
RtlpNtCreateKey@24
|
||||||
RtlpNtEnumerateSubKey@16
|
RtlpNtEnumerateSubKey@16
|
||||||
RtlpNtMakeTemporaryKey@4
|
RtlpNtMakeTemporaryKey@4
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
; $Id: ntdll.edf,v 1.109 2004/05/01 19:21:44 ekohl Exp $
|
; $Id: ntdll.edf,v 1.110 2004/05/13 21:01:14 navaraf Exp $
|
||||||
;
|
;
|
||||||
; ReactOS Operating System
|
; ReactOS Operating System
|
||||||
;
|
;
|
||||||
|
@ -369,6 +369,7 @@ RtlDecompressFragment=RtlDecompressFragment@32
|
||||||
RtlDeleteAce=RtlDeleteAce@8
|
RtlDeleteAce=RtlDeleteAce@8
|
||||||
RtlDeleteAtomFromAtomTable=RtlDeleteAtomFromAtomTable@8
|
RtlDeleteAtomFromAtomTable=RtlDeleteAtomFromAtomTable@8
|
||||||
RtlDeleteCriticalSection=RtlDeleteCriticalSection@4
|
RtlDeleteCriticalSection=RtlDeleteCriticalSection@4
|
||||||
|
RtlDuplicateUnicodeString=RtlDuplicateUnicodeString@12
|
||||||
RtlSetCriticalSectionSpinCount=RtlSetCriticalSectionSpinCount@8
|
RtlSetCriticalSectionSpinCount=RtlSetCriticalSectionSpinCount@8
|
||||||
;RtlDeleteElementGenericTable
|
;RtlDeleteElementGenericTable
|
||||||
;RtlDeleteNoSplay
|
;RtlDeleteNoSplay
|
||||||
|
@ -461,6 +462,7 @@ RtlGetOwnerSecurityDescriptor=RtlGetOwnerSecurityDescriptor@12
|
||||||
RtlGetProcessHeaps=RtlGetProcessHeaps@8
|
RtlGetProcessHeaps=RtlGetProcessHeaps@8
|
||||||
RtlGetSaclSecurityDescriptor=RtlGetSaclSecurityDescriptor@16
|
RtlGetSaclSecurityDescriptor=RtlGetSaclSecurityDescriptor@16
|
||||||
;RtlGetUserInfoHeap
|
;RtlGetUserInfoHeap
|
||||||
|
RtlGetVersion=RtlGetVersion@4
|
||||||
;RtlGuidToPropertySetName
|
;RtlGuidToPropertySetName
|
||||||
RtlIdentifierAuthoritySid=RtlIdentifierAuthoritySid@4
|
RtlIdentifierAuthoritySid=RtlIdentifierAuthoritySid@4
|
||||||
RtlImageDirectoryEntryToData=RtlImageDirectoryEntryToData@16
|
RtlImageDirectoryEntryToData=RtlImageDirectoryEntryToData@16
|
||||||
|
@ -523,6 +525,7 @@ RtlMultiByteToUnicodeSize=RtlMultiByteToUnicodeSize@12
|
||||||
;RtlNewSecurityObject
|
;RtlNewSecurityObject
|
||||||
RtlNormalizeProcessParams=RtlNormalizeProcessParams@4
|
RtlNormalizeProcessParams=RtlNormalizeProcessParams@4
|
||||||
RtlNtStatusToDosError=RtlNtStatusToDosError@4
|
RtlNtStatusToDosError=RtlNtStatusToDosError@4
|
||||||
|
RtlNtPathNameToDosPathName=RtlNtPathNameToDosPathName@16
|
||||||
;RtlNumberGenericTableElements
|
;RtlNumberGenericTableElements
|
||||||
RtlNumberOfClearBits=RtlNumberOfClearBits@4
|
RtlNumberOfClearBits=RtlNumberOfClearBits@4
|
||||||
RtlNumberOfSetBits=RtlNumberOfSetBits@4
|
RtlNumberOfSetBits=RtlNumberOfSetBits@4
|
||||||
|
@ -553,6 +556,7 @@ RtlQueryTimeZoneInformation=RtlQueryTimeZoneInformation@4
|
||||||
RtlRaiseException=RtlRaiseException@4
|
RtlRaiseException=RtlRaiseException@4
|
||||||
RtlRaiseStatus=RtlRaiseStatus@4
|
RtlRaiseStatus=RtlRaiseStatus@4
|
||||||
RtlRandom=RtlRandom@4
|
RtlRandom=RtlRandom@4
|
||||||
|
RtlRandomEx=RtlRandom@4
|
||||||
RtlReAllocateHeap=RtlReAllocateHeap@16
|
RtlReAllocateHeap=RtlReAllocateHeap@16
|
||||||
;RtlRealPredecessor
|
;RtlRealPredecessor
|
||||||
;RtlRealSuccessor
|
;RtlRealSuccessor
|
||||||
|
@ -635,6 +639,7 @@ RtlValidateProcessHeaps=RtlValidateProcessHeaps@0
|
||||||
RtlWriteRegistryValue=RtlWriteRegistryValue@24
|
RtlWriteRegistryValue=RtlWriteRegistryValue@24
|
||||||
;RtlZeroHeap
|
;RtlZeroHeap
|
||||||
RtlZeroMemory=RtlZeroMemory@8
|
RtlZeroMemory=RtlZeroMemory@8
|
||||||
|
RtlpEnsureBufferSize=RtlpEnsureBufferSize@12
|
||||||
RtlpNtCreateKey=RtlpNtCreateKey@24
|
RtlpNtCreateKey=RtlpNtCreateKey@24
|
||||||
RtlpNtEnumerateSubKey=RtlpNtEnumerateSubKey@16
|
RtlpNtEnumerateSubKey=RtlpNtEnumerateSubKey@16
|
||||||
RtlpNtMakeTemporaryKey=RtlpNtMakeTemporaryKey@4
|
RtlpNtMakeTemporaryKey=RtlpNtMakeTemporaryKey@4
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# $Id: makefile,v 1.99 2004/02/25 19:34:32 ekohl Exp $
|
# $Id: makefile,v 1.100 2004/05/13 21:01:14 navaraf Exp $
|
||||||
|
|
||||||
PATH_TO_TOP = ../..
|
PATH_TO_TOP = ../..
|
||||||
|
|
||||||
|
@ -104,7 +104,8 @@ RTL_OBJECTS = \
|
||||||
rtl/thread.o \
|
rtl/thread.o \
|
||||||
rtl/time.o \
|
rtl/time.o \
|
||||||
rtl/timezone.o \
|
rtl/timezone.o \
|
||||||
rtl/unicode.o
|
rtl/unicode.o \
|
||||||
|
rtl/version.o
|
||||||
|
|
||||||
STDIO_OBJECTS = \
|
STDIO_OBJECTS = \
|
||||||
stdio/sprintf.o \
|
stdio/sprintf.o \
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: path.c,v 1.27 2004/03/13 22:23:14 weiden Exp $
|
/* $Id: path.c,v 1.28 2004/05/13 21:01:14 navaraf Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS system libraries
|
* PROJECT: ReactOS system libraries
|
||||||
|
@ -1012,4 +1012,18 @@ RtlDoesFileExists_U(IN PWSTR FileName)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NTSTATUS STDCALL
|
||||||
|
RtlpEnsureBufferSize(ULONG Unknown1, ULONG Unknown2, ULONG Unknown3)
|
||||||
|
{
|
||||||
|
DPRINT1("RtlpEnsureBufferSize: stub\n");
|
||||||
|
return STATUS_NOT_IMPLEMENTED;
|
||||||
|
}
|
||||||
|
|
||||||
|
NTSTATUS STDCALL
|
||||||
|
RtlNtPathNameToDosPathName(ULONG Unknown1, ULONG Unknown2, ULONG Unknown3, ULONG Unknown4)
|
||||||
|
{
|
||||||
|
DPRINT1("RtlNtPathNameToDosPathName: stub\n");
|
||||||
|
return STATUS_NOT_IMPLEMENTED;
|
||||||
|
}
|
||||||
|
|
||||||
/* EOF */
|
/* EOF */
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: unicode.c,v 1.37 2004/02/15 07:04:45 arty Exp $
|
/* $Id: unicode.c,v 1.38 2004/05/13 21:01:14 navaraf Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -1899,4 +1899,45 @@ RtlxUnicodeStringToOemSize (IN PUNICODE_STRING UnicodeString)
|
||||||
return RtlUnicodeStringToAnsiSize (UnicodeString);
|
return RtlUnicodeStringToAnsiSize (UnicodeString);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @implemented
|
||||||
|
*/
|
||||||
|
NTSTATUS STDCALL
|
||||||
|
RtlDuplicateUnicodeString(
|
||||||
|
INT AddNull,
|
||||||
|
IN PUNICODE_STRING SourceString,
|
||||||
|
PUNICODE_STRING DestinationString)
|
||||||
|
{
|
||||||
|
if (SourceString == NULL || DestinationString == NULL)
|
||||||
|
return STATUS_INVALID_PARAMETER;
|
||||||
|
|
||||||
|
|
||||||
|
if (SourceString->Length == 0 && AddNull != 3)
|
||||||
|
{
|
||||||
|
DestinationString->Length = 0;
|
||||||
|
DestinationString->MaximumLength = 0;
|
||||||
|
DestinationString->Buffer = NULL;
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
unsigned int DestMaxLength = SourceString->Length;
|
||||||
|
|
||||||
|
if (AddNull)
|
||||||
|
DestMaxLength += sizeof(UNICODE_NULL);
|
||||||
|
|
||||||
|
DestinationString->Buffer = RtlAllocateHeap(RtlGetProcessHeap(), 0, DestMaxLength);
|
||||||
|
if (DestinationString->Buffer == NULL)
|
||||||
|
return STATUS_NO_MEMORY;
|
||||||
|
|
||||||
|
RtlCopyMemory(DestinationString->Buffer, SourceString->Buffer, SourceString->Length);
|
||||||
|
DestinationString->Length = SourceString->Length;
|
||||||
|
DestinationString->MaximumLength = DestMaxLength;
|
||||||
|
|
||||||
|
if (AddNull)
|
||||||
|
DestinationString->Buffer[DestinationString->Length / sizeof(WCHAR)] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
/* EOF */
|
/* EOF */
|
||||||
|
|
62
reactos/lib/ntdll/rtl/version.c
Normal file
62
reactos/lib/ntdll/rtl/version.c
Normal file
|
@ -0,0 +1,62 @@
|
||||||
|
/*
|
||||||
|
* ReactOS kernel
|
||||||
|
* Copyright (C) 2004 ReactOS Team
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
*/
|
||||||
|
/* $Id: version.c,v 1.1 2004/05/13 21:01:14 navaraf Exp $
|
||||||
|
*
|
||||||
|
* PROJECT: ReactOS kernel
|
||||||
|
* PURPOSE: Runtime code
|
||||||
|
* FILE: ntoskrnl/rtl/version.c
|
||||||
|
* PROGRAMER: Filip Navara
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* INCLUDES *****************************************************************/
|
||||||
|
|
||||||
|
#define __USE_W32API
|
||||||
|
#include <ddk/ntddk.h>
|
||||||
|
|
||||||
|
/* FUNCTIONS ****************************************************************/
|
||||||
|
|
||||||
|
NTSTATUS STDCALL
|
||||||
|
RtlGetVersion(RTL_OSVERSIONINFOW *Info)
|
||||||
|
{
|
||||||
|
WCHAR CSDString[] = L"Service Pack 6";
|
||||||
|
|
||||||
|
if (Info->dwOSVersionInfoSize == sizeof(RTL_OSVERSIONINFOW) ||
|
||||||
|
Info->dwOSVersionInfoSize == sizeof(RTL_OSVERSIONINFOEXW))
|
||||||
|
{
|
||||||
|
Info->dwMajorVersion = 4;
|
||||||
|
Info->dwMinorVersion = 0;
|
||||||
|
Info->dwBuildNumber = 1381;
|
||||||
|
Info->dwPlatformId = VER_PLATFORM_WIN32_NT;
|
||||||
|
RtlCopyMemory(Info->szCSDVersion, CSDString, sizeof(CSDString));
|
||||||
|
if (Info->dwOSVersionInfoSize == sizeof(RTL_OSVERSIONINFOEXW))
|
||||||
|
{
|
||||||
|
RTL_OSVERSIONINFOEXW *InfoEx = (RTL_OSVERSIONINFOEXW *)Info;
|
||||||
|
InfoEx->wServicePackMajor = 6;
|
||||||
|
InfoEx->wServicePackMinor = 0;
|
||||||
|
InfoEx->wSuiteMask = 0;
|
||||||
|
InfoEx->wProductType = VER_NT_WORKSTATION;
|
||||||
|
}
|
||||||
|
|
||||||
|
return STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
return STATUS_INVALID_PARAMETER;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* EOF */
|
Loading…
Add table
Add a link
Reference in a new issue