ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
June 2006
----- 2024 -----
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
19 participants
595 discussions
Start a n
N
ew thread
[hpoussin] 22212: Display an error message only if we're not in the "load only boot drivers" phase
by hpoussin@svn.reactos.org
Author: hpoussin Date: Sun Jun 4 20:30:27 2006 New Revision: 22212 URL:
http://svn.reactos.ru/svn/reactos?rev=22212&view=rev
Log: Display an error message only if we're not in the "load only boot drivers" phase Modified: trunk/reactos/ntoskrnl/io/pnpmgr.c Modified: trunk/reactos/ntoskrnl/io/pnpmgr.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/ntoskrnl/io/pnpmgr.c?rev=22…
============================================================================== --- trunk/reactos/ntoskrnl/io/pnpmgr.c (original) +++ trunk/reactos/ntoskrnl/io/pnpmgr.c Sun Jun 4 20:30:27 2006 @@ -2090,10 +2090,10 @@ { IopDeviceNodeSetFlag(DeviceNode, DNF_DISABLED); IopDeviceNodeSetFlag(DeviceNode, DNF_START_FAILED); + /* FIXME: Log the error (possibly in IopInitializeDeviceNodeService) */ + CPRINT("Initialization of service %S failed (Status %x)\n", + DeviceNode->ServiceName.Buffer, Status); } - /* FIXME: Log the error (possibly in IopInitializeDeviceNodeService) */ - CPRINT("Initialization of service %S failed (Status %x)\n", - DeviceNode->ServiceName.Buffer, Status); } } else {
18 years, 5 months
1
0
0
0
[janderwald] 22211: revert _strdate modifications
by janderwald@svn.reactos.org
Author: janderwald Date: Sun Jun 4 18:24:45 2006 New Revision: 22211 URL:
http://svn.reactos.ru/svn/reactos?rev=22211&view=rev
Log: revert _strdate modifications Modified: trunk/reactos/lib/crt/time/strdate.c trunk/reactos/lib/crt/time/wstrdate.c Modified: trunk/reactos/lib/crt/time/strdate.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/lib/crt/time/strdate.c?rev=…
============================================================================== --- trunk/reactos/lib/crt/time/strdate.c (original) +++ trunk/reactos/lib/crt/time/strdate.c Sun Jun 4 18:24:45 2006 @@ -24,7 +24,6 @@ } t = time(NULL); d = localtime(&t); - - sprintf(dt,"%.2d/%.2d/%.2d",d->tm_mday,d->tm_mon+1,d->tm_year ); + sprintf(dt,"%d/%d/%d",d->tm_mday,d->tm_mon+1,d->tm_year); return dt; } Modified: trunk/reactos/lib/crt/time/wstrdate.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/lib/crt/time/wstrdate.c?rev…
============================================================================== --- trunk/reactos/lib/crt/time/wstrdate.c (original) +++ trunk/reactos/lib/crt/time/wstrdate.c Sun Jun 4 18:24:45 2006 @@ -24,6 +24,6 @@ } t = time(NULL); d = localtime(&t); - swprintf(dt,L"%.2d/%.2d/%.2d",d->tm_mday,d->tm_mon+1,d->tm_year); + swprintf(dt,L"%d/%d/%d",d->tm_mday,d->tm_mon+1,d->tm_year); return dt; }
18 years, 5 months
1
0
0
0
[fireball] 22210: Fix some warnings
by fireball@svn.reactos.org
Author: fireball Date: Sun Jun 4 18:24:08 2006 New Revision: 22210 URL:
http://svn.reactos.ru/svn/reactos?rev=22210&view=rev
Log: Fix some warnings Modified: trunk/reactos/drivers/test/kmtest/deviface.c Modified: trunk/reactos/drivers/test/kmtest/deviface.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/drivers/test/kmtest/devifac…
============================================================================== --- trunk/reactos/drivers/test/kmtest/deviface.c (original) +++ trunk/reactos/drivers/test/kmtest/deviface.c Sun Jun 4 18:24:08 2006 @@ -89,11 +89,11 @@ HANDLE SubKey; HANDLE SymbolicLinkKey; PKEY_FULL_INFORMATION fip; - PKEY_FULL_INFORMATION bfip; + PKEY_FULL_INFORMATION bfip=NULL; PKEY_BASIC_INFORMATION bip; - PKEY_VALUE_PARTIAL_INFORMATION vpip; + PKEY_VALUE_PARTIAL_INFORMATION vpip=NULL; PWCHAR SymLinkList = NULL; - ULONG SymLinkListSize; + ULONG SymLinkListSize = 0; NTSTATUS Status; ULONG Size = 0; ULONG i = 0;
18 years, 5 months
1
0
0
0
[fireball] 22209: Delete unneeded makefile
by fireball@svn.reactos.org
Author: fireball Date: Sun Jun 4 18:19:48 2006 New Revision: 22209 URL:
http://svn.reactos.ru/svn/reactos?rev=22209&view=rev
Log: Delete unneeded makefile Removed: trunk/reactos/drivers/test/csqtest/GNUmakefile Removed: trunk/reactos/drivers/test/csqtest/GNUmakefile URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/drivers/test/csqtest/GNUmak…
============================================================================== --- trunk/reactos/drivers/test/csqtest/GNUmakefile (original) +++ trunk/reactos/drivers/test/csqtest/GNUmakefile (removed) @@ -1,10 +1,0 @@ -PATH_TO_TOP = ../../.. - -TARGET_TYPE = driver -TARGET_NAME = csqtest -TARGET_DDKLIBS = csq.a -TARGET_CFLAGS = -Wall -Werror -TARGET_OBJECTS = csqtest.o - -include $(PATH_TO_TOP)/rules.mak -include $(TOOLS_PATH)/helper.mk
18 years, 5 months
1
0
0
0
[fireball] 22208: - Add csqtest to build-system - Add initial Kernel-Mode regression testing framework (thanks to Filip Navara for his PnPTest, thanks to Alexandre Julliard for Wine regression testing framework). Framework consists of: the driver (kmtest.sys) and the loader (kmtloader.exe).
by fireball@svn.reactos.org
Author: fireball Date: Sun Jun 4 18:18:24 2006 New Revision: 22208 URL:
http://svn.reactos.ru/svn/reactos?rev=22208&view=rev
Log: - Add csqtest to build-system - Add initial Kernel-Mode regression testing framework (thanks to Filip Navara for his PnPTest, thanks to Alexandre Julliard for Wine regression testing framework). Framework consists of: the driver (kmtest.sys) and the loader (kmtloader.exe). Added: trunk/reactos/drivers/test/csqtest/csqtest.rbuild (with props) trunk/reactos/drivers/test/directory.rbuild (with props) trunk/reactos/drivers/test/kmtest/ trunk/reactos/drivers/test/kmtest/deviface.c (with props) trunk/reactos/drivers/test/kmtest/deviface_test.c (with props) trunk/reactos/drivers/test/kmtest/kmtest.c (with props) trunk/reactos/drivers/test/kmtest/kmtest.h (with props) trunk/reactos/drivers/test/kmtest/kmtest.rbuild (with props) trunk/reactos/drivers/test/kmtest/kmtest.rc (with props) trunk/reactos/drivers/test/kmtest/ntos_io.c (with props) trunk/reactos/regtests/kmtloader/ trunk/reactos/regtests/kmtloader/kmtloader.c (with props) trunk/reactos/regtests/kmtloader/kmtloader.rbuild (with props) Modified: trunk/reactos/drivers/drivers.rbuild trunk/reactos/regtests/directory.rbuild Modified: trunk/reactos/drivers/drivers.rbuild URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/drivers/drivers.rbuild?rev=…
============================================================================== --- trunk/reactos/drivers/drivers.rbuild (original) +++ trunk/reactos/drivers/drivers.rbuild Sun Jun 4 18:18:24 2006 @@ -20,6 +20,9 @@ <directory name="storage"> <xi:include href="storage/directory.rbuild" /> </directory> +<directory name="test"> + <xi:include href="test/directory.rbuild" /> +</directory> <directory name="usb"> <xi:include href="usb/directory.rbuild" /> </directory> Added: trunk/reactos/drivers/test/csqtest/csqtest.rbuild URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/drivers/test/csqtest/csqtes…
============================================================================== --- trunk/reactos/drivers/test/csqtest/csqtest.rbuild (added) +++ trunk/reactos/drivers/test/csqtest/csqtest.rbuild Sun Jun 4 18:18:24 2006 @@ -1,0 +1,9 @@ +<module name="csqtest" type="kernelmodedriver" installbase="system32/drivers" installname="csqtest.sys"> + <bootstrap base="reactos" /> + <define name="__USE_W32API" /> + <include base="ReactOS">include/reactos/drivers</include> + <library>ntoskrnl</library> + <library>hal</library> + <file>csqtest.c</file> + <file>csqtest.rc</file> +</module> Propchange: trunk/reactos/drivers/test/csqtest/csqtest.rbuild ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/drivers/test/directory.rbuild URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/drivers/test/directory.rbui…
============================================================================== --- trunk/reactos/drivers/test/directory.rbuild (added) +++ trunk/reactos/drivers/test/directory.rbuild Sun Jun 4 18:18:24 2006 @@ -1,0 +1,6 @@ +<directory name="csqtest"> + <xi:include href="csqtest/csqtest.rbuild" /> +</directory> +<directory name="kmtest"> + <xi:include href="kmtest/kmtest.rbuild" /> +</directory> Propchange: trunk/reactos/drivers/test/directory.rbuild ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/drivers/test/kmtest/deviface.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/drivers/test/kmtest/devifac…
============================================================================== --- trunk/reactos/drivers/test/kmtest/deviface.c (added) +++ trunk/reactos/drivers/test/kmtest/deviface.c Sun Jun 4 18:18:24 2006 @@ -1,0 +1,542 @@ +/* + * PnP Test + * ReactOS Device Interface functions implementation + * + * Copyright 2003, 2004 Filip Navara <xnavara(a)volny.cz> + * Copyright 2003, 2004 Matthew Brace <ismarc(a)austin.rr.com> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library 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 + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; see the file COPYING.LIB. + * If not, write to the Free Software Foundation, + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +/* INCLUDES *******************************************************************/ + +#include <ddk/ntddk.h> +#include "kmtest.h" + +/* PUBLIC FUNCTIONS ***********************************************************/ + +/* + * IoGetDeviceInterfaces + * + * Returns a list of device interfaces of a particular device interface class. + * + * Parameters + * InterfaceClassGuid + * Points to a class GUID specifying the device interface class. + * + * PhysicalDeviceObject + * Points to an optional PDO that narrows the search to only the + * device interfaces of the device represented by the PDO. + * + * Flags + * Specifies flags that modify the search for device interfaces. The + * DEVICE_INTERFACE_INCLUDE_NONACTIVE flag specifies that the list of + * returned symbolic links should contain also disabled device + * interfaces in addition to the enabled ones. + * + * SymbolicLinkList + * Points to a character pointer that is filled in on successful return + * with a list of unicode strings identifying the device interfaces + * that match the search criteria. The newly allocated buffer contains + * a list of symbolic link names. Each unicode string in the list is + * null-terminated; the end of the whole list is marked by an additional + * NULL. The caller is responsible for freeing the buffer (ExFreePool) + * when it is no longer needed. + * If no device interfaces match the search criteria, this routine + * returns STATUS_SUCCESS and the string contains a single NULL + * character. + * + * Status + * @unimplemented + * + * The parameters PhysicalDeviceObject and Flags aren't correctly + * processed. Rest of the cases was tested under Win XP and the + * function worked correctly. + */ + +NTSTATUS STDCALL +ReactOS_IoGetDeviceInterfaces( + IN CONST GUID *InterfaceClassGuid, + IN PDEVICE_OBJECT PhysicalDeviceObject OPTIONAL, + IN ULONG Flags, + OUT PWSTR *SymbolicLinkList) +{ + PWCHAR BaseKeyString = L"\\Registry\\Machine\\System\\CurrentControlSet\\Control\\DeviceClasses\\"; + PWCHAR BaseInterfaceString = L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\"; + UNICODE_STRING GuidString; + UNICODE_STRING BaseKeyName; + UNICODE_STRING AliasKeyName; + UNICODE_STRING SymbolicLink; + UNICODE_STRING Control; + UNICODE_STRING SubKeyName; + UNICODE_STRING SymbolicLinkKeyName; + UNICODE_STRING ControlKeyName; + UNICODE_STRING TempString; + HANDLE InterfaceKey; + HANDLE SubKey; + HANDLE SymbolicLinkKey; + PKEY_FULL_INFORMATION fip; + PKEY_FULL_INFORMATION bfip; + PKEY_BASIC_INFORMATION bip; + PKEY_VALUE_PARTIAL_INFORMATION vpip; + PWCHAR SymLinkList = NULL; + ULONG SymLinkListSize; + NTSTATUS Status; + ULONG Size = 0; + ULONG i = 0; + ULONG j = 0; + OBJECT_ATTRIBUTES ObjectAttributes; + + Status = RtlStringFromGUID(InterfaceClassGuid, &GuidString); + if (!NT_SUCCESS(Status)) + { + DPRINT("RtlStringFromGUID() Failed.\n"); + return STATUS_INVALID_HANDLE; + } + + RtlInitUnicodeString(&AliasKeyName, BaseInterfaceString); + RtlInitUnicodeString(&SymbolicLink, L"SymbolicLink"); + RtlInitUnicodeString(&Control, L"\\Control"); + BaseKeyName.Length = wcslen(BaseKeyString) * sizeof(WCHAR); + BaseKeyName.MaximumLength = BaseKeyName.Length + (38 * sizeof(WCHAR)); + BaseKeyName.Buffer = ExAllocatePool( + NonPagedPool, + BaseKeyName.MaximumLength); + ASSERT(BaseKeyName.Buffer != NULL); + wcscpy(BaseKeyName.Buffer, BaseKeyString); + RtlAppendUnicodeStringToString(&BaseKeyName, &GuidString); + + if (PhysicalDeviceObject) + { + WCHAR GuidBuffer[40]; + UNICODE_STRING PdoGuidString; + + RtlFreeUnicodeString(&BaseKeyName); + + IoGetDeviceProperty( + PhysicalDeviceObject, + DevicePropertyClassGuid, + sizeof(GuidBuffer), + GuidBuffer, + &Size); + + RtlInitUnicodeString(&PdoGuidString, GuidBuffer); + if (RtlCompareUnicodeString(&GuidString, &PdoGuidString, TRUE)) + { + DPRINT("Inconsistent Guid's asked for in IoGetDeviceInterfaces()\n"); + return STATUS_INVALID_HANDLE; + } + + DPRINT("IoGetDeviceInterfaces() called with PDO, not implemented.\n"); + return STATUS_NOT_IMPLEMENTED; + } + else + { + InitializeObjectAttributes( + &ObjectAttributes, + &BaseKeyName, + OBJ_CASE_INSENSITIVE, + NULL, + NULL); + + Status = ZwOpenKey( + &InterfaceKey, + KEY_READ, + &ObjectAttributes); + + if (!NT_SUCCESS(Status)) + { + DPRINT("ZwOpenKey() Failed. (0x%X)\n", Status); + RtlFreeUnicodeString(&BaseKeyName); + return Status; + } + + Status = ZwQueryKey( + InterfaceKey, + KeyFullInformation, + NULL, + 0, + &Size); + + if (Status != STATUS_BUFFER_TOO_SMALL) + { + DPRINT("ZwQueryKey() Failed. (0x%X)\n", Status); + RtlFreeUnicodeString(&BaseKeyName); + ZwClose(InterfaceKey); + return Status; + } + + fip = (PKEY_FULL_INFORMATION)ExAllocatePool(NonPagedPool, Size); + ASSERT(fip != NULL); + + Status = ZwQueryKey( + InterfaceKey, + KeyFullInformation, + fip, + Size, + &Size); + + if (!NT_SUCCESS(Status)) + { + DPRINT("ZwQueryKey() Failed. (0x%X)\n", Status); + ExFreePool(fip); + RtlFreeUnicodeString(&BaseKeyName); + ZwClose(InterfaceKey); + return Status; + } + + for (; i < fip->SubKeys; i++) + { + Status = ZwEnumerateKey( + InterfaceKey, + i, + KeyBasicInformation, + NULL, + 0, + &Size); + + if (Status != STATUS_BUFFER_TOO_SMALL) + { + DPRINT("ZwEnumerateKey() Failed.(0x%X)\n", Status); + ExFreePool(fip); + if (SymLinkList != NULL) + ExFreePool(SymLinkList); + RtlFreeUnicodeString(&BaseKeyName); + ZwClose(InterfaceKey); + return Status; + } + + bip = (PKEY_BASIC_INFORMATION)ExAllocatePool(NonPagedPool, Size); + ASSERT(bip != NULL); + + Status = ZwEnumerateKey( + InterfaceKey, + i, + KeyBasicInformation, + bip, + Size, + &Size); + + if (!NT_SUCCESS(Status)) + { + DPRINT("ZwEnumerateKey() Failed.(0x%X)\n", Status); + ExFreePool(fip); + ExFreePool(bip); + if (SymLinkList != NULL) + ExFreePool(SymLinkList); + RtlFreeUnicodeString(&BaseKeyName); + ZwClose(InterfaceKey); + return Status; + } + + SubKeyName.Length = 0; + SubKeyName.MaximumLength = BaseKeyName.Length + bip->NameLength + sizeof(WCHAR); + SubKeyName.Buffer = ExAllocatePool(NonPagedPool, SubKeyName.MaximumLength); + ASSERT(SubKeyName.Buffer != NULL); + TempString.Length = TempString.MaximumLength = bip->NameLength; + TempString.Buffer = bip->Name; + RtlCopyUnicodeString(&SubKeyName, &BaseKeyName); + RtlAppendUnicodeToString(&SubKeyName, L"\\"); + RtlAppendUnicodeStringToString(&SubKeyName, &TempString); + + ExFreePool(bip); + + InitializeObjectAttributes( + &ObjectAttributes, + &SubKeyName, + OBJ_CASE_INSENSITIVE, + NULL, + NULL); + + Status = ZwOpenKey( + &SubKey, + KEY_READ, + &ObjectAttributes); + + if (!NT_SUCCESS(Status)) + { + DPRINT("ZwOpenKey() Failed. (0x%X)\n", Status); + ExFreePool(fip); + if (SymLinkList != NULL) + ExFreePool(SymLinkList); + RtlFreeUnicodeString(&SubKeyName); + RtlFreeUnicodeString(&BaseKeyName); + ZwClose(InterfaceKey); + return Status; + } + + Status = ZwQueryKey( + SubKey, + KeyFullInformation, + NULL, + 0, + &Size); + + if (Status != STATUS_BUFFER_TOO_SMALL) + { + DPRINT("ZwQueryKey() Failed. (0x%X)\n", Status); + ExFreePool(fip); + RtlFreeUnicodeString(&BaseKeyName); + RtlFreeUnicodeString(&SubKeyName); + ZwClose(SubKey); + ZwClose(InterfaceKey); + return Status; + } + + bfip = (PKEY_FULL_INFORMATION)ExAllocatePool(NonPagedPool, Size); + ASSERT(bfip != NULL); + + Status = ZwQueryKey( + SubKey, + KeyFullInformation, + bfip, + Size, + &Size); + + if (!NT_SUCCESS(Status)) + { + DPRINT("ZwQueryKey() Failed. (0x%X)\n", Status); + ExFreePool(fip); + RtlFreeUnicodeString(&SubKeyName); + RtlFreeUnicodeString(&BaseKeyName); + ZwClose(SubKey); + ZwClose(InterfaceKey); + return Status; + } + + for(j = 0; j < bfip->SubKeys; j++) + { + Status = ZwEnumerateKey( + SubKey, + j, + KeyBasicInformation, + NULL, + 0, + &Size); + + if (Status == STATUS_NO_MORE_ENTRIES) + continue; + + if (Status != STATUS_BUFFER_TOO_SMALL) + { + DPRINT("ZwEnumerateKey() Failed.(0x%X)\n", Status); + ExFreePool(bfip); + ExFreePool(fip); + if (SymLinkList != NULL) + ExFreePool(SymLinkList); + RtlFreeUnicodeString(&SubKeyName); + RtlFreeUnicodeString(&BaseKeyName); + ZwClose(SubKey); + ZwClose(InterfaceKey); + return Status; + } + + bip = (PKEY_BASIC_INFORMATION)ExAllocatePool(NonPagedPool, Size); + ASSERT(bip != NULL); + + Status = ZwEnumerateKey( + SubKey, + j, + KeyBasicInformation, + bip, + Size, + &Size); + + if (!NT_SUCCESS(Status)) + { + DPRINT("ZwEnumerateKey() Failed.(0x%X)\n", Status); + ExFreePool(fip); + ExFreePool(bfip); + ExFreePool(bip); + if (SymLinkList != NULL) + ExFreePool(SymLinkList); + RtlFreeUnicodeString(&SubKeyName); + RtlFreeUnicodeString(&BaseKeyName); + ZwClose(SubKey); + ZwClose(InterfaceKey); + return Status; + } + + if (!wcsncmp(bip->Name, L"Control", bip->NameLength)) + { + continue; + } + + SymbolicLinkKeyName.Length = 0; + SymbolicLinkKeyName.MaximumLength = SubKeyName.Length + bip->NameLength + sizeof(WCHAR); + SymbolicLinkKeyName.Buffer = ExAllocatePool(NonPagedPool, SymbolicLinkKeyName.MaximumLength); + ASSERT(SymbolicLinkKeyName.Buffer != NULL); + TempString.Length = TempString.MaximumLength = bip->NameLength; + TempString.Buffer = bip->Name; + RtlCopyUnicodeString(&SymbolicLinkKeyName, &SubKeyName); + RtlAppendUnicodeToString(&SymbolicLinkKeyName, L"\\"); + RtlAppendUnicodeStringToString(&SymbolicLinkKeyName, &TempString); + + ControlKeyName.Length = 0; + ControlKeyName.MaximumLength = SymbolicLinkKeyName.Length + Control.Length + sizeof(WCHAR); + ControlKeyName.Buffer = ExAllocatePool(NonPagedPool, ControlKeyName.MaximumLength); + ASSERT(ControlKeyName.Buffer != NULL); + RtlCopyUnicodeString(&ControlKeyName, &SymbolicLinkKeyName); + RtlAppendUnicodeStringToString(&ControlKeyName, &Control); + + ExFreePool(bip); + + InitializeObjectAttributes( + &ObjectAttributes, + &SymbolicLinkKeyName, + OBJ_CASE_INSENSITIVE, + NULL, + NULL); + + Status = ZwOpenKey( + &SymbolicLinkKey, + KEY_READ, + &ObjectAttributes); + + if (!NT_SUCCESS(Status)) + { + DPRINT("ZwOpenKey() Failed. (0x%X)\n", Status); + ExFreePool(fip); + ExFreePool(bfip); + if (SymLinkList != NULL) + ExFreePool(SymLinkList); + RtlFreeUnicodeString(&SymbolicLinkKeyName); + RtlFreeUnicodeString(&SubKeyName); + RtlFreeUnicodeString(&BaseKeyName); + ZwClose(SubKey); + ZwClose(InterfaceKey); + return Status; + } + + Status = ZwQueryValueKey( + SymbolicLinkKey, + &SymbolicLink, + KeyValuePartialInformation, + NULL, + 0, + &Size); + + if (Status == STATUS_OBJECT_NAME_NOT_FOUND) + continue; + + if (Status != STATUS_BUFFER_TOO_SMALL) + { + DPRINT("ZwQueryValueKey() Failed.(0x%X)\n", Status); + ExFreePool(fip); + ExFreePool(bfip); + if (SymLinkList != NULL) + ExFreePool(SymLinkList); + RtlFreeUnicodeString(&SymbolicLinkKeyName); + RtlFreeUnicodeString(&SubKeyName); + RtlFreeUnicodeString(&BaseKeyName); + ZwClose(SymbolicLinkKey); + ZwClose(SubKey); + ZwClose(InterfaceKey); + return Status; + } + + vpip = (PKEY_VALUE_PARTIAL_INFORMATION)ExAllocatePool(NonPagedPool, Size); + ASSERT(vpip != NULL); + + Status = ZwQueryValueKey( + SymbolicLinkKey, + &SymbolicLink, + KeyValuePartialInformation, + vpip, + Size, + &Size); + + if (!NT_SUCCESS(Status)) + { + DPRINT("ZwQueryValueKey() Failed.(0x%X)\n", Status); + ExFreePool(fip); + ExFreePool(bfip); + ExFreePool(vpip); + if (SymLinkList != NULL) + ExFreePool(SymLinkList); + RtlFreeUnicodeString(&SymbolicLinkKeyName); + RtlFreeUnicodeString(&SubKeyName); + RtlFreeUnicodeString(&BaseKeyName); + ZwClose(SymbolicLinkKey); + ZwClose(SubKey); + ZwClose(InterfaceKey); + return Status; + } + + Status = RtlCheckRegistryKey(RTL_REGISTRY_ABSOLUTE, ControlKeyName.Buffer); + + if (NT_SUCCESS(Status)) + { + /* Put the name in the string here */ + if (SymLinkList == NULL) + { + SymLinkListSize = vpip->DataLength; + SymLinkList = ExAllocatePool(NonPagedPool, SymLinkListSize + sizeof(WCHAR)); + ASSERT(SymLinkList != NULL); + RtlCopyMemory(SymLinkList, vpip->Data, vpip->DataLength); + SymLinkList[vpip->DataLength / sizeof(WCHAR)] = 0; + SymLinkList[1] = '?'; + } + else + { + PWCHAR OldSymLinkList; + ULONG OldSymLinkListSize; + PWCHAR SymLinkListPtr; + + OldSymLinkList = SymLinkList; + OldSymLinkListSize = SymLinkListSize; + SymLinkListSize += vpip->DataLength; + SymLinkList = ExAllocatePool(NonPagedPool, SymLinkListSize + sizeof(WCHAR)); + ASSERT(SymLinkList != NULL); + RtlCopyMemory(SymLinkList, OldSymLinkList, OldSymLinkListSize); + ExFreePool(OldSymLinkList); + SymLinkListPtr = SymLinkList + (OldSymLinkListSize / sizeof(WCHAR)); + RtlCopyMemory(SymLinkListPtr, vpip->Data, vpip->DataLength); + SymLinkListPtr[vpip->DataLength / sizeof(WCHAR)] = 0; + SymLinkListPtr[1] = '?'; + } + } + + RtlFreeUnicodeString(&SymbolicLinkKeyName); + RtlFreeUnicodeString(&ControlKeyName); + ZwClose(SymbolicLinkKey); + } + + ExFreePool(vpip); + RtlFreeUnicodeString(&SubKeyName); + ZwClose(SubKey); + } + + if (SymLinkList != NULL) + { + SymLinkList[SymLinkListSize / sizeof(WCHAR)] = 0; + } + else + { + SymLinkList = ExAllocatePool(NonPagedPool, 2 * sizeof(WCHAR)); + SymLinkList[0] = 0; + } + + *SymbolicLinkList = SymLinkList; + + RtlFreeUnicodeString(&BaseKeyName); + ZwClose(InterfaceKey); + ExFreePool(bfip); + ExFreePool(fip); + } + + return STATUS_SUCCESS; +} Propchange: trunk/reactos/drivers/test/kmtest/deviface.c ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/drivers/test/kmtest/deviface_test.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/drivers/test/kmtest/devifac…
============================================================================== --- trunk/reactos/drivers/test/kmtest/deviface_test.c (added) +++ trunk/reactos/drivers/test/kmtest/deviface_test.c Sun Jun 4 18:18:24 2006 @@ -1,0 +1,109 @@ +/* + * PnP Test + * Device Interface functions test + * + * Copyright 2004 Filip Navara <xnavara(a)volny.cz> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library 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 + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; see the file COPYING.LIB. + * If not, write to the Free Software Foundation, + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +/* INCLUDES *******************************************************************/ + +#include <ddk/ntddk.h> +#include "kmtest.h" + +/* PRIVATE FUNCTIONS **********************************************************/ + +NTSTATUS STDCALL +(*IoGetDeviceInterfaces_Func)( + IN CONST GUID *InterfaceClassGuid, + IN PDEVICE_OBJECT PhysicalDeviceObject OPTIONAL, + IN ULONG Flags, + OUT PWSTR *SymbolicLinkList); + +NTSTATUS STDCALL +ReactOS_IoGetDeviceInterfaces( + IN CONST GUID *InterfaceClassGuid, + IN PDEVICE_OBJECT PhysicalDeviceObject OPTIONAL, + IN ULONG Flags, + OUT PWSTR *SymbolicLinkList); + +VOID FASTCALL DeviceInterfaceTest_Func() +{ + NTSTATUS Status; + PWSTR SymbolicLinkList; + PWSTR SymbolicLinkListPtr; + GUID Guid = {0x378de44c, 0x56ef, 0x11d1, {0xbc, 0x8c, 0x00, 0xa0, 0xc9, 0x14, 0x05, 0xdd}}; + + Status = IoGetDeviceInterfaces_Func( + &Guid, + NULL, + 0, + &SymbolicLinkList); + + if (!NT_SUCCESS(Status)) + { + DPRINT( + "[PnP Test] IoGetDeviceInterfaces failed with status 0x%X\n", + Status); + return; + } + + DPRINT("[PnP Test] IoGetDeviceInterfaces results:\n"); + for (SymbolicLinkListPtr = SymbolicLinkList; + SymbolicLinkListPtr[0] != 0 && SymbolicLinkListPtr[1] != 0; + SymbolicLinkListPtr += wcslen(SymbolicLinkListPtr) + 1) + { + DPRINT("[PnP Test] %S\n", SymbolicLinkListPtr); + } + +#if 0 + DPRINT("[PnP Test] Trying to get aliases\n"); + + for (SymbolicLinkListPtr = SymbolicLinkList; + SymbolicLinkListPtr[0] != 0 && SymbolicLinkListPtr[1] != 0; + SymbolicLinkListPtr += wcslen(SymbolicLinkListPtr) + 1) + { + UNICODE_STRING SymbolicLink; + UNICODE_STRING AliasSymbolicLink; + + SymbolicLink.Buffer = SymbolicLinkListPtr; + SymbolicLink.Length = SymbolicLink.MaximumLength = wcslen(SymbolicLinkListPtr); + RtlInitUnicodeString(&AliasSymbolicLink, NULL); + IoGetDeviceInterfaceAlias( + &SymbolicLink, + &AliasGuid, + &AliasSymbolicLink); + if (AliasSymbolicLink.Buffer != NULL) + { + DPRINT("[PnP Test] Original: %S\n", SymbolicLinkListPtr); + DPRINT("[PnP Test] Alias: %S\n", AliasSymbolicLink.Buffer); + } + } +#endif + + ExFreePool(SymbolicLinkList); +} + +VOID FASTCALL DeviceInterfaceTest() +{ + DPRINT("Calling DeviceInterfaceTest_Func with native functions\n"); + IoGetDeviceInterfaces_Func = IoGetDeviceInterfaces; + DeviceInterfaceTest_Func(); + DPRINT("Calling DeviceInterfaceTest_Func with ReactOS functions\n"); + IoGetDeviceInterfaces_Func = ReactOS_IoGetDeviceInterfaces; + DeviceInterfaceTest_Func(); +} Propchange: trunk/reactos/drivers/test/kmtest/deviface_test.c ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/drivers/test/kmtest/kmtest.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/drivers/test/kmtest/kmtest.…
============================================================================== --- trunk/reactos/drivers/test/kmtest/kmtest.c (added) +++ trunk/reactos/drivers/test/kmtest/kmtest.c Sun Jun 4 18:18:24 2006 @@ -1,0 +1,122 @@ +/* + * Kernel Mode regression Test + * Driver Core + * + * Copyright 2004 Filip Navara <xnavara(a)volny.cz> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library 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 + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; see the file COPYING.LIB. + * If not, write to the Free Software Foundation, + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +/* INCLUDES *******************************************************************/ + +#include <ddk/ntddk.h> +#include "kmtest.h" + +ULONG successes; +ULONG failures; +tls_data glob_data; + +/* PRIVATE FUNCTIONS ***********************************************************/ +VOID +StartTest() +{ + successes = 0; + failures = 0; +} + +VOID +FinishTest(LPSTR TestName) +{ + DbgPrint("Test %s finished with %d succeses and %d failures\n", TestName, successes, failures); +} + +void kmtest_set_location(const char* file, int line) +{ + glob_data.current_file=strrchr(file,'/'); + if (glob_data.current_file==NULL) + glob_data.current_file=strrchr(file,'\\'); + if (glob_data.current_file==NULL) + glob_data.current_file=file; + else + glob_data.current_file++; + glob_data.current_line=line; +} + +/* + * Checks condition. + * Parameters: + * - condition - condition to check; + * - msg test description; + * - file - test application source code file name of the check + * - line - test application source code file line number of the check + * Return: + * 0 if condition does not have the expected value, 1 otherwise + */ +int kmtest_ok(int condition, const char *msg, ... ) +{ + va_list valist; + + if (!condition) + { + if (msg[0]) + { + char string[1024]; + va_start(valist, msg); + vsprintf(string, msg, valist); + DbgPrint( "%s:%d: Test failed: %s\n", + glob_data.current_file, glob_data.current_line, string ); + va_end(valist); + } + else + { + DbgPrint( "%s:%d: Test failed\n", + glob_data.current_file, glob_data.current_line ); + } + InterlockedIncrement(&failures); + return 0; + } + else + {/* + if (report_success) + fprintf( stdout, "%s:%d: Test succeeded\n", + glob_data.current_file, glob_data.current_line);*/ + InterlockedIncrement(&successes); + } + return 1; +} + +/* PUBLIC FUNCTIONS ***********************************************************/ + +/* + * Test Declarations + */ +VOID FASTCALL DeviceInterfaceTest(); +VOID FASTCALL NtoskrnlIoMdlTest(); + +/* + * DriverEntry + */ +NTSTATUS +NTAPI +DriverEntry(PDRIVER_OBJECT DriverObject, + PUNICODE_STRING RegistryPath) +{ + DbgPrint("Kernel Mode Regression Test driver starting...\n"); + //DeviceInterfaceTest(); + NtoskrnlIoMdlTest(); + + return STATUS_UNSUCCESSFUL; +} Propchange: trunk/reactos/drivers/test/kmtest/kmtest.c ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/drivers/test/kmtest/kmtest.h URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/drivers/test/kmtest/kmtest.…
============================================================================== --- trunk/reactos/drivers/test/kmtest/kmtest.h (added) +++ trunk/reactos/drivers/test/kmtest/kmtest.h Sun Jun 4 18:18:24 2006 @@ -1,0 +1,53 @@ +#ifndef PNPTEST_H +#define PNPTEST_H + +#include <stdio.h> +#include <stdarg.h> + +/* + Some macros, structs, and vars are based or inspired from the great + Wine regression tests Copyright (C) 2002 Alexandre Julliard. + Everything else is done by Aleksey Bragin based on PnPTest by Filip Navara +*/ + +#if 0 +#define DPRINT DbgPrint("%s:%d ", __FILE__, __LINE__), DbgPrint +#else +#define DPRINT DbgPrint +#endif + +extern ULONG successes; /* number of successful tests */ +extern ULONG failures; /* number of failures */ +//static ULONG todo_successes; /* number of successful tests inside todo block */ +//static ULONG todo_failures; /* number of failures inside todo block */ + +// We don't do multithreading, so we just keep this struct in a global var +typedef struct +{ + const char* current_file; /* file of current check */ + int current_line; /* line of current check */ + int todo_level; /* current todo nesting level */ + int todo_do_loop; +} tls_data; + +extern tls_data glob_data; + +VOID StartTest(); +VOID FinishTest(LPSTR TestName); +void kmtest_set_location(const char* file, int line); + +#ifdef __GNUC__ + +extern int kmtest_ok( int condition, const char *msg, ... ) __attribute__((format (printf,2,3) )); + +#else /* __GNUC__ */ + +extern int kmtest_ok( int condition, const char *msg, ... ); + +#endif /* __GNUC__ */ + + +#define ok_(file, line) (kmtest_set_location(file, line), 0) ? 0 : kmtest_ok +#define ok ok_(__FILE__, __LINE__) + +#endif /* PNPTEST_H */ Propchange: trunk/reactos/drivers/test/kmtest/kmtest.h ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/drivers/test/kmtest/kmtest.rbuild URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/drivers/test/kmtest/kmtest.…
============================================================================== --- trunk/reactos/drivers/test/kmtest/kmtest.rbuild (added) +++ trunk/reactos/drivers/test/kmtest/kmtest.rbuild Sun Jun 4 18:18:24 2006 @@ -1,0 +1,12 @@ +<module name="kmtest" type="kernelmodedriver" installbase="system32/drivers" installname="kmtest.sys"> + <bootstrap base="reactos" /> + <define name="__USE_W32API" /> + <include base="ReactOS">include/reactos/drivers</include> + <library>ntoskrnl</library> + <library>hal</library> + <file>kmtest.c</file> + <file>deviface.c</file> + <file>deviface_test.c</file> + <file>ntos_io.c</file> + <file>kmtest.rc</file> +</module> Propchange: trunk/reactos/drivers/test/kmtest/kmtest.rbuild ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/drivers/test/kmtest/kmtest.rc URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/drivers/test/kmtest/kmtest.…
============================================================================== --- trunk/reactos/drivers/test/kmtest/kmtest.rc (added) +++ trunk/reactos/drivers/test/kmtest/kmtest.rc Sun Jun 4 18:18:24 2006 @@ -1,0 +1,7 @@ +/* $Id: csqtest.rc 21842 2006-05-07 19:16:11Z ion $ */ + +#define REACTOS_VERSION_DLL +#define REACTOS_STR_FILE_DESCRIPTION "Kernel Mode Regression Tests\0" +#define REACTOS_STR_INTERNAL_NAME "kmtest\0" +#define REACTOS_STR_ORIGINAL_FILENAME "kmtest.sys\0" +#include <reactos/version.rc> Propchange: trunk/reactos/drivers/test/kmtest/kmtest.rc ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/drivers/test/kmtest/ntos_io.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/drivers/test/kmtest/ntos_io…
============================================================================== --- trunk/reactos/drivers/test/kmtest/ntos_io.c (added) +++ trunk/reactos/drivers/test/kmtest/ntos_io.c Sun Jun 4 18:18:24 2006 @@ -1,0 +1,44 @@ +/* + * NTOSKRNL Io Regressions KM-Test + * ReactOS Device Interface functions implementation + * + * Copyright 2006 Aleksey Bragin <aleksey(a)reactos.org> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library 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 + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; see the file COPYING.LIB. + * If not, write to the Free Software Foundation, + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +/* INCLUDES *******************************************************************/ + +#include <ddk/ntddk.h> +#include "kmtest.h" + +/* PUBLIC FUNCTIONS ***********************************************************/ + +VOID FASTCALL NtoskrnlIoMdlTest() +{ + PMDL Mdl; + + StartTest(); + + // Try to alloc 2Gb MDL + Mdl = IoAllocateMdl(NULL, 2048UL*0x100000, FALSE, FALSE, NULL); + + ok(Mdl == NULL, "IoAllocateMdl should fail allocation of 2Gb or more, but got Mdl=0x%X", (UINT)Mdl); + if (Mdl) + IoFreeMdl(Mdl); + + FinishTest("NTOSKRNL Io Mdl"); +} Propchange: trunk/reactos/drivers/test/kmtest/ntos_io.c ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/regtests/directory.rbuild URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/regtests/directory.rbuild?r…
============================================================================== --- trunk/reactos/regtests/directory.rbuild (original) +++ trunk/reactos/regtests/directory.rbuild Sun Jun 4 18:18:24 2006 @@ -1,4 +1,7 @@ <group> +<directory name="kmtloader"> + <xi:include href="kmtloader/kmtloader.rbuild" /> +</directory> <directory name="regtests"> <xi:include href="regtests/regtests.rbuild" /> </directory> Added: trunk/reactos/regtests/kmtloader/kmtloader.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/regtests/kmtloader/kmtloade…
============================================================================== --- trunk/reactos/regtests/kmtloader/kmtloader.c (added) +++ trunk/reactos/regtests/kmtloader/kmtloader.c Sun Jun 4 18:18:24 2006 @@ -1,0 +1,90 @@ +/* + * Kernel-Mode Tests Loader (based on PnP Test Driver Loader by Filip Navara) + * + * Copyright 2004 Filip Navara <xnavara(a)volny.cz> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library 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 + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; see the file COPYING.LIB. + * If not, write to the Free Software Foundation, + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +/* INCLUDES *******************************************************************/ + +#include <windows.h> +#include <stdio.h> + +/* PUBLIC FUNCTIONS ***********************************************************/ + +int main() +{ + SC_HANDLE schSCManager; + SC_HANDLE schService; + PWCHAR DriverName = L"KMTEST"; + WCHAR ServiceExe[MAX_PATH]; + + printf("Kernel Mode Tests loader\n\n"); + GetCurrentDirectoryW(MAX_PATH, ServiceExe); + wcscat(ServiceExe, L"\\kmtest.sys"); + + printf("Opening SC Manager...\n"); + schSCManager = OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS); + + if (schSCManager == NULL) + { + DWORD Err = GetLastError(); + printf("OpenSCManager failed with error 0x%lx\n", Err); + return 0; + } + + printf("Creating service...\n"); + schService = CreateServiceW( + schSCManager, + DriverName, + DriverName, + SERVICE_ALL_ACCESS, + SERVICE_KERNEL_DRIVER, + SERVICE_DEMAND_START, + SERVICE_ERROR_NORMAL, + ServiceExe, + NULL, + NULL, + NULL, + NULL, + NULL); + + if (schService == NULL) + { + printf("Opening service...\n"); + schService = OpenServiceW(schSCManager, DriverName, SERVICE_ALL_ACCESS); + } + + if (schService == NULL) + { + DWORD Err = GetLastError(); + printf("Create/OpenService failed with error 0x%lx\n", Err); + CloseServiceHandle(schSCManager); + return 0; + } + + //for (;;) ; + + printf("Starting service...\n"); + StartService(schService, 0, NULL); + + printf("Cleaning up and exiting\n"); + CloseServiceHandle(schService); + CloseServiceHandle(schSCManager); + + return 0; +} Propchange: trunk/reactos/regtests/kmtloader/kmtloader.c ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/regtests/kmtloader/kmtloader.rbuild URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/regtests/kmtloader/kmtloade…
============================================================================== --- trunk/reactos/regtests/kmtloader/kmtloader.rbuild (added) +++ trunk/reactos/regtests/kmtloader/kmtloader.rbuild Sun Jun 4 18:18:24 2006 @@ -1,0 +1,5 @@ +<module name="kmtloader" type="win32cui" installbase="system32" installname="kmtloader.exe"> + <define name="__USE_W32API" /> +<!-- <library>kernel32</library>--> + <file>kmtloader.c</file> +</module> Propchange: trunk/reactos/regtests/kmtloader/kmtloader.rbuild ------------------------------------------------------------------------------ svn:eol-style = native
18 years, 5 months
1
0
0
0
[hpoussin] 22207: Convert result struct only if NtUserEnumDisplaySettings returned success
by hpoussin@svn.reactos.org
Author: hpoussin Date: Sun Jun 4 18:10:21 2006 New Revision: 22207 URL:
http://svn.reactos.ru/svn/reactos?rev=22207&view=rev
Log: Convert result struct only if NtUserEnumDisplaySettings returned success Modified: trunk/reactos/dll/win32/user32/misc/display.c Modified: trunk/reactos/dll/win32/user32/misc/display.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/user32/misc/displ…
============================================================================== --- trunk/reactos/dll/win32/user32/misc/display.c (original) +++ trunk/reactos/dll/win32/user32/misc/display.c Sun Jun 4 18:10:21 2006 @@ -218,6 +218,8 @@ rc = NtUserEnumDisplaySettings ( &DeviceName, iModeNum, &lpDevModeW, dwFlags ); + if (!rc) + goto done; #define COPYS(f,len) WideCharToMultiByte( CP_THREAD_ACP, 0, lpDevModeW.f, len, (LPSTR)lpDevMode->f, len, NULL, NULL ) #define COPYN(f) lpDevMode->f = lpDevModeW.f
18 years, 5 months
1
0
0
0
[hpoussin] 22206: Don't crash when no working display adapter is present
by hpoussin@svn.reactos.org
Author: hpoussin Date: Sun Jun 4 18:09:29 2006 New Revision: 22206 URL:
http://svn.reactos.ru/svn/reactos?rev=22206&view=rev
Log: Don't crash when no working display adapter is present Modified: trunk/reactos/dll/cpl/desk/settings.c Modified: trunk/reactos/dll/cpl/desk/settings.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/cpl/desk/settings.c?rev…
============================================================================== --- trunk/reactos/dll/cpl/desk/settings.c (original) +++ trunk/reactos/dll/cpl/desk/settings.c Sun Jun 4 18:09:29 2006 @@ -1,12 +1,11 @@ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS Display Control Panel * FILE: lib/cpl/desk/settings.c * PURPOSE: Settings property page - * + * * PROGRAMMERS: Trevor McCort (lycan359(a)gmail.com) - * Hervé Poussineau (poussine(a)freesurf.fr) + * Hervé Poussineau (hpoussin(a)reactos.org) */ #include "desk.h" @@ -54,14 +53,13 @@ TCHAR Buffer[64]; TCHAR Pixel[64]; DWORD index; - + LoadString(hApplet, IDS_PIXEL, Pixel, sizeof(Pixel) / sizeof(TCHAR)); _stprintf(Buffer, Pixel, CurrentDisplayDevice->CurrentSettings->dmPelsWidth, CurrentDisplayDevice->CurrentSettings->dmPelsHeight, Pixel); SendDlgItemMessage(hwndDlg, IDC_SETTINGS_RESOLUTION_TEXT, WM_SETTEXT, 0, (LPARAM)Buffer); - for (index = 0; index < CurrentDisplayDevice->ResolutionsCount; index++) - { + { if (CurrentDisplayDevice->Resolutions[index].dmPelsWidth == CurrentDisplayDevice->CurrentSettings->dmPelsWidth && CurrentDisplayDevice->Resolutions[index].dmPelsHeight == CurrentDisplayDevice->CurrentSettings->dmPelsHeight) @@ -70,7 +68,7 @@ break; } } - if (LoadString(hApplet, (2900 + CurrentDisplayDevice->CurrentSettings->dmBitsPerPel), Buffer, sizeof(Buffer) / sizeof(TCHAR))) + if (LoadString(hApplet, (2900 + CurrentDisplayDevice->CurrentSettings->dmBitsPerPel), Buffer, sizeof(Buffer) / sizeof(TCHAR))) SendDlgItemMessage(hwndDlg, IDC_SETTINGS_BPP, CB_SELECTSTRING, -1, (LPARAM)Buffer); } @@ -85,7 +83,7 @@ HDC hDC; PSETTINGS_ENTRY Current; DWORD bpp, xres, yres, checkbpp; - + /* Get current settings */ *CurrentSettings = NULL; hDC = CreateIC(NULL, DeviceName, NULL, NULL); @@ -94,23 +92,22 @@ xres = GetDeviceCaps(hDC, HORZRES); yres = GetDeviceCaps(hDC, VERTRES); DeleteDC(hDC); - + /* List all settings */ devmode.dmSize = (WORD)sizeof(DEVMODE); devmode.dmDriverExtra = 0; while (EnumDisplaySettingsEx(DeviceName, iMode, &devmode, dwFlags)) { - if (devmode.dmBitsPerPel==8 || devmode.dmBitsPerPel==16 || devmode.dmBitsPerPel==24 || devmode.dmBitsPerPel==32) checkbpp=1; else checkbpp=0; if (devmode.dmPelsWidth < 640 || devmode.dmPelsHeight < 480 || checkbpp == 0) { - iMode++; - continue; - } - + iMode++; + continue; + } + Current = HeapAlloc(GetProcessHeap(), 0, sizeof(SETTINGS_ENTRY)); if (Current != NULL) { @@ -123,7 +120,7 @@ while (Next != NULL && ( Next->dmPelsHeight < Current->dmPelsHeight || (Next->dmPelsHeight == Current->dmPelsHeight && Next->dmBitsPerPel < Current->dmBitsPerPel) || - (Next->dmPelsHeight == Current->dmPelsHeight && + (Next->dmPelsHeight == Current->dmPelsHeight && Next->dmBitsPerPel == Current->dmBitsPerPel && Next->dmPelsWidth < Current->dmPelsWidth))) { @@ -146,12 +143,12 @@ } iMode++; } - + *pSettingsCount = NbSettings; return Settings; } -static VOID +static BOOL AddDisplayDevice(IN LPTSTR Description, IN LPTSTR DeviceName) { PDISPLAY_DEVICE_ENTRY newEntry = NULL; @@ -162,17 +159,18 @@ PSETTINGS_ENTRY Current; DWORD ResolutionsCount = 1; DWORD i; - + newEntry = HeapAlloc(GetProcessHeap(), 0, sizeof(DISPLAY_DEVICE_ENTRY)); + memset(newEntry, 0, sizeof(DISPLAY_DEVICE_ENTRY)); if (!newEntry) goto ByeBye; - + newEntry->Settings = GetPossibleSettings(DeviceName, &newEntry->SettingsCount, &newEntry->CurrentSettings); if (!newEntry->Settings) goto ByeBye; - + newEntry->InitialSettings.dmPelsWidth = newEntry->CurrentSettings->dmPelsWidth; newEntry->InitialSettings.dmPelsHeight = newEntry->CurrentSettings->dmPelsHeight; newEntry->InitialSettings.dmBitsPerPel = newEntry->CurrentSettings->dmBitsPerPel; - + /* Count different resolutions */ for (Current = newEntry->Settings; Current != NULL; Current = Current->Flink) if (Current->Flink != NULL && @@ -190,23 +188,23 @@ newEntry->Resolutions[i].dmPelsHeight = Current->dmPelsHeight; i++; } - + descriptionSize = (_tcslen(Description) + 1) * sizeof(TCHAR); description = HeapAlloc(GetProcessHeap(), 0, descriptionSize); if (!description) goto ByeBye; - + nameSize = (_tcslen(DeviceName) + 1) * sizeof(TCHAR); name = HeapAlloc(GetProcessHeap(), 0, nameSize); if (!name) goto ByeBye; - + memcpy(description, Description, descriptionSize); memcpy(name, DeviceName, nameSize); newEntry->DeviceDescription = description; newEntry->DeviceName = name; newEntry->Flink = DisplayDeviceList; DisplayDeviceList = newEntry; - return; - + return TRUE; + ByeBye: if (newEntry != NULL) { @@ -228,6 +226,7 @@ HeapFree(GetProcessHeap(), 0, description); if (name != NULL) HeapFree(GetProcessHeap(), 0, name); + return FALSE; } static VOID @@ -235,9 +234,9 @@ { PSETTINGS_ENTRY Current; DWORD index; - + CurrentDisplayDevice = pDeviceEntry; /* Update global variable */ - + /* Fill color depths combo box */ SendDlgItemMessage(hwndDlg, IDC_SETTINGS_BPP, CB_RESETCONTENT, 0, 0); for (Current = pDeviceEntry->Settings; Current != NULL; Current = Current->Flink) @@ -253,11 +252,11 @@ } } } - + /* Fill resolutions slider */ SendDlgItemMessage(hwndDlg, IDC_SETTINGS_RESOLUTION, TBM_CLEARTICS, TRUE, 0); SendDlgItemMessage(hwndDlg, IDC_SETTINGS_RESOLUTION, TBM_SETRANGE, TRUE, MAKELONG(0, pDeviceEntry->ResolutionsCount - 1)); - + UpdateDisplay(hwndDlg); } @@ -267,16 +266,16 @@ DWORD Result = 0; DWORD iDevNum = 0; DISPLAY_DEVICE displayDevice; - BITMAP bitmap; - + BITMAP bitmap; + /* Get video cards list */ displayDevice.cb = (DWORD)sizeof(DISPLAY_DEVICE); while (EnumDisplayDevices(NULL, iDevNum, &displayDevice, 0)) { if ((displayDevice.StateFlags & DISPLAY_DEVICE_ATTACHED_TO_DESKTOP) != 0) { - AddDisplayDevice(displayDevice.DeviceString, displayDevice.DeviceName); - Result++; + if (AddDisplayDevice(displayDevice.DeviceString, displayDevice.DeviceName)) + Result++; } iDevNum++; } @@ -300,14 +299,14 @@ /* FIXME: choose selected adapter being the primary one */ } - hBitmap = LoadImage(hApplet, MAKEINTRESOURCE(IDC_MONITOR), IMAGE_BITMAP, 0, 0, LR_LOADTRANSPARENT); - if (hBitmap != NULL) - { - GetObject(hBitmap, sizeof(BITMAP), &bitmap); - - cxSource = bitmap.bmWidth; - cySource = bitmap.bmHeight; - } + hBitmap = LoadImage(hApplet, MAKEINTRESOURCE(IDC_MONITOR), IMAGE_BITMAP, 0, 0, LR_LOADTRANSPARENT); + if (hBitmap != NULL) + { + GetObject(hBitmap, sizeof(BITMAP), &bitmap); + + cxSource = bitmap.bmWidth; + cySource = bitmap.bmHeight; + } } static VOID @@ -321,11 +320,11 @@ DWORD dmNewBitsPerPel; DWORD index; TCHAR Buffer[64]; - + SendDlgItemMessage(hwndDlg, IDC_SETTINGS_BPP, WM_GETTEXT, (WPARAM)(sizeof(Buffer) / sizeof(TCHAR)), (LPARAM)Buffer); index = SendDlgItemMessage(hwndDlg, IDC_SETTINGS_BPP, CB_FINDSTRINGEXACT, (WPARAM)-1, (LPARAM)Buffer); dmNewBitsPerPel = SendDlgItemMessage(hwndDlg, IDC_SETTINGS_BPP, CB_GETITEMDATA, index, 0); - + /* find if new parameters are valid */ Current = CurrentDisplayDevice->CurrentSettings; if (dmNewBitsPerPel == Current->dmBitsPerPel) @@ -333,9 +332,9 @@ /* no change */ return; } - + PropSheet_Changed(GetParent(hwndDlg), hwndDlg); - + if (dmNewBitsPerPel < Current->dmBitsPerPel) { Current = Current->Blink; @@ -368,7 +367,7 @@ Current = Current->Flink; } } - + /* search smaller resolution compatible with current color depth */ Current = CurrentDisplayDevice->CurrentSettings->Blink; while (Current != NULL) @@ -381,7 +380,7 @@ } Current = Current->Blink; } - + /* search bigger resolution compatible with current color depth */ Current = CurrentDisplayDevice->CurrentSettings->Flink; while (Current != NULL) @@ -394,7 +393,7 @@ } Current = Current->Flink; } - + /* we shouldn't go there */ } @@ -408,7 +407,7 @@ PSETTINGS_ENTRY Current; DWORD dmNewPelsHeight = CurrentDisplayDevice->Resolutions[NewPosition].dmPelsHeight; DWORD dmNewPelsWidth = CurrentDisplayDevice->Resolutions[NewPosition].dmPelsWidth; - + /* find if new parameters are valid */ Current = CurrentDisplayDevice->CurrentSettings; if (dmNewPelsHeight == Current->dmPelsHeight && dmNewPelsWidth == Current->dmPelsWidth) @@ -416,9 +415,9 @@ /* no change */ return; } - + PropSheet_Changed(GetParent(hwndDlg), hwndDlg); - + if (dmNewPelsHeight < Current->dmPelsHeight) { Current = Current->Blink; @@ -451,7 +450,7 @@ Current = Current->Flink; } } - + /* search bigger color depth compatible with current resolution */ Current = CurrentDisplayDevice->CurrentSettings->Flink; while (Current != NULL) @@ -464,7 +463,7 @@ } Current = Current->Flink; } - + /* search smaller color depth compatible with current resolution */ Current = CurrentDisplayDevice->CurrentSettings->Blink; while (Current != NULL) @@ -477,7 +476,7 @@ } Current = Current->Blink; } - + /* we shouldn't go there */ } @@ -500,7 +499,7 @@ { DWORD controlId = LOWORD(wParam); DWORD command = HIWORD(wParam); - + if (controlId == IDC_SETTINGS_ADVANCED && command == BN_CLICKED) OnAdvancedButton(); else if (controlId == IDC_SETTINGS_BPP && command == CBN_SELCHANGE) @@ -572,22 +571,23 @@ break; } - case WM_PAINT: - { - PAINTSTRUCT ps; - HDC hdc, hdcMem; - - hdc = BeginPaint(hwndDlg, &ps); - - hdcMem = CreateCompatibleDC(hdc); - SelectObject(hdcMem, hBitmap); - - TransparentBlt(hdc, 98, 0, cxSource, cySource, hdcMem, 0, 0, cxSource, cySource, 0xFF80FF); - - DeleteDC(hdcMem); - EndPaint(hwndDlg, &ps); - - } break; + case WM_PAINT: + { + PAINTSTRUCT ps; + HDC hdc, hdcMem; + + hdc = BeginPaint(hwndDlg, &ps); + + hdcMem = CreateCompatibleDC(hdc); + SelectObject(hdcMem, hBitmap); + + TransparentBlt(hdc, 98, 0, cxSource, cySource, hdcMem, 0, 0, cxSource, cySource, 0xFF80FF); + + DeleteDC(hdcMem); + EndPaint(hwndDlg, &ps); + + break; + } case WM_DESTROY: { @@ -606,7 +606,7 @@ Current = Next; } - DeleteObject(hBitmap); + DeleteObject(hBitmap); } } return FALSE;
18 years, 5 months
1
0
0
0
[hpoussin] 22205: Convert result struct only if NtUserEnumDisplayDevices returned success
by hpoussin@svn.reactos.org
Author: hpoussin Date: Sun Jun 4 17:36:39 2006 New Revision: 22205 URL:
http://svn.reactos.ru/svn/reactos?rev=22205&view=rev
Log: Convert result struct only if NtUserEnumDisplayDevices returned success Modified: trunk/reactos/dll/win32/user32/misc/display.c Modified: trunk/reactos/dll/win32/user32/misc/display.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/user32/misc/displ…
============================================================================== --- trunk/reactos/dll/win32/user32/misc/display.c (original) +++ trunk/reactos/dll/win32/user32/misc/display.c Sun Jun 4 17:36:39 2006 @@ -67,25 +67,27 @@ iDevNum, &DisplayDeviceW, dwFlags ); - - /* Copy result from DisplayDeviceW to lpDisplayDevice */ - lpDisplayDevice->StateFlags = DisplayDeviceW.StateFlags; - WideCharToMultiByte(CP_ACP,0, - DisplayDeviceW.DeviceName,wcslen(DisplayDeviceW.DeviceName), - lpDisplayDevice->DeviceName,sizeof(lpDisplayDevice->DeviceName) / sizeof(lpDisplayDevice->DeviceName[0]), - NULL,NULL); - WideCharToMultiByte(CP_ACP,0, - DisplayDeviceW.DeviceString,wcslen(DisplayDeviceW.DeviceString), - lpDisplayDevice->DeviceString,sizeof(lpDisplayDevice->DeviceString) / sizeof(lpDisplayDevice->DeviceString[0]), - NULL,NULL); - WideCharToMultiByte(CP_ACP,0, - DisplayDeviceW.DeviceID,wcslen(DisplayDeviceW.DeviceID), - lpDisplayDevice->DeviceID,sizeof(lpDisplayDevice->DeviceID) / sizeof(lpDisplayDevice->DeviceID[0]), - NULL,NULL); - WideCharToMultiByte(CP_ACP,0, - DisplayDeviceW.DeviceKey,wcslen(DisplayDeviceW.DeviceKey), - lpDisplayDevice->DeviceKey,sizeof(lpDisplayDevice->DeviceKey) / sizeof(lpDisplayDevice->DeviceKey[0]), - NULL,NULL); + if (!rc) + { + /* Copy result from DisplayDeviceW to lpDisplayDevice */ + lpDisplayDevice->StateFlags = DisplayDeviceW.StateFlags; + WideCharToMultiByte(CP_ACP,0, + DisplayDeviceW.DeviceName,wcslen(DisplayDeviceW.DeviceName), + lpDisplayDevice->DeviceName,sizeof(lpDisplayDevice->DeviceName) / sizeof(lpDisplayDevice->DeviceName[0]), + NULL,NULL); + WideCharToMultiByte(CP_ACP,0, + DisplayDeviceW.DeviceString,wcslen(DisplayDeviceW.DeviceString), + lpDisplayDevice->DeviceString,sizeof(lpDisplayDevice->DeviceString) / sizeof(lpDisplayDevice->DeviceString[0]), + NULL,NULL); + WideCharToMultiByte(CP_ACP,0, + DisplayDeviceW.DeviceID,wcslen(DisplayDeviceW.DeviceID), + lpDisplayDevice->DeviceID,sizeof(lpDisplayDevice->DeviceID) / sizeof(lpDisplayDevice->DeviceID[0]), + NULL,NULL); + WideCharToMultiByte(CP_ACP,0, + DisplayDeviceW.DeviceKey,wcslen(DisplayDeviceW.DeviceKey), + lpDisplayDevice->DeviceKey,sizeof(lpDisplayDevice->DeviceKey) / sizeof(lpDisplayDevice->DeviceKey[0]), + NULL,NULL); + } RtlFreeUnicodeString ( &Device );
18 years, 5 months
1
0
0
0
[janderwald] 22204: _strdate should return maximum 8 chars does not work yet
by janderwald@svn.reactos.org
Author: janderwald Date: Sun Jun 4 17:20:09 2006 New Revision: 22204 URL:
http://svn.reactos.ru/svn/reactos?rev=22204&view=rev
Log: _strdate should return maximum 8 chars does not work yet Modified: trunk/reactos/lib/crt/time/strdate.c trunk/reactos/lib/crt/time/wstrdate.c Modified: trunk/reactos/lib/crt/time/strdate.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/lib/crt/time/strdate.c?rev=…
============================================================================== --- trunk/reactos/lib/crt/time/strdate.c (original) +++ trunk/reactos/lib/crt/time/strdate.c Sun Jun 4 17:20:09 2006 @@ -24,6 +24,7 @@ } t = time(NULL); d = localtime(&t); - sprintf(dt,"%d/%d/%d",d->tm_mday,d->tm_mon+1,d->tm_year); + + sprintf(dt,"%.2d/%.2d/%.2d",d->tm_mday,d->tm_mon+1,d->tm_year ); return dt; } Modified: trunk/reactos/lib/crt/time/wstrdate.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/lib/crt/time/wstrdate.c?rev…
============================================================================== --- trunk/reactos/lib/crt/time/wstrdate.c (original) +++ trunk/reactos/lib/crt/time/wstrdate.c Sun Jun 4 17:20:09 2006 @@ -24,6 +24,6 @@ } t = time(NULL); d = localtime(&t); - swprintf(dt,L"%d/%d/%d",d->tm_mday,d->tm_mon+1,d->tm_year); + swprintf(dt,L"%.2d/%.2d/%.2d",d->tm_mday,d->tm_mon+1,d->tm_year); return dt; }
18 years, 5 months
1
0
0
0
[hpoussin] 22203: IntEnumDisplaySettings returns a BOOL, not a NTSTATUS
by hpoussin@svn.reactos.org
Author: hpoussin Date: Sun Jun 4 17:09:25 2006 New Revision: 22203 URL:
http://svn.reactos.ru/svn/reactos?rev=22203&view=rev
Log: IntEnumDisplaySettings returns a BOOL, not a NTSTATUS Modified: trunk/reactos/subsystems/win32/win32k/objects/dc.c Modified: trunk/reactos/subsystems/win32/win32k/objects/dc.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/subsystems/win32/win32k/obj…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/dc.c (original) +++ trunk/reactos/subsystems/win32/win32k/objects/dc.c Sun Jun 4 17:09:25 2006 @@ -2862,7 +2862,7 @@ if ((dwflags & CDS_FULLSCREEN) == CDS_FULLSCREEN) { - DEVMODE lpDevMode; + DEVMODEW lpDevMode; /* Full Screen */ dwflags &= ~CDS_FULLSCREEN; DPRINT1("flag CDS_FULLSCREEN partially implemented"); @@ -2873,9 +2873,9 @@ lpDevMode.dmPelsHeight =0; lpDevMode.dmDriverExtra =0; - lpDevMode.dmSize = sizeof(DEVMODE); - Status = IntEnumDisplaySettings(pDeviceName, ENUM_CURRENT_SETTINGS, &lpDevMode, 0); - if (!NT_SUCCESS(Status)) return DISP_CHANGE_FAILED; + lpDevMode.dmSize = sizeof(DEVMODEW); + if (!IntEnumDisplaySettings(pDeviceName, ENUM_CURRENT_SETTINGS, &lpDevMode, 0)) + return DISP_CHANGE_FAILED; DPRINT1("Req Mode : %d x %d x %d\n", DevMode->dmPelsWidth,DevMode->dmPelsHeight,DevMode->dmBitsPerPel); DPRINT1("Current Mode : %d x %d x %d\n", lpDevMode.dmPelsWidth,lpDevMode.dmPelsHeight, lpDevMode.dmBitsPerPel);
18 years, 5 months
1
0
0
0
← Newer
1
...
50
51
52
53
54
55
56
...
60
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Results per page:
10
25
50
100
200