diff --git a/reactos/lib/ntdll/def/ntdll.def b/reactos/lib/ntdll/def/ntdll.def index 4b3715dab8a..0ba838b25ac 100644 --- a/reactos/lib/ntdll/def/ntdll.def +++ b/reactos/lib/ntdll/def/ntdll.def @@ -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 ; @@ -369,6 +369,7 @@ RtlDecompressFragment@32 RtlDeleteAce@8 RtlDeleteAtomFromAtomTable@8 RtlDeleteCriticalSection@4 +RtlDuplicateUnicodeString@12 RtlSetCriticalSectionSpinCount@8 ;RtlDeleteElementGenericTable ;RtlDeleteNoSplay @@ -461,6 +462,7 @@ RtlGetOwnerSecurityDescriptor@12 RtlGetProcessHeaps@8 RtlGetSaclSecurityDescriptor@16 ;RtlGetUserInfoHeap +RtlGetVersion@4 ;RtlGuidToPropertySetName RtlIdentifierAuthoritySid@4 RtlImageDirectoryEntryToData@16 @@ -521,6 +523,7 @@ RtlMultiByteToUnicodeSize@12 ;RtlNewSecurityGrantedAccess ;RtlNewSecurityObject RtlNormalizeProcessParams@4 +RtlNtPathNameToDosPathName@16 RtlNtStatusToDosError@4 ;RtlNumberGenericTableElements RtlNumberOfClearBits@4 @@ -634,6 +637,7 @@ RtlValidateProcessHeaps@0 RtlWriteRegistryValue@24 ;RtlZeroHeap RtlZeroMemory@8 +RtlpEnsureBufferSize@12 RtlpNtCreateKey@24 RtlpNtEnumerateSubKey@16 RtlpNtMakeTemporaryKey@4 diff --git a/reactos/lib/ntdll/def/ntdll.edf b/reactos/lib/ntdll/def/ntdll.edf index a97cacd4be9..3e02dcf925b 100644 --- a/reactos/lib/ntdll/def/ntdll.edf +++ b/reactos/lib/ntdll/def/ntdll.edf @@ -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 ; @@ -369,6 +369,7 @@ RtlDecompressFragment=RtlDecompressFragment@32 RtlDeleteAce=RtlDeleteAce@8 RtlDeleteAtomFromAtomTable=RtlDeleteAtomFromAtomTable@8 RtlDeleteCriticalSection=RtlDeleteCriticalSection@4 +RtlDuplicateUnicodeString=RtlDuplicateUnicodeString@12 RtlSetCriticalSectionSpinCount=RtlSetCriticalSectionSpinCount@8 ;RtlDeleteElementGenericTable ;RtlDeleteNoSplay @@ -461,6 +462,7 @@ RtlGetOwnerSecurityDescriptor=RtlGetOwnerSecurityDescriptor@12 RtlGetProcessHeaps=RtlGetProcessHeaps@8 RtlGetSaclSecurityDescriptor=RtlGetSaclSecurityDescriptor@16 ;RtlGetUserInfoHeap +RtlGetVersion=RtlGetVersion@4 ;RtlGuidToPropertySetName RtlIdentifierAuthoritySid=RtlIdentifierAuthoritySid@4 RtlImageDirectoryEntryToData=RtlImageDirectoryEntryToData@16 @@ -523,6 +525,7 @@ RtlMultiByteToUnicodeSize=RtlMultiByteToUnicodeSize@12 ;RtlNewSecurityObject RtlNormalizeProcessParams=RtlNormalizeProcessParams@4 RtlNtStatusToDosError=RtlNtStatusToDosError@4 +RtlNtPathNameToDosPathName=RtlNtPathNameToDosPathName@16 ;RtlNumberGenericTableElements RtlNumberOfClearBits=RtlNumberOfClearBits@4 RtlNumberOfSetBits=RtlNumberOfSetBits@4 @@ -553,6 +556,7 @@ RtlQueryTimeZoneInformation=RtlQueryTimeZoneInformation@4 RtlRaiseException=RtlRaiseException@4 RtlRaiseStatus=RtlRaiseStatus@4 RtlRandom=RtlRandom@4 +RtlRandomEx=RtlRandom@4 RtlReAllocateHeap=RtlReAllocateHeap@16 ;RtlRealPredecessor ;RtlRealSuccessor @@ -635,6 +639,7 @@ RtlValidateProcessHeaps=RtlValidateProcessHeaps@0 RtlWriteRegistryValue=RtlWriteRegistryValue@24 ;RtlZeroHeap RtlZeroMemory=RtlZeroMemory@8 +RtlpEnsureBufferSize=RtlpEnsureBufferSize@12 RtlpNtCreateKey=RtlpNtCreateKey@24 RtlpNtEnumerateSubKey=RtlpNtEnumerateSubKey@16 RtlpNtMakeTemporaryKey=RtlpNtMakeTemporaryKey@4 diff --git a/reactos/lib/ntdll/makefile b/reactos/lib/ntdll/makefile index 10d50c007d8..54c06d7c280 100644 --- a/reactos/lib/ntdll/makefile +++ b/reactos/lib/ntdll/makefile @@ -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 = ../.. @@ -104,7 +104,8 @@ RTL_OBJECTS = \ rtl/thread.o \ rtl/time.o \ rtl/timezone.o \ - rtl/unicode.o + rtl/unicode.o \ + rtl/version.o STDIO_OBJECTS = \ stdio/sprintf.o \ diff --git a/reactos/lib/ntdll/rtl/path.c b/reactos/lib/ntdll/rtl/path.c index b37dbf2d722..1cd0c8c879b 100644 --- a/reactos/lib/ntdll/rtl/path.c +++ b/reactos/lib/ntdll/rtl/path.c @@ -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 * PROJECT: ReactOS system libraries @@ -1012,4 +1012,18 @@ RtlDoesFileExists_U(IN PWSTR FileName) 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 */ diff --git a/reactos/lib/ntdll/rtl/unicode.c b/reactos/lib/ntdll/rtl/unicode.c index f182f7f55d8..e00ab783986 100644 --- a/reactos/lib/ntdll/rtl/unicode.c +++ b/reactos/lib/ntdll/rtl/unicode.c @@ -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 * PROJECT: ReactOS kernel @@ -1899,4 +1899,45 @@ RtlxUnicodeStringToOemSize (IN PUNICODE_STRING 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 */ diff --git a/reactos/lib/ntdll/rtl/version.c b/reactos/lib/ntdll/rtl/version.c new file mode 100644 index 00000000000..778d33bdd45 --- /dev/null +++ b/reactos/lib/ntdll/rtl/version.c @@ -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 + +/* 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 */