- Rewrite VideoPortGetVersion using RtlGetVersion.
- Added debugging messages to InternalMapMemory.
- Changed VideoPortAllocateBuffer back to PagedPool.
svn path=/trunk/; revision=8585
* If not, write to the Free Software Foundation,
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
- * $Id: videoprt.c,v 1.11 2004/03/08 04:41:20 jimtabor Exp $
+ * $Id: videoprt.c,v 1.12 2004/03/08 08:05:26 navaraf Exp $
*/
#include "videoprt.h"
PVOID MappedAddress;
PLIST_ENTRY Entry;
+ DPRINT("- IoAddress: %lx\n", IoAddress.u.LowPart);
+ DPRINT("- NumberOfUchars: %lx\n", NumberOfUchars);
+ DPRINT("- InIoSpace: %c\n", InIoSpace);
if (0 != (InIoSpace & VIDEO_MEMORY_SPACE_P6CACHE))
{
DPRINT("VIDEO_MEMORY_SPACE_P6CACHE not supported, turning off\n");
{
DPRINT("VideoPortAllocateBuffer()\n");
- Buffer = ExAllocatePool (NonPagedPool, Size) ;
+ Buffer = ExAllocatePool(PagedPool, Size);
return STATUS_SUCCESS;
}
VideoPortGetVersion ( IN PVOID HwDeviceExtension,
IN OUT PVPOSVERSIONINFO VpOsVersionInfo )
{
- PPEB Peb;
-
- DPRINT1("VideoPortGetVersion()\n");
- if(KeGetCurrentIrql() == PASSIVE_LEVEL)
- {
- if(VpOsVersionInfo->Size >= sizeof(VPOSVERSIONINFO))
- {
- Peb = NtCurrentPeb();
- VpOsVersionInfo->MajorVersion = Peb->OSMajorVersion;
- VpOsVersionInfo->MinorVersion = Peb->OSMinorVersion;
- VpOsVersionInfo->BuildNumber = Peb->OSBuildNumber;
- VpOsVersionInfo->ServicePackMajor = Peb->SPMajorVersion;
- VpOsVersionInfo->ServicePackMinor = Peb->SPMinorVersion;
- return STATUS_SUCCESS;
- }
- else
- return ERROR_INVALID_PARAMETER;
- }
- return STATUS_UNSUCCESSFUL;
+ RTL_OSVERSIONINFOEXW Version;
+
+ Version.dwOSVersionInfoSize = sizeof(RTL_OSVERSIONINFOEXW);
+ if (VpOsVersionInfo->Size >= sizeof(VPOSVERSIONINFO))
+ {
+ if (NT_SUCCESS(RtlGetVersion((PRTL_OSVERSIONINFOW)&Version)))
+ {
+ VpOsVersionInfo->MajorVersion = Version.dwMajorVersion;
+ VpOsVersionInfo->MinorVersion = Version.dwMinorVersion;
+ VpOsVersionInfo->BuildNumber = Version.dwBuildNumber;
+ VpOsVersionInfo->ServicePackMajor = Version.wServicePackMajor;
+ VpOsVersionInfo->ServicePackMinor = Version.wServicePackMinor;
+ return STATUS_SUCCESS;
+ }
+ return STATUS_UNSUCCESSFUL;
+ }
+
+ return ERROR_INVALID_PARAMETER;
}
PVOID
* If not, write to the Free Software Foundation,
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
- * $Id: videoprt.h,v 1.4 2004/03/07 04:43:55 dwelch Exp $
+ * $Id: videoprt.h,v 1.5 2004/03/08 08:05:26 navaraf Exp $
*/
#ifndef VIDEOPRT_H
#include <ddk/video.h>
#include <ddk/ntddvdeo.h>
#include "internal/ps.h"
-#define NDEBUG
+/* #define NDEBUG */
#include <debug.h>
/*
-# $Id: Makefile,v 1.116 2004/03/02 22:36:17 dwelch Exp $
+# $Id: Makefile,v 1.117 2004/03/08 08:05:27 navaraf Exp $
#
# ReactOS Operating System
#
rtl/time.o \
rtl/timezone.o \
rtl/unicode.o \
+ rtl/version.o \
rtl/wstring.o \
rtl/capture.o
-; $Id: ntoskrnl.def,v 1.177 2004/03/07 20:31:53 navaraf Exp $
+; $Id: ntoskrnl.def,v 1.178 2004/03/08 08:05:27 navaraf Exp $
;
; reactos/ntoskrnl/ntoskrnl.def
;
;RtlGetElementGenericTable
RtlGetGroupSecurityDescriptor@12
RtlGetOwnerSecurityDescriptor@12
+RtlGetVersion@4
RtlImageNtHeader@4
RtlImageDirectoryEntryToData@16
RtlInitAnsiString@8
-; $Id: ntoskrnl.edf,v 1.163 2004/03/07 20:31:53 navaraf Exp $
+; $Id: ntoskrnl.edf,v 1.164 2004/03/08 08:05:27 navaraf Exp $
;
; reactos/ntoskrnl/ntoskrnl.def
;
;RtlGetElementGenericTable
RtlGetGroupSecurityDescriptor=RtlGetGroupSecurityDescriptor@12
RtlGetOwnerSecurityDescriptor=RtlGetOwnerSecurityDescriptor@12
+RtlGetVersion=RtlGetVersion@4
RtlImageNtHeader=RtlImageNtHeader@4
RtlImageDirectoryEntryToData=RtlImageDirectoryEntryToData@16
RtlInitAnsiString=RtlInitAnsiString@8
--- /dev/null
+/*
+ * 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/03/08 08:05:27 navaraf Exp $
+ *
+ * PROJECT: ReactOS kernel
+ * PURPOSE: Runtime code
+ * FILE: ntoskrnl/rtl/version.c
+ * PROGRAMER: Filip Navara
+ */
+
+/* INCLUDES *****************************************************************/
+
+#define __USE_W32API
+#include <ddk/ntddk.h>
+#include <internal/safe.h>
+
+/* FUNCTIONS ****************************************************************/
+
+NTSTATUS STDCALL
+RtlGetVersion(RTL_OSVERSIONINFOW *Info)
+{
+ PWCHAR 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;
+ MmCopyToCaller(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 */