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
December
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
January 2014
----- 2024 -----
December 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
14 participants
426 discussions
Start a n
N
ew thread
[tkreuzer] 61595: [FREELDR] Completely rewrite the registry code. The old code was first loading the system hive and parsing it, duplicating each and every key and value into a custom freeldr speci...
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sun Jan 12 21:37:29 2014 New Revision: 61595 URL:
http://svn.reactos.org/svn/reactos?rev=61595&view=rev
Log: [FREELDR] Completely rewrite the registry code. The old code was first loading the system hive and parsing it, duplicating each and every key and value into a custom freeldr specific registry format and used the latter to access the data. This was extremely slow when larger hive files (the one from a normal win 2003 installation is 2.5 MB vs 250kb in reactos) were imported. The new code uses the hive data directly. It's less code, faster and uses much less memory. In the same move, refactor some mkhive code and move it into cmlib to be shared with freeldr. Added: trunk/reactos/boot/freeldr/freeldr/reactos/registry.c (with props) trunk/reactos/lib/cmlib/cmtools.c (with props) Removed: trunk/reactos/boot/freeldr/freeldr/reactos/binhive.c Modified: trunk/reactos/boot/freeldr/freeldr/CMakeLists.txt trunk/reactos/lib/cmlib/CMakeLists.txt trunk/reactos/lib/cmlib/cmdata.h trunk/reactos/lib/cmlib/cmlib.h trunk/reactos/tools/mkhive/cmi.c trunk/reactos/tools/mkhive/mkhive.h Modified: trunk/reactos/boot/freeldr/freeldr/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/CMake…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/CMakeLists.txt [iso-8859-1] Sun Jan 12 21:37:29 2014 @@ -62,7 +62,6 @@ reactos/registry.c reactos/arcname.c reactos/archwsup.c - reactos/binhive.c ui/directui.c ui/gui.c ui/minitui.c Removed: trunk/reactos/boot/freeldr/freeldr/reactos/binhive.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/react…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/reactos/binhive.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/reactos/binhive.c (removed) @@ -1,343 +0,0 @@ -/* - * FreeLoader - * - * Copyright (C) 2001 Rex Jolliff - * Copyright (C) 2001 Eric Kohl - * - * 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., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -#include <freeldr.h> -#include <cmlib.h> -#include <debug.h> - -#define REG_DATA_SIZE_MASK 0x7FFFFFFF -#define REG_DATA_IN_OFFSET 0x80000000 - -DBG_DEFAULT_CHANNEL(REGISTRY); - -/* FUNCTIONS ****************************************************************/ - -static -PVOID -NTAPI -CmpAllocate (SIZE_T Size, BOOLEAN Paged, ULONG Tag) -{ - return FrLdrHeapAllocateEx(FrLdrDefaultHeap, Size, Tag); -} - - -static -VOID -NTAPI -CmpFree (PVOID Ptr, IN ULONG Quota) -{ - FrLdrHeapFreeEx(FrLdrDefaultHeap, Ptr, 0); -} - -static -BOOLEAN -RegImportValue ( - PHHIVE Hive, - PCM_KEY_VALUE ValueCell, - FRLDRHKEY Key) -{ - PVOID DataCell; - PWCHAR wName; - LONG Error; - ULONG DataLength; - ULONG i; - - if (ValueCell->Signature != CM_KEY_VALUE_SIGNATURE) - { - ERR("Invalid key cell!\n"); - return FALSE; - } - - if (ValueCell->Flags & VALUE_COMP_NAME) - { - wName = FrLdrTempAlloc((ValueCell->NameLength + 1) * sizeof(WCHAR), TAG_REG_NAME); - for (i = 0; i < ValueCell->NameLength; i++) - { - wName[i] = ((PCHAR)ValueCell->Name)[i]; - } - wName[ValueCell->NameLength] = 0; - } - else - { - wName = FrLdrTempAlloc(ValueCell->NameLength + sizeof(WCHAR), TAG_REG_NAME); - memcpy(wName, ValueCell->Name, ValueCell->NameLength); - wName[ValueCell->NameLength / sizeof(WCHAR)] = 0; - } - - DataLength = ValueCell->DataLength & REG_DATA_SIZE_MASK; - - TRACE("ValueName: '%S'\n", wName); - TRACE("DataLength: %u\n", DataLength); - - if (DataLength <= sizeof(HCELL_INDEX) && (ValueCell->DataLength & REG_DATA_IN_OFFSET)) - { - Error = RegSetValue(Key, - wName, - ValueCell->Type, - (PCHAR)&ValueCell->Data, - DataLength); - if (Error != ERROR_SUCCESS) - { - ERR("RegSetValue() failed!\n"); - FrLdrTempFree(wName, TAG_REG_NAME); - return FALSE; - } - } - else - { - DataCell = (PVOID)HvGetCell(Hive, ValueCell->Data); - TRACE("DataCell: %x\n", DataCell); - - Error = RegSetValue(Key, - wName, - ValueCell->Type, - DataCell, - DataLength); - - if (Error != ERROR_SUCCESS) - { - ERR("RegSetValue() failed!\n"); - FrLdrTempFree(wName, TAG_REG_NAME); - return FALSE; - } - } - - FrLdrTempFree(wName, TAG_REG_NAME); - - return TRUE; -} - -static -BOOLEAN -RegImportSubKey( - PHHIVE Hive, - PCM_KEY_NODE KeyCell, - FRLDRHKEY ParentKey); - -static -BOOLEAN -RegImportIndexSubKey( - PHHIVE Hive, - PCM_KEY_INDEX IndexCell, - FRLDRHKEY ParentKey) -{ - ULONG i; - - TRACE("IndexCell: %x\n", IndexCell); - - /* Enumerate and add subkeys */ - if ((IndexCell->Signature == CM_KEY_INDEX_ROOT) || - (IndexCell->Signature == CM_KEY_INDEX_LEAF)) - { - for (i = 0; i < IndexCell->Count; i++) - { - PCM_KEY_INDEX SubIndexCell = HvGetCell(Hive, IndexCell->List[i]); - if (!RegImportIndexSubKey(Hive, SubIndexCell, ParentKey)) - return FALSE; - } - } - else if ((IndexCell->Signature == CM_KEY_FAST_LEAF) || - (IndexCell->Signature == CM_KEY_HASH_LEAF)) - { - PCM_KEY_FAST_INDEX HashCell = (PCM_KEY_FAST_INDEX)IndexCell; - for (i = 0; i < HashCell->Count; i++) - { - PCM_KEY_NODE SubKeyCell = HvGetCell(Hive, HashCell->List[i].Cell); - if (!RegImportSubKey(Hive, SubKeyCell, ParentKey)) - return FALSE; - } - } - else - { - ASSERT(FALSE); - } - - return TRUE; -} - - -static -BOOLEAN -RegImportSubKey( - PHHIVE Hive, - PCM_KEY_NODE KeyCell, - FRLDRHKEY ParentKey) -{ - PCM_KEY_INDEX IndexCell; - PVALUE_LIST_CELL ValueListCell; - PCM_KEY_VALUE ValueCell = NULL; - PWCHAR wName; - FRLDRHKEY SubKey; - LONG Error; - ULONG i; - - TRACE("KeyCell: %x\n", KeyCell); - TRACE("KeyCell->Signature: %x\n", KeyCell->Signature); - if (KeyCell->Signature != CM_KEY_NODE_SIGNATURE) - { - ERR("Invalid key cell Signature!\n"); - return FALSE; - } - - if (KeyCell->Flags & KEY_COMP_NAME) - { - wName = FrLdrTempAlloc((KeyCell->NameLength + 1) * sizeof(WCHAR), TAG_REG_NAME); - for (i = 0; i < KeyCell->NameLength; i++) - { - wName[i] = ((PCHAR)KeyCell->Name)[i]; - } - wName[KeyCell->NameLength] = 0; - } - else - { - wName = FrLdrTempAlloc(KeyCell->NameLength + sizeof(WCHAR), TAG_REG_NAME); - memcpy(wName, KeyCell->Name, KeyCell->NameLength); - wName[KeyCell->NameLength / sizeof(WCHAR)] = 0; - } - - TRACE("KeyName: '%S'\n", wName); - - /* Create new sub key */ - Error = RegCreateKey(ParentKey, wName, &SubKey); - FrLdrTempFree(wName, TAG_REG_NAME); - if (Error != ERROR_SUCCESS) - { - ERR("RegCreateKey() failed!\n"); - return FALSE; - } - TRACE("Subkeys: %u\n", KeyCell->SubKeyCounts); - TRACE("Values: %u\n", KeyCell->ValueList.Count); - - /* Enumerate and add values */ - if (KeyCell->ValueList.Count > 0) - { - ValueListCell = (PVALUE_LIST_CELL)HvGetCell(Hive, KeyCell->ValueList.List); - TRACE("ValueListCell: %x\n", ValueListCell); - - for (i = 0; i < KeyCell->ValueList.Count; i++) - { - TRACE("ValueOffset[%d]: %x\n", i, ValueListCell->ValueOffset[i]); - - ValueCell = (PCM_KEY_VALUE) HvGetCell (Hive, ValueListCell->ValueOffset[i]); - - TRACE("ValueCell[%d]: %x\n", i, ValueCell); - - if (!RegImportValue(Hive, ValueCell, SubKey)) - return FALSE; - } - } - - /* Enumerate and add subkeys */ - if (KeyCell->SubKeyCounts[Stable] > 0) - { - IndexCell = HvGetCell (Hive, KeyCell->SubKeyLists[Stable]); - - if (!RegImportIndexSubKey(Hive, IndexCell, SubKey)) - return FALSE; - } - - return TRUE; -} - - -BOOLEAN -RegImportBinaryHive( - PCHAR ChunkBase, - ULONG ChunkSize) -{ - PCM_KEY_NODE KeyCell; - PCM_KEY_FAST_INDEX HashCell; - PCM_KEY_NODE SubKeyCell; - FRLDRHKEY SystemKey; - ULONG i; - LONG Error; - PCMHIVE CmHive; - PHHIVE Hive; - NTSTATUS Status; - - TRACE("RegImportBinaryHive(%x, %u) called\n", ChunkBase, ChunkSize); - - CmHive = CmpAllocate(sizeof(CMHIVE), TRUE, 0); - Status = HvInitialize(&CmHive->Hive, - HINIT_FLAT, - 0, - 0, - ChunkBase, - CmpAllocate, - CmpFree, - NULL, - NULL, - NULL, - NULL, - 1, - NULL); - if (!NT_SUCCESS(Status)) - { - CmpFree(CmHive, 0); - ERR("Invalid hive Signature!\n"); - return FALSE; - } - - Hive = &CmHive->Hive; - KeyCell = (PCM_KEY_NODE)HvGetCell(Hive, Hive->BaseBlock->RootCell); - TRACE("KeyCell: %x\n", KeyCell); - TRACE("KeyCell->Signature: %x\n", KeyCell->Signature); - if (KeyCell->Signature != CM_KEY_NODE_SIGNATURE) - { - ERR("Invalid key cell Signature!\n"); - return FALSE; - } - - TRACE("Subkeys: %u\n", KeyCell->SubKeyCounts); - TRACE("Values: %u\n", KeyCell->ValueList.Count); - - /* Open 'System' key */ - Error = RegOpenKey(NULL, L"\\Registry\\Machine\\SYSTEM", &SystemKey); - if (Error != ERROR_SUCCESS) - { - ERR("Failed to open 'system' key!\n"); - return FALSE; - } - - /* Enumerate and add subkeys */ - if (KeyCell->SubKeyCounts[Stable] > 0) - { - HashCell = (PCM_KEY_FAST_INDEX)HvGetCell(Hive, KeyCell->SubKeyLists[Stable]); - TRACE("HashCell: %x\n", HashCell); - TRACE("SubKeyCounts: %x\n", KeyCell->SubKeyCounts[Stable]); - - for (i = 0; i < KeyCell->SubKeyCounts[Stable]; i++) - { - TRACE("Cell[%d]: %x\n", i, HashCell->List[i].Cell); - - SubKeyCell = (PCM_KEY_NODE)HvGetCell(Hive, HashCell->List[i].Cell); - - TRACE("SubKeyCell[%d]: %x\n", i, SubKeyCell); - - if (!RegImportSubKey(Hive, SubKeyCell, SystemKey)) - return FALSE; - } - } - - return TRUE; -} - -/* EOF */ Added: trunk/reactos/boot/freeldr/freeldr/reactos/registry.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/react…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/reactos/registry.c (added) +++ trunk/reactos/boot/freeldr/freeldr/reactos/registry.c [iso-8859-1] Sun Jan 12 21:37:29 2014 @@ -0,0 +1,589 @@ +/* + * FreeLoader + * + * Copyright (C) 2001, 2002 Timo Kreuzer <timo.kreuzer(a)reactos.org> + * + * 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#include <freeldr.h> +#include <cmlib.h> +#include <debug.h> + +DBG_DEFAULT_CHANNEL(REGISTRY); + +static PCMHIVE CmHive; +static PCM_KEY_NODE RootKeyNode; +static FRLDRHKEY CurrentControlSetKey; + +BOOLEAN +RegImportBinaryHive( + _In_ PCHAR ChunkBase, + _In_ ULONG ChunkSize) +{ + NTSTATUS Status; + TRACE("RegImportBinaryHive(%p, 0x%lx)\n", ChunkBase, ChunkSize); + + /* Allocate and initialize the hive */ + CmHive = FrLdrTempAlloc(sizeof(CMHIVE), 'eviH'); + Status = HvInitialize(&CmHive->Hive, + HINIT_FLAT, + 0, + 0, + ChunkBase, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + 1, + NULL); + if (!NT_SUCCESS(Status)) + { + CmpFree(CmHive, 0); + ERR("Invalid hive Signature!\n"); + return FALSE; + } + + /* Save the root key node */ + RootKeyNode = HvGetCell(&CmHive->Hive, Hive->BaseBlock->RootCell); + + TRACE("RegImportBinaryHive done\n"); + return TRUE; +} + +VOID +RegInitializeRegistry(VOID) +{ + /* Nothing to do */ +} + + +LONG +RegInitCurrentControlSet( + _In_ BOOLEAN LastKnownGood) +{ + WCHAR ControlSetKeyName[80]; + FRLDRHKEY SelectKey; + FRLDRHKEY SystemKey; + ULONG CurrentSet = 0; + ULONG DefaultSet = 0; + ULONG LastKnownGoodSet = 0; + ULONG DataSize; + LONG Error; + TRACE("RegInitCurrentControlSet\n"); + + Error = RegOpenKey(NULL, + L"\\Registry\\Machine\\SYSTEM\\Select", + &SelectKey); + if (Error != ERROR_SUCCESS) + { + ERR("RegOpenKey() failed (Error %u)\n", (int)Error); + return Error; + } + + DataSize = sizeof(ULONG); + Error = RegQueryValue(SelectKey, + L"Default", + NULL, + (PUCHAR)&DefaultSet, + &DataSize); + if (Error != ERROR_SUCCESS) + { + ERR("RegQueryValue('Default') failed (Error %u)\n", (int)Error); + return Error; + } + + DataSize = sizeof(ULONG); + Error = RegQueryValue(SelectKey, + L"LastKnownGood", + NULL, + (PUCHAR)&LastKnownGoodSet, + &DataSize); + if (Error != ERROR_SUCCESS) + { + ERR("RegQueryValue('Default') failed (Error %u)\n", (int)Error); + return Error; + } + + CurrentSet = (LastKnownGood == TRUE) ? LastKnownGoodSet : DefaultSet; + wcscpy(ControlSetKeyName, L"ControlSet"); + switch(CurrentSet) + { + case 1: + wcscat(ControlSetKeyName, L"001"); + break; + case 2: + wcscat(ControlSetKeyName, L"002"); + break; + case 3: + wcscat(ControlSetKeyName, L"003"); + break; + case 4: + wcscat(ControlSetKeyName, L"004"); + break; + case 5: + wcscat(ControlSetKeyName, L"005"); + break; + } + + Error = RegOpenKey(NULL, + L"\\Registry\\Machine\\SYSTEM", + &SystemKey); + if (Error != ERROR_SUCCESS) + { + ERR("RegOpenKey(SystemKey) failed (Error %lu)\n", Error); + return Error; + } + + Error = RegOpenKey(SystemKey, + ControlSetKeyName, + &CurrentControlSetKey); + if (Error != ERROR_SUCCESS) + { + ERR("RegOpenKey(CurrentControlSetKey) failed (Error %lu)\n", Error); + return Error; + } + + TRACE("RegInitCurrentControlSet done\n"); + return ERROR_SUCCESS; +} + +static +BOOLEAN +GetNextPathElement( + _Out_ PUNICODE_STRING NextElement, + _Inout_ PUNICODE_STRING RemainingPath) +{ + /* Check if there are any characters left */ + if (RemainingPath->Length < sizeof(WCHAR)) + { + /* Nothing left, bail out early */ + return FALSE; + } + + /* The next path elements starts with the remaining path */ + NextElement->Buffer = RemainingPath->Buffer; + + /* Loop until the path element ends */ + while ((RemainingPath->Length >= sizeof(WCHAR)) && + (RemainingPath->Buffer[0] != '\\')) + { + /* Skip this character */ + RemainingPath->Buffer++; + RemainingPath->Length -= sizeof(WCHAR); + } + + NextElement->Length = (RemainingPath->Buffer - NextElement->Buffer) * sizeof(WCHAR); + NextElement->MaximumLength = NextElement->Length; + + /* Check if the path element ended with a path separator */ + if (RemainingPath->Length >= sizeof(WCHAR)) + { + /* Skip the path separator */ + ASSERT(RemainingPath->Buffer[0] == '\\'); + RemainingPath->Buffer++; + RemainingPath->Length -= sizeof(WCHAR); + } + + /* Return whether we got any characters */ + return TRUE; +} + +static +PCM_KEY_NODE +RegpFindSubkeyInIndex( + _In_ PHHIVE Hive, + _In_ PCM_KEY_INDEX IndexCell, + _In_ PUNICODE_STRING SubKeyName) +{ + PCM_KEY_NODE SubKeyNode; + ULONG i; + TRACE("RegpFindSubkeyInIndex('%wZ')\n", SubKeyName); + + /* Check the cell type */ + if ((IndexCell->Signature == CM_KEY_INDEX_ROOT) || + (IndexCell->Signature == CM_KEY_INDEX_LEAF)) + { + ASSERT(FALSE); + + /* Enumerate subindex cells */ + for (i = 0; i < IndexCell->Count; i++) + { + /* Get the subindex cell and call the function recursively */ + PCM_KEY_INDEX SubIndexCell = HvGetCell(Hive, IndexCell->List[i]); + + SubKeyNode = RegpFindSubkeyInIndex(Hive, SubIndexCell, SubKeyName); + if (SubKeyNode != NULL) + { + return SubKeyNode; + } + } + } + else if ((IndexCell->Signature == CM_KEY_FAST_LEAF) || + (IndexCell->Signature == CM_KEY_HASH_LEAF)) + { + /* Directly enumerate subkey nodes */ + PCM_KEY_FAST_INDEX HashCell = (PCM_KEY_FAST_INDEX)IndexCell; + for (i = 0; i < HashCell->Count; i++) + { + SubKeyNode = HvGetCell(Hive, HashCell->List[i].Cell); + ASSERT(SubKeyNode->Signature == CM_KEY_NODE_SIGNATURE); + + TRACE(" RegpFindSubkeyInIndex: checking '%.*s'\n", + SubKeyNode->NameLength, SubKeyNode->Name); + if (CmCompareKeyName(SubKeyNode, SubKeyName, TRUE)) + { + return SubKeyNode; + } + } + } + else + { + ASSERT(FALSE); + } + + return NULL; +} + +// FIXME: optionally return the subkey node/handle as optimization +LONG +RegEnumKey( + _In_ FRLDRHKEY Key, + _In_ ULONG Index, + _Out_ PWCHAR Name, + _Inout_ ULONG* NameSize) +{ + PHHIVE Hive = &CmHive->Hive; + PCM_KEY_NODE KeyNode, SubKeyNode; + PCM_KEY_INDEX IndexCell; + PCM_KEY_FAST_INDEX HashCell; + TRACE("RegEnumKey(%p, %lu, %p, %p->%u)\n", + Key, Index, Name, NameSize, NameSize ? *NameSize : 0); + + /* Get the key node */ + KeyNode = (PCM_KEY_NODE)Key; + ASSERT(KeyNode->Signature == CM_KEY_NODE_SIGNATURE); + + /* Check if the index is valid */ + if ((KeyNode->SubKeyCounts[Stable] == 0) || + (Index >= KeyNode->SubKeyCounts[Stable])) + { + TRACE("RegEnumKey index out of bounds\n"); + return ERROR_NO_MORE_ITEMS; + } + + /* Get the index cell */ + IndexCell = HvGetCell(Hive, KeyNode->SubKeyLists[Stable]); + TRACE("IndexCell: %x, SubKeyCounts: %x\n", IndexCell, KeyNode->SubKeyCounts[Stable]); + + /* Check the cell type */ + if ((IndexCell->Signature == CM_KEY_FAST_LEAF) || + (IndexCell->Signature == CM_KEY_HASH_LEAF)) + { + /* Get the value cell */ + HashCell = (PCM_KEY_FAST_INDEX)IndexCell; + SubKeyNode = HvGetCell(Hive, HashCell->List[Index].Cell); + } + else + { + ASSERT(FALSE); + } + + *NameSize = CmCopyKeyName(SubKeyNode, Name, *NameSize); + + TRACE("RegEnumKey done -> %u, '%.*s'\n", *NameSize, *NameSize, Name); + return STATUS_SUCCESS; +} + +LONG +RegOpenKey( + _In_ FRLDRHKEY ParentKey, + _In_z_ PCWSTR KeyName, + _Out_ PFRLDRHKEY Key) +{ + UNICODE_STRING RemainingPath, SubKeyName; + UNICODE_STRING RegistryStartPath = RTL_CONSTANT_STRING(L"\\Registry\\MACHINE\\SYSTEM"); + UNICODE_STRING CurrentControlSet = RTL_CONSTANT_STRING(L"CurrentControlSet"); + PHHIVE Hive = &CmHive->Hive; + PCM_KEY_NODE KeyNode; + PCM_KEY_INDEX IndexCell; + TRACE("RegOpenKey(%p, '%S', %p)\n", ParentKey, KeyName, Key); + + /* Initialize the remaining path name */ + RtlInitUnicodeString(&RemainingPath, KeyName); + + /* Get the parent key node */ + KeyNode = (PCM_KEY_NODE)ParentKey; + + /* Check if we have a parent key */ + if (KeyNode == NULL) + { + UNICODE_STRING SubKeyName1, SubKeyName2, SubKeyName3; + UNICODE_STRING RegistryPath = RTL_CONSTANT_STRING(L"Registry"); + UNICODE_STRING MachinePath = RTL_CONSTANT_STRING(L"MACHINE"); + UNICODE_STRING SystemPath = RTL_CONSTANT_STRING(L"SYSTEM"); + TRACE("RegOpenKey: absolute path\n"); + + if ((RemainingPath.Length < sizeof(WCHAR)) || + RemainingPath.Buffer[0] != '\\') + { + /* The key path is not absolute */ + ERR("RegOpenKey: invalid path '%S' (%wZ)\n", KeyName, &RemainingPath); + return ERROR_PATH_NOT_FOUND; + } + + /* Skip initial path separator */ + RemainingPath.Buffer++; + RemainingPath.Length -= sizeof(WCHAR); + + /* Get the first 3 path elements */ + GetNextPathElement(&SubKeyName1, &RemainingPath); + GetNextPathElement(&SubKeyName2, &RemainingPath); + GetNextPathElement(&SubKeyName3, &RemainingPath); + TRACE("RegOpenKey: %wZ / %wZ / %wZ\n", &SubKeyName1, &SubKeyName2, &SubKeyName3); + + /* Check if we have the correct path */ + if (!RtlEqualUnicodeString(&SubKeyName1, &RegistryPath, TRUE) || + !RtlEqualUnicodeString(&SubKeyName2, &MachinePath, TRUE) || + !RtlEqualUnicodeString(&SubKeyName3, &SystemPath, TRUE)) + { + /* The key path is not inside HKLM\Machine\System */ + ERR("RegOpenKey: invalid path '%S' (%wZ)\n", KeyName, &RemainingPath); + return ERROR_PATH_NOT_FOUND; + } + + /* Use the root key */ + KeyNode = RootKeyNode; + } + + ASSERT(KeyNode->Signature == CM_KEY_NODE_SIGNATURE); + + /* Check if this is the root key */ + if (KeyNode == RootKeyNode) + { + UNICODE_STRING TempPath = RemainingPath; + + /* Get the first path element */ + GetNextPathElement(&SubKeyName, &TempPath); + + /* Check if this is CurrentControlSet */ + if (RtlEqualUnicodeString(&SubKeyName, &CurrentControlSet, TRUE)) + { + /* Use the CurrentControlSetKey and update the remaining path */ + KeyNode = (PCM_KEY_NODE)CurrentControlSetKey; + RemainingPath = TempPath; + } + } + + TRACE("RegOpenKey: RemainingPath '%wZ'\n", &RemainingPath); + + /* Loop while there are path elements */ + while (GetNextPathElement(&SubKeyName, &RemainingPath)) + { + TRACE("RegOpenKey: next element '%wZ'\n", &SubKeyName); + + /* Check if there is any subkey */ + if (KeyNode->SubKeyCounts[Stable] == 0) + { + return ERROR_PATH_NOT_FOUND; + } + + /* Get the top level index cell */ + IndexCell = HvGetCell(Hive, KeyNode->SubKeyLists[Stable]); + + /* Get the next sub key */ + KeyNode = RegpFindSubkeyInIndex(Hive, IndexCell, &SubKeyName); + if (KeyNode == NULL) + { + + ERR("Did not find sub key '%wZ' (full %S)\n", &RemainingPath, KeyName); + return ERROR_PATH_NOT_FOUND; + } + } + + TRACE("RegOpenKey done\n"); + *Key = (FRLDRHKEY)KeyNode; + return ERROR_SUCCESS; +} + +static +VOID +RepGetValueData( + _In_ PHHIVE Hive, + _In_ PCM_KEY_VALUE ValueCell, + _Out_opt_ ULONG* Type, + _Out_opt_ PUCHAR Data, + _Inout_opt_ ULONG* DataSize) +{ + ULONG DataLength; + + /* Does the caller want the type? */ + if (Type != NULL) + { + *Type = ValueCell->Type; + } + + /* Does the caller provide DataSize? */ + if (DataSize != NULL) + { + /* Get the data length */ + DataLength = ValueCell->DataLength & REG_DATA_SIZE_MASK; + + /* Does the caller want the data? */ + if ((Data != NULL) && (*DataSize != 0)) + { + /* Check where the data is stored */ + if ((DataLength <= sizeof(HCELL_INDEX)) && + (ValueCell->DataLength & REG_DATA_IN_OFFSET)) + { + /* The data member contains the data */ + RtlCopyMemory(Data, + &ValueCell->Data, + min(*DataSize, DataLength)); + } + else + { + /* The data member contains the data cell index */ + PVOID DataCell = HvGetCell(Hive, ValueCell->Data); + RtlCopyMemory(Data, + DataCell, + min(*DataSize, ValueCell->DataLength)); + } + + } + + /* Return the actual data length */ + *DataSize = DataLength; + } +} + +LONG +RegQueryValue( + _In_ FRLDRHKEY Key, + _In_z_ PCWSTR ValueName, + _Out_opt_ ULONG* Type, + _Out_opt_ PUCHAR Data, + _Inout_opt_ ULONG* DataSize) +{ + PHHIVE Hive = &CmHive->Hive; + PCM_KEY_NODE KeyNode; + PCM_KEY_VALUE ValueCell; + PVALUE_LIST_CELL ValueListCell; + UNICODE_STRING ValueNameString; + ULONG i; + TRACE("RegQueryValue(%p, '%S', %p, %p, %p)\n", + Key, ValueName, Type, Data, DataSize); + + /* Get the key node */ + KeyNode = (PCM_KEY_NODE)Key; + ASSERT(KeyNode->Signature == CM_KEY_NODE_SIGNATURE); + + /* Check if there are any values */ + if (KeyNode->ValueList.Count == 0) + { + TRACE("RegQueryValue no values in key (%.*s)\n", + KeyNode->NameLength, KeyNode->Name); + return ERROR_INVALID_PARAMETER; + } + + /* Initialize value name string */ + RtlInitUnicodeString(&ValueNameString, ValueName); + + ValueListCell = (PVALUE_LIST_CELL)HvGetCell(Hive, KeyNode->ValueList.List); + TRACE("ValueListCell: %x\n", ValueListCell); + + /* Loop all values */ + for (i = 0; i < KeyNode->ValueList.Count; i++) + { + /* Get the subkey node and check the name */ + ValueCell = HvGetCell(Hive, ValueListCell->ValueOffset[i]); + + /* Compare the value name */ + TRACE("checking %.*s\n", ValueCell->NameLength, ValueCell->Name); + if (CmCompareKeyValueName(ValueCell, &ValueNameString, TRUE)) + { + RepGetValueData(Hive, ValueCell, Type, Data, DataSize); + TRACE("RegQueryValue success\n"); + return STATUS_SUCCESS; + } + } + + TRACE("RegQueryValue value not found\n"); + return ERROR_INVALID_PARAMETER; +} + + +LONG +RegEnumValue( + _In_ FRLDRHKEY Key, + _In_ ULONG Index, + _Out_ PWCHAR ValueName, + _Inout_ ULONG* NameSize, + _Out_ ULONG* Type, + _Out_ PUCHAR Data, + _Inout_ ULONG* DataSize) +{ + PHHIVE Hive = &CmHive->Hive; + PCM_KEY_NODE KeyNode; + PCM_KEY_VALUE ValueCell; + PVALUE_LIST_CELL ValueListCell; + TRACE("RegEnumValue(%p, %lu, %S, %p, %p, %p, %p (%lu))\n", + Key, Index, ValueName, NameSize, Type, Data, DataSize, *DataSize); + + /* Get the key node */ + KeyNode = (PCM_KEY_NODE)Key; + ASSERT(KeyNode->Signature == CM_KEY_NODE_SIGNATURE); + + /* Check if the index is valid */ + if ((KeyNode->ValueList.Count == 0) || + (Index >= KeyNode->ValueList.Count)) + { + ERR("RegEnumValue: index invalid\n"); + return ERROR_NO_MORE_ITEMS; + } + + ValueListCell = (PVALUE_LIST_CELL)HvGetCell(Hive, KeyNode->ValueList.List); + TRACE("ValueListCell: %x\n", ValueListCell); + + /* Get the value cell */ + ValueCell = HvGetCell(Hive, ValueListCell->ValueOffset[Index]); + ASSERT(ValueCell != NULL); + + if (NameSize != NULL) + { + *NameSize = CmCopyKeyValueName(ValueCell, ValueName, *NameSize); + } + + RepGetValueData(Hive, ValueCell, Type, Data, DataSize); + + if (DataSize != NULL) + { + if ((Data != NULL) && (*DataSize != 0)) + { + RtlCopyMemory(Data, + &ValueCell->Data, + min(*DataSize, ValueCell->DataLength)); + } + + *DataSize = ValueCell->DataLength; + } + + TRACE("RegEnumValue done\n"); + return STATUS_SUCCESS; +} + +/* EOF */ Propchange: trunk/reactos/boot/freeldr/freeldr/reactos/registry.c ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/lib/cmlib/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/cmlib/CMakeLists.txt?r…
============================================================================== --- trunk/reactos/lib/cmlib/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/lib/cmlib/CMakeLists.txt [iso-8859-1] Sun Jan 12 21:37:29 2014 @@ -6,6 +6,7 @@ list(APPEND SOURCE cminit.c + cmtools.c hivebin.c hivecell.c hiveinit.c Modified: trunk/reactos/lib/cmlib/cmdata.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/cmlib/cmdata.h?rev=615…
============================================================================== --- trunk/reactos/lib/cmlib/cmdata.h [iso-8859-1] (original) +++ trunk/reactos/lib/cmlib/cmdata.h [iso-8859-1] Sun Jan 12 21:37:29 2014 @@ -11,6 +11,8 @@ #define REG_INIT_HASH_TABLE_SIZE 3 #define REG_EXTEND_HASH_TABLE_SIZE 4 #define REG_VALUE_LIST_CELL_MULTIPLE 4 +#define REG_DATA_SIZE_MASK 0x7FFFFFFF +#define REG_DATA_IN_OFFSET 0x80000000 // // Key Types Modified: trunk/reactos/lib/cmlib/cmlib.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/cmlib/cmlib.h?rev=6159…
============================================================================== --- trunk/reactos/lib/cmlib/cmlib.h [iso-8859-1] (original) +++ trunk/reactos/lib/cmlib/cmlib.h [iso-8859-1] Sun Jan 12 21:37:29 2014 @@ -14,6 +14,11 @@ #include <typedefs.h> #include <stdio.h> #include <string.h> + + #ifdef _WIN32 + #define strncasecmp _strnicmp + #define strcasecmp _stricmp + #endif//_WIN32 // Definitions copied from <ntstatus.h> // We only want to include host headers, so we define them manually @@ -312,6 +317,49 @@ CmPrepareHive( PHHIVE RegistryHive); +BOOLEAN +NTAPI +CmCompareHash( + IN PCUNICODE_STRING KeyName, + IN PCHAR HashString, + IN BOOLEAN CaseInsensitive); + +BOOLEAN +NTAPI +CmComparePackedNames( + IN PCUNICODE_STRING Name, + IN PVOID NameBuffer, + IN USHORT NameBufferSize, + IN BOOLEAN NamePacked, + IN BOOLEAN CaseInsensitive); + +BOOLEAN +NTAPI +CmCompareKeyName( + IN PCM_KEY_NODE KeyCell, + IN PCUNICODE_STRING KeyName, + IN BOOLEAN CaseInsensitive); + +BOOLEAN +NTAPI +CmCompareKeyValueName( + IN PCM_KEY_VALUE ValueCell, + IN PCUNICODE_STRING KeyName, + IN BOOLEAN CaseInsensitive); + +ULONG +NTAPI +CmCopyKeyName( + IN PCM_KEY_NODE KeyNode, + _Out_ PWCHAR KeyNameBuffer, + _Inout_ ULONG BufferLength); + +ULONG +NTAPI +CmCopyKeyValueName( + _In_ PCM_KEY_VALUE ValueCell, + _Out_ PWCHAR ValueNameBuffer, + _Inout_ ULONG BufferLength); BOOLEAN CMAPI Added: trunk/reactos/lib/cmlib/cmtools.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/cmlib/cmtools.c?rev=61…
============================================================================== --- trunk/reactos/lib/cmlib/cmtools.c (added) +++ trunk/reactos/lib/cmlib/cmtools.c [iso-8859-1] Sun Jan 12 21:37:29 2014 @@ -0,0 +1,222 @@ +/* + * PROJECT: registry manipulation library + * LICENSE: GPL - See COPYING in the top level directory + * COPYRIGHT: Copyright 2005 Filip Navara <navaraf(a)reactos.org> + * Copyright 2001 - 2005 Eric Kohl + */ + +#include "cmlib.h" +#define NDEBUG +#include <debug.h> + +BOOLEAN +NTAPI +CmCompareHash( + IN PCUNICODE_STRING KeyName, + IN PCHAR HashString, + IN BOOLEAN CaseInsensitive) +{ + CHAR Buffer[4]; + + Buffer[0] = (KeyName->Length >= 2) ? (CHAR)KeyName->Buffer[0] : 0; + Buffer[1] = (KeyName->Length >= 4) ? (CHAR)KeyName->Buffer[1] : 0; + Buffer[2] = (KeyName->Length >= 6) ? (CHAR)KeyName->Buffer[2] : 0; + Buffer[3] = (KeyName->Length >= 8) ? (CHAR)KeyName->Buffer[3] : 0; + + if (CaseInsensitive) + { + return (strncasecmp(Buffer, HashString, 4) == 0); + } + else + { + return (strncmp(Buffer, HashString, 4) == 0); + } +} + +BOOLEAN +NTAPI +CmComparePackedNames( + IN PCUNICODE_STRING CompareName, + IN PVOID Name, + IN USHORT NameLength, + IN BOOLEAN NamePacked, + IN BOOLEAN CaseInsensitive) +{ + ULONG i; + + if (NamePacked == TRUE) + { + PUCHAR PackedName = (PUCHAR)Name; + + if (CompareName->Length != NameLength * sizeof(WCHAR)) + { + //DPRINT1("Length doesn'T match %lu / %lu\n", CompareName->Length, NameLength); + return FALSE; + } + + if (CaseInsensitive) + { + for (i = 0; i < CompareName->Length / sizeof(WCHAR); i++) + { + //DbgPrint("%c/%c,", + // RtlUpcaseUnicodeChar(CompareName->Buffer[i]), + // RtlUpcaseUnicodeChar(PackedName[i])); + if (RtlUpcaseUnicodeChar(CompareName->Buffer[i]) != + RtlUpcaseUnicodeChar(PackedName[i])) + { + //DbgPrint("\nFailed!\n"); + return FALSE; + } + } + //DbgPrint("\nSuccess!\n"); + } + else + { + for (i = 0; i < CompareName->Length / sizeof(WCHAR); i++) + { + if (CompareName->Buffer[i] != PackedName[i]) + return FALSE; + } + } + + } + else + { + PWCHAR UnicodeName = (PWCHAR)Name; + + if (CompareName->Length != NameLength) + return FALSE; + + if (CaseInsensitive) + { + for (i = 0; i < CompareName->Length / sizeof(WCHAR); i++) + { + if (RtlUpcaseUnicodeChar(CompareName->Buffer[i]) != + RtlUpcaseUnicodeChar(UnicodeName[i])) + return FALSE; + } + } + else + { + for (i = 0; i < CompareName->Length / sizeof(WCHAR); i++) + { + if (CompareName->Buffer[i] != UnicodeName[i]) + return FALSE; + } + } + } + + return TRUE; +} + + +BOOLEAN +NTAPI +CmCompareKeyName( + IN PCM_KEY_NODE KeyNode, + IN PCUNICODE_STRING KeyName, + IN BOOLEAN CaseInsensitive) +{ + ASSERT(KeyNode->Signature == CM_KEY_NODE_SIGNATURE); + return CmComparePackedNames(KeyName, + KeyNode->Name, + KeyNode->NameLength, + (KeyNode->Flags & KEY_COMP_NAME) ? TRUE : FALSE, + CaseInsensitive); +} + +BOOLEAN +NTAPI +CmCompareKeyValueName( + IN PCM_KEY_VALUE ValueCell, + IN PCUNICODE_STRING ValueName, + IN BOOLEAN CaseInsensitive) +{ + ASSERT(ValueCell->Signature == CM_KEY_VALUE_SIGNATURE); + return CmComparePackedNames(ValueName, + ValueCell->Name, + ValueCell->NameLength, + (ValueCell->Flags & VALUE_COMP_NAME) ? TRUE : FALSE, + CaseInsensitive); +} + +ULONG +NTAPI +CmCopyPackedName( + _Out_ PWCHAR Buffer, + _In_ ULONG BufferLength, + _In_ PVOID Name, + _In_ USHORT NameLength, + _In_ BOOLEAN NamePacked) +{ + ULONG CharCount, i; + ASSERT(Name != 0); + ASSERT(NameLength != 0); + + if (NamePacked == TRUE) + { + NameLength *= sizeof(WCHAR); + CharCount = min(BufferLength, NameLength) / sizeof(WCHAR); + + if (Buffer != NULL) + { + PUCHAR PackedName = (PUCHAR)Name; + + for (i = 0; i < CharCount; i++) + { + Buffer[i] = PackedName[i]; + } + } + } + else + { + CharCount = min(BufferLength, NameLength) / sizeof(WCHAR); + + if (Buffer != NULL) + { + PWCHAR UnicodeName = (PWCHAR)Name; + + for (i = 0; i < CharCount; i++) + { + Buffer[i] = UnicodeName[i]; + } + } + } + + if (BufferLength >= NameLength + sizeof(UNICODE_NULL)) + { + Buffer[NameLength / sizeof(WCHAR)] = '\0'; + } + + return NameLength + sizeof(WCHAR); +} + +ULONG +NTAPI +CmCopyKeyName( + IN PCM_KEY_NODE KeyNode, + _Out_ PWCHAR KeyNameBuffer, + _Inout_ ULONG BufferLength) +{ + ASSERT(KeyNode->Signature == CM_KEY_NODE_SIGNATURE); + return CmCopyPackedName(KeyNameBuffer, + BufferLength, + KeyNode->Name, + KeyNode->NameLength, + (KeyNode->Flags & KEY_COMP_NAME) ? TRUE : FALSE); +} + +ULONG +NTAPI +CmCopyKeyValueName( + _In_ PCM_KEY_VALUE ValueCell, + _Out_ PWCHAR ValueNameBuffer, + _Inout_ ULONG BufferLength) +{ + ASSERT(ValueCell->Signature == CM_KEY_VALUE_SIGNATURE); + return CmCopyPackedName(ValueNameBuffer, + BufferLength, + ValueCell->Name, + ValueCell->NameLength, + (ValueCell->Flags & VALUE_COMP_NAME) ? TRUE : FALSE); +} Propchange: trunk/reactos/lib/cmlib/cmtools.c ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/tools/mkhive/cmi.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/mkhive/cmi.c?rev=615…
============================================================================== --- trunk/reactos/tools/mkhive/cmi.c [iso-8859-1] (original) +++ trunk/reactos/tools/mkhive/cmi.c [iso-8859-1] Sun Jan 12 21:37:29 2014 @@ -442,82 +442,6 @@ return (strncasecmp(Buffer, HashString, 4) == 0); } -static BOOLEAN -CmiCompareKeyNames( - IN PCUNICODE_STRING KeyName, - IN PCM_KEY_NODE KeyCell) -{ - PWCHAR UnicodeName; - USHORT i; - - if (KeyCell->Flags & KEY_COMP_NAME) - { - if (KeyName->Length != KeyCell->NameLength * sizeof(WCHAR)) - return FALSE; - - for (i = 0; i < KeyCell->NameLength; i++) - { - if (KeyName->Buffer[i] != ((PCHAR)KeyCell->Name)[i]) - return FALSE; - } - } - else - { - if (KeyName->Length != KeyCell->NameLength) - return FALSE; - - UnicodeName = (PWCHAR)KeyCell->Name; - for (i = 0; i < KeyCell->NameLength / sizeof(WCHAR); i++) - { - if (KeyName->Buffer[i] != UnicodeName[i]) - return FALSE; - } - } - - return TRUE; -} - -static BOOLEAN -CmiCompareKeyNamesI( - IN PCUNICODE_STRING KeyName, - IN PCM_KEY_NODE KeyCell) -{ - PWCHAR UnicodeName; - USHORT i; - - DPRINT("Flags: %hx\n", KeyCell->Flags); - - if (KeyCell->Flags & KEY_COMP_NAME) - { - if (KeyName->Length != KeyCell->NameLength * sizeof(WCHAR)) - return FALSE; - - /* FIXME: use _strnicmp */ - for (i = 0; i < KeyCell->NameLength; i++) - { - if (RtlUpcaseUnicodeChar(KeyName->Buffer[i]) != - RtlUpcaseUnicodeChar(((PCHAR)KeyCell->Name)[i])) - return FALSE; - } - } - else - { - if (KeyName->Length != KeyCell->NameLength) - return FALSE; - - UnicodeName = (PWCHAR)KeyCell->Name; - /* FIXME: use _strnicmp */ - for (i = 0; i < KeyCell->NameLength / sizeof(WCHAR); i++) - { - if (RtlUpcaseUnicodeChar(KeyName->Buffer[i]) != - RtlUpcaseUnicodeChar(UnicodeName[i])) - return FALSE; - } - } - - return TRUE; -} - NTSTATUS CmiScanForSubKey( IN PCMHIVE RegistryHive, @@ -529,6 +453,7 @@ { PCM_KEY_FAST_INDEX HashBlock; PCM_KEY_NODE CurSubKeyCell; + BOOLEAN CaseInsensitive; ULONG Storage; ULONG i; @@ -537,6 +462,7 @@ ASSERT(RegistryHive); *pSubKeyCell = NULL; + CaseInsensitive = (Attributes & OBJ_CASE_INSENSITIVE) != 0; for (Storage = Stable; Storage < HTYPE_COUNT; Storage++) { @@ -553,40 +479,20 @@ for (i = 0; i < KeyCell->SubKeyCounts[Storage]; i++) { - if (Attributes & OBJ_CASE_INSENSITIVE) - { - if ((HashBlock->List[i].HashKey == 0 - || CmiCompareHashI(SubKeyName, (PCHAR)&HashBlock->List[i].HashKey))) - { - CurSubKeyCell = (PCM_KEY_NODE)HvGetCell ( - &RegistryHive->Hive, - HashBlock->List[i].Cell); - - if (CmiCompareKeyNamesI(SubKeyName, CurSubKeyCell)) - { - *pSubKeyCell = CurSubKeyCell; - *pBlockOffset = HashBlock->List[i].Cell; - return STATUS_SUCCESS; - } - } - } - else - { - if ((HashBlock->List[i].HashKey == 0 - || CmiCompareHash(SubKeyName, (PCHAR)&HashBlock->List[i].HashKey))) - { - CurSubKeyCell = (PCM_KEY_NODE)HvGetCell ( - &RegistryHive->Hive, - HashBlock->List[i].Cell); - - if (CmiCompareKeyNames(SubKeyName, CurSubKeyCell)) - { - *pSubKeyCell = CurSubKeyCell; - *pBlockOffset = HashBlock->List[i].Cell; - return STATUS_SUCCESS; - } - } - } + if ((HashBlock->List[i].HashKey == 0) || + (CmCompareHash(SubKeyName, (PCHAR)&HashBlock->List[i].HashKey, CaseInsensitive))) + { + CurSubKeyCell = (PCM_KEY_NODE)HvGetCell ( + &RegistryHive->Hive, + HashBlock->List[i].Cell); + + if (CmCompareKeyName(CurSubKeyCell, SubKeyName, CaseInsensitive)) + { + *pSubKeyCell = CurSubKeyCell; + *pBlockOffset = HashBlock->List[i].Cell; + return STATUS_SUCCESS; + } + } } } @@ -754,44 +660,6 @@ return STATUS_SUCCESS; } -static BOOLEAN -CmiComparePackedNames( - IN PCUNICODE_STRING Name, - IN PUCHAR NameBuffer, - IN USHORT NameBufferSize, - IN BOOLEAN NamePacked) -{ - PWCHAR UNameBuffer; - ULONG i; - - if (NamePacked == TRUE) - { - if (Name->Length != NameBufferSize * sizeof(WCHAR)) - return FALSE; - - for (i = 0; i < Name->Length / sizeof(WCHAR); i++) - { - if (RtlUpcaseUnicodeChar(Name->Buffer[i]) != RtlUpcaseUnicodeChar((WCHAR)NameBuffer[i])) - return FALSE; - } - } - else - { - if (Name->Length != NameBufferSize) - return FALSE; - - UNameBuffer = (PWCHAR)NameBuffer; - - for (i = 0; i < Name->Length / sizeof(WCHAR); i++) - { - if (RtlUpcaseUnicodeChar(Name->Buffer[i]) != RtlUpcaseUnicodeChar(UNameBuffer[i])) - return FALSE; - } - } - - return TRUE; -} - NTSTATUS CmiScanForValueKey( IN PCMHIVE RegistryHive, @@ -823,11 +691,11 @@ &RegistryHive->Hive, ValueListCell->ValueOffset[i]); - if (CmiComparePackedNames( - ValueName, - (PUCHAR)CurValueCell->Name, - CurValueCell->NameLength, - (BOOLEAN)((CurValueCell->Flags & VALUE_COMP_NAME) ? TRUE : FALSE))) + if (CmComparePackedNames(ValueName, + (PUCHAR)CurValueCell->Name, + CurValueCell->NameLength, + (CurValueCell->Flags & VALUE_COMP_NAME) ? TRUE : FALSE, + TRUE)) { *pValueCell = CurValueCell; *pValueCellOffset = ValueListCell->ValueOffset[i]; Modified: trunk/reactos/tools/mkhive/mkhive.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/mkhive/mkhive.h?rev=…
============================================================================== --- trunk/reactos/tools/mkhive/mkhive.h [iso-8859-1] (original) +++ trunk/reactos/tools/mkhive/mkhive.h [iso-8859-1] Sun Jan 12 21:37:29 2014 @@ -130,13 +130,6 @@ #define min(a, b) (((a) < (b)) ? (a) : (b)) #endif -#ifdef _WIN32 -#define strncasecmp _strnicmp -#define strcasecmp _stricmp -#else -#include <string.h> -#endif//_WIN32 - #ifndef _MSC_VER #define _In_ #define _Out_
10 years, 11 months
1
0
0
0
[ekohl] 61594: [MSGINA] Fix potential bug in ReadRegDwordKey. CORE-7756 #resolve
by ekohl@svn.reactos.org
Author: ekohl Date: Sun Jan 12 21:23:01 2014 New Revision: 61594 URL:
http://svn.reactos.org/svn/reactos?rev=61594&view=rev
Log: [MSGINA] Fix potential bug in ReadRegDwordKey. CORE-7756 #resolve Modified: trunk/reactos/dll/win32/msgina/msgina.c Modified: trunk/reactos/dll/win32/msgina/msgina.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msgina/msgina.c?…
============================================================================== --- trunk/reactos/dll/win32/msgina/msgina.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msgina/msgina.c [iso-8859-1] Sun Jan 12 21:23:01 2014 @@ -102,7 +102,7 @@ cbData = sizeof(DWORD); rc = RegQueryValueExW(hKey, pszKey, NULL, &dwType, (LPBYTE)&dwValue, &cbData); - if (rc == ERROR_SUCCESS) + if (rc == ERROR_SUCCESS && dwType == REG_DWORD) *pValue = dwValue; return ERROR_SUCCESS;
10 years, 11 months
1
0
0
0
[spetreolle] 61593: [SYSSETUP] Move the locale page between the acknowledgments and the owner/computer name pages. Arch, you do not want to type your Russian password with an English layout, do you ?
by spetreolle@svn.reactos.org
Author: spetreolle Date: Sun Jan 12 15:38:17 2014 New Revision: 61593 URL:
http://svn.reactos.org/svn/reactos?rev=61593&view=rev
Log: [SYSSETUP] Move the locale page between the acknowledgments and the owner/computer name pages. Arch, you do not want to type your Russian password with an English layout, do you ? Modified: trunk/reactos/dll/win32/syssetup/wizard.c Modified: trunk/reactos/dll/win32/syssetup/wizard.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/syssetup/wizard.…
============================================================================== --- trunk/reactos/dll/win32/syssetup/wizard.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/syssetup/wizard.c [iso-8859-1] Sun Jan 12 15:38:17 2014 @@ -366,7 +366,7 @@ PropSheet_SetWizButtons(GetParent(hwndDlg), PSWIZB_BACK | PSWIZB_NEXT); if (SetupData.UnattendSetup) { - SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, IDD_OWNERPAGE); + SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, IDD_LOCALEPAGE); return TRUE; } break; @@ -634,7 +634,7 @@ PropSheet_SetWizButtons(GetParent(hwndDlg), PSWIZB_BACK | PSWIZB_NEXT); if (SetupData.UnattendSetup && WriteComputerSettings(SetupData.ComputerName, hwndDlg)) { - SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, IDD_LOCALEPAGE); + SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, IDD_DATETIMEPAGE); return TRUE; } break; @@ -918,7 +918,7 @@ RunControlPanelApplet(hwndDlg, L"intl.cpl,,/f:\"unattend.inf\""); } - SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, IDD_DATETIMEPAGE); + SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, IDD_OWNERPAGE); return TRUE; } break; @@ -2276,6 +2276,15 @@ psp.pfnDlgProc = AckPageDlgProc; ahpsp[nPages++] = CreatePropertySheetPage(&psp); + /* Create the Locale page */ + psp.dwFlags = PSP_DEFAULT | PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE; + psp.pszHeaderTitle = MAKEINTRESOURCE(IDS_LOCALETITLE); + psp.pszHeaderSubTitle = MAKEINTRESOURCE(IDS_LOCALESUBTITLE); + psp.pfnDlgProc = LocalePageDlgProc; + psp.pszTemplate = MAKEINTRESOURCE(IDD_LOCALEPAGE); + ahpsp[nPages++] = CreatePropertySheetPage(&psp); + + /* Create the Owner page */ psp.dwFlags = PSP_DEFAULT | PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE; psp.pszHeaderTitle = MAKEINTRESOURCE(IDS_OWNERTITLE); @@ -2290,15 +2299,6 @@ psp.pszHeaderSubTitle = MAKEINTRESOURCE(IDS_COMPUTERSUBTITLE); psp.pfnDlgProc = ComputerPageDlgProc; psp.pszTemplate = MAKEINTRESOURCE(IDD_COMPUTERPAGE); - ahpsp[nPages++] = CreatePropertySheetPage(&psp); - - - /* Create the Locale page */ - psp.dwFlags = PSP_DEFAULT | PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE; - psp.pszHeaderTitle = MAKEINTRESOURCE(IDS_LOCALETITLE); - psp.pszHeaderSubTitle = MAKEINTRESOURCE(IDS_LOCALESUBTITLE); - psp.pfnDlgProc = LocalePageDlgProc; - psp.pszTemplate = MAKEINTRESOURCE(IDD_LOCALEPAGE); ahpsp[nPages++] = CreatePropertySheetPage(&psp);
10 years, 11 months
1
0
0
0
[ekohl] 61592: [WINLOGON] - Change state to STATE_LOGGED_ON_SAS while the security dialog is open. - Ignore an SAS while winlogon is already in an SAS state. [MSGINA] - Read AutoAdminLogon and Disa...
by ekohl@svn.reactos.org
Author: ekohl Date: Sun Jan 12 10:57:02 2014 New Revision: 61592 URL:
http://svn.reactos.org/svn/reactos?rev=61592&view=rev
Log: [WINLOGON] - Change state to STATE_LOGGED_ON_SAS while the security dialog is open. - Ignore an SAS while winlogon is already in an SAS state. [MSGINA] - Read AutoAdminLogon and DisableCAD settings when msgina is initialized. - LoggedOutWindowProc: Disable the Cancel button on the logon dialog if the DisableCAD option has been enabled. - GUILoggedOnSAS: Fix misuse of result variable which caused some really strange effects. Modified: trunk/reactos/base/system/winlogon/sas.c trunk/reactos/base/system/winlogon/winlogon.h trunk/reactos/dll/win32/msgina/gui.c trunk/reactos/dll/win32/msgina/msgina.c trunk/reactos/dll/win32/msgina/msgina.h Modified: trunk/reactos/base/system/winlogon/sas.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/winlogon/sas.c…
============================================================================== --- trunk/reactos/base/system/winlogon/sas.c [iso-8859-1] (original) +++ trunk/reactos/base/system/winlogon/sas.c [iso-8859-1] Sun Jan 12 10:57:02 2014 @@ -845,7 +845,11 @@ Session->Gina.Functions.WlxDisplaySASNotice(Session->Gina.Context); break; case WLX_SAS_ACTION_NONE: /* 0x02 */ - if (Session->LogonState == STATE_LOGGED_OFF) + if (Session->LogonState == STATE_LOGGED_ON_SAS) + { + Session->LogonState = STATE_LOGGED_ON; + } + else if (Session->LogonState == STATE_LOGGED_OFF) { Session->Gina.Functions.WlxDisplaySASNotice(Session->Gina.Context); } @@ -891,6 +895,7 @@ break; case WLX_SAS_ACTION_TASKLIST: /* 0x07 */ SwitchDesktop(WLSession->ApplicationDesktop); + Session->LogonState = STATE_LOGGED_ON; StartTaskManager(Session); break; case WLX_SAS_ACTION_UNLOCK_WKSTA: /* 0x08 */ @@ -910,8 +915,16 @@ { DWORD wlxAction = WLX_SAS_ACTION_NONE; + /* Ignore SAS if we are already in an SAS state */ + if (Session->LogonState == STATE_LOGGED_OFF_SAS || + Session->LogonState == STATE_LOGGED_ON_SAS) + return; + if (Session->LogonState == STATE_LOGGED_ON) + { + Session->LogonState = STATE_LOGGED_ON_SAS; wlxAction = (DWORD)Session->Gina.Functions.WlxLoggedOnSAS(Session->Gina.Context, dwSasType, NULL); + } else if (Session->LogonState == STATE_LOCKED) wlxAction = (DWORD)Session->Gina.Functions.WlxWkstaLockedSAS(Session->Gina.Context, dwSasType); else Modified: trunk/reactos/base/system/winlogon/winlogon.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/winlogon/winlo…
============================================================================== --- trunk/reactos/base/system/winlogon/winlogon.h [iso-8859-1] (original) +++ trunk/reactos/base/system/winlogon/winlogon.h [iso-8859-1] Sun Jan 12 10:57:02 2014 @@ -193,7 +193,7 @@ STATE_LOGGED_OFF, STATE_LOGGED_OFF_SAS, // not used yet STATE_LOGGED_ON, - STATE_LOGGED_ON_SAS, // not used yet + STATE_LOGGED_ON_SAS, STATE_SCREENSAVER, // not used yet STATE_LOCKED, STATE_LOCKED_SAS, // not used yet Modified: trunk/reactos/dll/win32/msgina/gui.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msgina/gui.c?rev…
============================================================================== --- trunk/reactos/dll/win32/msgina/gui.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msgina/gui.c [iso-8859-1] Sun Jan 12 10:57:02 2014 @@ -383,7 +383,7 @@ return WLX_SAS_ACTION_NONE; } - result = pgContext->pWlxFuncs->WlxSwitchDesktopToWinlogon( + pgContext->pWlxFuncs->WlxSwitchDesktopToWinlogon( pgContext->hWlx); result = pgContext->pWlxFuncs->WlxDialogBoxParam( @@ -402,7 +402,7 @@ if (result == WLX_SAS_ACTION_NONE) { - result = pgContext->pWlxFuncs->WlxSwitchDesktopToUser( + pgContext->pWlxFuncs->WlxSwitchDesktopToUser( pgContext->hWlx); } @@ -427,6 +427,10 @@ /* FIXME: take care of DontDisplayLastUserName, NoDomainUI, ShutdownWithoutLogon */ pgContext = (PGINA_CONTEXT)lParam; SetWindowLongPtr(hwndDlg, GWL_USERDATA, (DWORD_PTR)pgContext); + + if (pgContext->bDisableCAD == TRUE) + EnableWindow(GetDlgItem(hwndDlg, IDCANCEL), FALSE); + SetFocus(GetDlgItem(hwndDlg, IDC_USERNAME)); pgContext->hBitmap = LoadImage(hDllInstance, MAKEINTRESOURCE(IDI_ROSLOGO), IMAGE_BITMAP, 0, 0, LR_DEFAULTCOLOR); Modified: trunk/reactos/dll/win32/msgina/msgina.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msgina/msgina.c?…
============================================================================== --- trunk/reactos/dll/win32/msgina/msgina.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msgina/msgina.c [iso-8859-1] Sun Jan 12 10:57:02 2014 @@ -86,6 +86,28 @@ return ERROR_SUCCESS; } +static LONG +ReadRegDwordKey( + IN HKEY hKey, + IN LPCWSTR pszKey, + OUT LPDWORD pValue) +{ + LONG rc; + DWORD dwType; + DWORD cbData; + DWORD dwValue; + + if (!pValue) + return ERROR_INVALID_PARAMETER; + + cbData = sizeof(DWORD); + rc = RegQueryValueExW(hKey, pszKey, NULL, &dwType, (LPBYTE)&dwValue, &cbData); + if (rc == ERROR_SUCCESS) + *pValue = dwValue; + + return ERROR_SUCCESS; +} + static VOID ChooseGinaUI(VOID) { @@ -133,6 +155,59 @@ HeapFree(GetProcessHeap(), 0, SystemStartOptions); } + +static +BOOL +GetRegistrySettings(PGINA_CONTEXT pgContext) +{ + HKEY hKey = NULL; + LPWSTR lpAutoAdminLogon = NULL; + DWORD dwDisableCAD = 0; + LONG rc; + + rc = RegOpenKeyExW(HKEY_LOCAL_MACHINE, + L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon", + 0, + KEY_QUERY_VALUE, + &hKey); + if (rc != ERROR_SUCCESS) + { + WARN("RegOpenKeyExW() failed with error %lu\n", rc); + return FALSE; + } + + rc = ReadRegSzKey(hKey, + L"AutoAdminLogon", + &lpAutoAdminLogon); + if (rc == ERROR_SUCCESS) + { + if (wcscmp(lpAutoAdminLogon, L"1") == 0) + pgContext->bAutoAdminLogon = TRUE; + } + + TRACE("bAutoAdminLogon: %s\n", pgContext->bAutoAdminLogon ? "TRUE" : "FALSE"); + + rc = ReadRegDwordKey(hKey, + L"DisableCAD", + &dwDisableCAD); + if (rc == ERROR_SUCCESS) + { + if (dwDisableCAD != 0) + pgContext->bDisableCAD = TRUE; + } + + TRACE("bDisableCAD: %s\n", pgContext->bDisableCAD ? "TRUE" : "FALSE"); + + if (lpAutoAdminLogon != NULL) + HeapFree(GetProcessHeap(), 0, lpAutoAdminLogon); + + if (hKey != NULL) + RegCloseKey(hKey); + + return TRUE; +} + + /* * @implemented */ @@ -152,6 +227,13 @@ if(!pgContext) { WARN("LocalAlloc() failed\n"); + return FALSE; + } + + if (!GetRegistrySettings(pgContext)) + { + WARN("GetRegistrySettings() failed\n"); + LocalFree(pgContext); return FALSE; } @@ -572,7 +654,7 @@ return FALSE; } - +#if 0 static BOOL CheckAutoAdminLogon( @@ -611,7 +693,7 @@ return result; } - +#endif static BOOL DoAutoLogon( @@ -726,7 +808,8 @@ return; } - if (CheckAutoAdminLogon(pgContext)) +// if (CheckAutoAdminLogon(pgContext)) + if (pgContext->bAutoAdminLogon == TRUE) { /* Don't display the window, we want to do an automatic logon */ pgContext->AutoLogonState = AUTOLOGON_ONCE; @@ -735,6 +818,14 @@ } else pgContext->AutoLogonState = AUTOLOGON_DISABLED; + +TRACE("pgContext->bDisableCAD: %lu\n", pgContext->bDisableCAD); + + if (pgContext->bDisableCAD == TRUE) + { + pgContext->pWlxFuncs->WlxSasNotify(pgContext->hWlx, WLX_SAS_TYPE_CTRL_ALT_DEL); + return; + } pGinaUI->DisplaySASNotice(pgContext); Modified: trunk/reactos/dll/win32/msgina/msgina.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msgina/msgina.h?…
============================================================================== --- trunk/reactos/dll/win32/msgina/msgina.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msgina/msgina.h [iso-8859-1] Sun Jan 12 10:57:02 2014 @@ -34,8 +34,10 @@ HANDLE hDllInstance; HWND hStatusWindow; DWORD AutoLogonState; + BOOL bDisableCAD; + BOOL bAutoAdminLogon; - /* Informations to be filled during logon */ + /* Information to be filled during logon */ WCHAR UserName[256]; WCHAR Domain[256]; SYSTEMTIME LogonTime;
10 years, 11 months
1
0
0
0
[tkreuzer] 61591: [NTOSKRNL] Implement CmpLinkKeyToHive and create missing HKLM\Security\SAM -> HKLM\SAM\SAM and HKU\S-1-5-18 -> HKU\.Default links.
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sat Jan 11 23:13:48 2014 New Revision: 61591 URL:
http://svn.reactos.org/svn/reactos?rev=61591&view=rev
Log: [NTOSKRNL] Implement CmpLinkKeyToHive and create missing HKLM\Security\SAM -> HKLM\SAM\SAM and HKU\S-1-5-18 -> HKU\.Default links. Modified: trunk/reactos/ntoskrnl/config/cmsysini.c Modified: trunk/reactos/ntoskrnl/config/cmsysini.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/cmsysini.c…
============================================================================== --- trunk/reactos/ntoskrnl/config/cmsysini.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/config/cmsysini.c [iso-8859-1] Sat Jan 11 23:13:48 2014 @@ -35,6 +35,71 @@ extern BOOLEAN CmFirstTime; /* FUNCTIONS ******************************************************************/ + +BOOLEAN +NTAPI +CmpLinkKeyToHive( + _In_z_ PWSTR LinkKeyName, + _In_z_ PWSTR TargetKeyName) +{ + OBJECT_ATTRIBUTES ObjectAttributes; + UNICODE_STRING LinkKeyName_U; + HANDLE TargetKeyHandle; + ULONG Disposition; + NTSTATUS Status; + PAGED_CODE(); + + /* Initialize the object attributes */ + RtlInitUnicodeString(&LinkKeyName_U, LinkKeyName); + InitializeObjectAttributes(&ObjectAttributes, + &LinkKeyName_U, + OBJ_CASE_INSENSITIVE | OBJ_KERNEL_HANDLE, + NULL, + NULL); + + /* Create the link key */ + Status = ZwCreateKey(&TargetKeyHandle, + KEY_CREATE_LINK, + &ObjectAttributes, + 0, + NULL, + REG_OPTION_VOLATILE | REG_OPTION_CREATE_LINK, + &Disposition); + if (!NT_SUCCESS(Status)) + { + DPRINT1("CM: CmpLinkKeyToHive: couldn't create %S Status = 0x%lx\n", + LinkKeyName, Status); + return FALSE; + } + + /* Check if the new key was actually created */ + if (Disposition != REG_CREATED_NEW_KEY) + { + DPRINT1("CM: CmpLinkKeyToHive: %S already exists!\n", LinkKeyName); + ZwClose(TargetKeyHandle); + return FALSE; + } + + /* Set the target key name as link target */ + Status = ZwSetValueKey(TargetKeyHandle, + &CmSymbolicLinkValueName, + 0, + REG_LINK, + TargetKeyName, + wcslen(TargetKeyName) * sizeof(WCHAR)); + + /* Close the link key handle */ + ObCloseHandle(TargetKeyHandle, KernelMode); + + if (!NT_SUCCESS(Status)) + { + DPRINT1("CM: CmpLinkKeyToHive: couldn't create symbolic link for %S\n", + TargetKeyName); + return FALSE; + } + + return TRUE; +} VOID NTAPI @@ -1389,9 +1454,13 @@ /* Get rid of the SD */ ExFreePoolWithTag(SecurityDescriptor, TAG_CM); - /* FIXME: Link SECURITY to SAM */ - - /* FIXME: Link S-1-5-18 to .Default */ + /* Link SECURITY to SAM */ + CmpLinkKeyToHive(L"\\Registry\\Machine\\Security\\SAM", + L"\\Registry\\Machine\\SAM\\SAM"); + + /* Link S-1-5-18 to .Default */ + CmpLinkKeyToHive(L"\\Registry\\User\\S-1-5-18", + L"\\Registry\\User\\.Default"); } BOOLEAN
10 years, 11 months
1
0
0
0
[hbelusca] 61590: [NTVDM] - Do not export (for the PIC/PIT/Speaker) the port functions but use instead the common port interface. - In bios.c : IOWriteB(PIC_MASTER_DATA, PIC_ICW4_8086 /* | PIC_ICW4...
by hbelusca@svn.reactos.org
Author: hbelusca Date: Sat Jan 11 21:45:01 2014 New Revision: 61590 URL:
http://svn.reactos.org/svn/reactos?rev=61590&view=rev
Log: [NTVDM] - Do not export (for the PIC/PIT/Speaker) the port functions but use instead the common port interface. - In bios.c : IOWriteB(PIC_MASTER_DATA, PIC_ICW4_8086 /* | PIC_ICW4_AEOI */); (line 377) : in NXVM they add PIC_ICW4_AEOI; [TheFlash], can you have a look at this and see whether it is required for the master PIC only, otherwise remove this comment. Modified: branches/ntvdm/subsystems/ntvdm/bios/bios.c branches/ntvdm/subsystems/ntvdm/hardware/pic.h branches/ntvdm/subsystems/ntvdm/hardware/ps2.h branches/ntvdm/subsystems/ntvdm/hardware/speaker.c branches/ntvdm/subsystems/ntvdm/hardware/speaker.h branches/ntvdm/subsystems/ntvdm/hardware/timer.c branches/ntvdm/subsystems/ntvdm/hardware/timer.h Modified: branches/ntvdm/subsystems/ntvdm/bios/bios.c URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/bios/bio…
============================================================================== --- branches/ntvdm/subsystems/ntvdm/bios/bios.c [iso-8859-1] (original) +++ branches/ntvdm/subsystems/ntvdm/bios/bios.c [iso-8859-1] Sat Jan 11 21:45:01 2014 @@ -361,29 +361,30 @@ * The POST (Power On-Self Test) */ - /* Initialize the PIC */ + /* Initialize the master and the slave PICs */ IOWriteB(PIC_MASTER_CMD, PIC_ICW1 | PIC_ICW1_ICW4); IOWriteB(PIC_SLAVE_CMD , PIC_ICW1 | PIC_ICW1_ICW4); /* Set the interrupt offsets */ IOWriteB(PIC_MASTER_DATA, BIOS_PIC_MASTER_INT); - IOWriteB(PIC_SLAVE_DATA , BIOS_PIC_SLAVE_INT); + IOWriteB(PIC_SLAVE_DATA , BIOS_PIC_SLAVE_INT ); /* Tell the master PIC there is a slave at IRQ 2 */ IOWriteB(PIC_MASTER_DATA, 1 << 2); IOWriteB(PIC_SLAVE_DATA , 2); - /* Make sure the PIC is in 8086 mode */ - IOWriteB(PIC_MASTER_DATA, PIC_ICW4_8086); + /* Make sure both PICs are in 8086 mode */ + IOWriteB(PIC_MASTER_DATA, PIC_ICW4_8086 /* | PIC_ICW4_AEOI */); IOWriteB(PIC_SLAVE_DATA , PIC_ICW4_8086); /* Clear the masks for both PICs */ IOWriteB(PIC_MASTER_DATA, 0x00); IOWriteB(PIC_SLAVE_DATA , 0x00); - PitWriteCommand(0x34); - PitWriteData(0, 0x00); - PitWriteData(0, 0x00); + /* Initialize the PIT */ + IOWriteB(PIT_COMMAND_PORT, 0x34); + IOWriteB(PIT_DATA_PORT(0), 0x00); + IOWriteB(PIT_DATA_PORT(0), 0x00); return TRUE; } Modified: branches/ntvdm/subsystems/ntvdm/hardware/pic.h URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/hardware…
============================================================================== --- branches/ntvdm/subsystems/ntvdm/hardware/pic.h [iso-8859-1] (original) +++ branches/ntvdm/subsystems/ntvdm/hardware/pic.h [iso-8859-1] Sat Jan 11 21:45:01 2014 @@ -16,20 +16,23 @@ /* DEFINES ********************************************************************/ -#define PIC_MASTER_CMD 0x20 +#define PIC_MASTER_CMD 0x20 #define PIC_MASTER_DATA 0x21 -#define PIC_SLAVE_CMD 0xA0 -#define PIC_SLAVE_DATA 0xA1 -#define PIC_ICW1 0x10 -#define PIC_ICW1_ICW4 (1 << 0) +#define PIC_SLAVE_CMD 0xA0 +#define PIC_SLAVE_DATA 0xA1 + +#define PIC_ICW1 0x10 +#define PIC_ICW1_ICW4 (1 << 0) #define PIC_ICW1_SINGLE (1 << 1) -#define PIC_ICW4_8086 (1 << 0) -#define PIC_ICW4_AEOI (1 << 1) -#define PIC_OCW2_NUM_MASK 0x07 -#define PIC_OCW2_EOI (1 << 5) -#define PIC_OCW2_SL (1 << 6) -#define PIC_OCW3 (1 << 3) -#define PIC_OCW3_READ_ISR 0x0B +#define PIC_ICW4_8086 (1 << 0) +#define PIC_ICW4_AEOI (1 << 1) + +#define PIC_OCW2_NUM_MASK 0x07 +#define PIC_OCW2_EOI (1 << 5) +#define PIC_OCW2_SL (1 << 6) + +#define PIC_OCW3 (1 << 3) +#define PIC_OCW3_READ_ISR 0x0B typedef struct _PIC { @@ -50,6 +53,7 @@ VOID PicInterruptRequest(BYTE Number); BYTE PicGetInterrupt(VOID); + VOID PicInitialize(VOID); #endif // _PIC_H_ Modified: branches/ntvdm/subsystems/ntvdm/hardware/ps2.h URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/hardware…
============================================================================== --- branches/ntvdm/subsystems/ntvdm/hardware/ps2.h [iso-8859-1] (original) +++ branches/ntvdm/subsystems/ntvdm/hardware/ps2.h [iso-8859-1] Sat Jan 11 21:45:01 2014 @@ -25,6 +25,7 @@ /* FUNCTIONS ******************************************************************/ VOID GenerateKeyboardInterrupts(VOID); + BOOLEAN PS2Initialize(HANDLE ConsoleInput); VOID PS2Cleanup(VOID); Modified: branches/ntvdm/subsystems/ntvdm/hardware/speaker.c URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/hardware…
============================================================================== --- branches/ntvdm/subsystems/ntvdm/hardware/speaker.c [iso-8859-1] (original) +++ branches/ntvdm/subsystems/ntvdm/hardware/speaker.c [iso-8859-1] Sat Jan 11 21:45:01 2014 @@ -28,14 +28,14 @@ static BYTE Port61hState = 0x00; HANDLE hBeep = NULL; -/* PUBLIC FUNCTIONS ***********************************************************/ +/* PRIVATE FUNCTIONS **********************************************************/ -BYTE SpeakerReadStatus(VOID) +static BYTE SpeakerReadStatus(VOID) { return Port61hState; } -VOID SpeakerWriteCommand(BYTE Value) +static VOID SpeakerWriteCommand(BYTE Value) { BOOLEAN IsConnectedToPITChannel2; UCHAR SpeakerData; @@ -121,15 +121,17 @@ } } -BYTE WINAPI SpeakerReadPort(ULONG Port) +static BYTE WINAPI SpeakerReadPort(ULONG Port) { return SpeakerReadStatus(); } -VOID WINAPI SpeakerWritePort(ULONG Port, BYTE Data) +static VOID WINAPI SpeakerWritePort(ULONG Port, BYTE Data) { SpeakerWriteCommand(Data); } + +/* PUBLIC FUNCTIONS ***********************************************************/ VOID SpeakerInitialize(VOID) { Modified: branches/ntvdm/subsystems/ntvdm/hardware/speaker.h URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/hardware…
============================================================================== --- branches/ntvdm/subsystems/ntvdm/hardware/speaker.h [iso-8859-1] (original) +++ branches/ntvdm/subsystems/ntvdm/hardware/speaker.h [iso-8859-1] Sat Jan 11 21:45:01 2014 @@ -21,8 +21,6 @@ VOID SpeakerInitialize(VOID); VOID SpeakerCleanup(VOID); -BYTE SpeakerReadStatus(VOID); -VOID SpeakerWriteCommand(BYTE Value); #endif // _SPEAKER_H_ Modified: branches/ntvdm/subsystems/ntvdm/hardware/timer.c URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/hardware…
============================================================================== --- branches/ntvdm/subsystems/ntvdm/hardware/timer.c [iso-8859-1] (original) +++ branches/ntvdm/subsystems/ntvdm/hardware/timer.c [iso-8859-1] Sat Jan 11 21:45:01 2014 @@ -20,9 +20,9 @@ static PIT_CHANNEL PitChannels[PIT_CHANNELS]; PPIT_CHANNEL PitChannel2 = &PitChannels[2]; -/* PUBLIC FUNCTIONS ***********************************************************/ - -VOID PitWriteCommand(BYTE Value) +/* PRIVATE FUNCTIONS **********************************************************/ + +static VOID PitWriteCommand(BYTE Value) { BYTE Channel = Value >> 6; BYTE Mode = (Value >> 1) & 0x07; @@ -69,7 +69,7 @@ } } -BYTE PitReadData(BYTE Channel) +static BYTE PitReadData(BYTE Channel) { WORD CurrentValue = PitChannels[Channel].CurrentValue; BYTE AccessMode = PitChannels[Channel].AccessMode; @@ -119,7 +119,7 @@ return 0; } -VOID PitWriteData(BYTE Channel, BYTE Value) +static VOID PitWriteData(BYTE Channel, BYTE Value) { BYTE AccessMode = PitChannels[Channel].AccessMode; @@ -183,6 +183,8 @@ } } } + +/* PUBLIC FUNCTIONS ***********************************************************/ VOID PitDecrementCount(DWORD Count) { Modified: branches/ntvdm/subsystems/ntvdm/hardware/timer.h URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/hardware…
============================================================================== --- branches/ntvdm/subsystems/ntvdm/hardware/timer.h [iso-8859-1] (original) +++ branches/ntvdm/subsystems/ntvdm/hardware/timer.h [iso-8859-1] Sat Jan 11 21:45:01 2014 @@ -47,11 +47,9 @@ /* FUNCTIONS ******************************************************************/ -VOID PitWriteCommand(BYTE Value); -VOID PitWriteData(BYTE Channel, BYTE Value); - VOID PitDecrementCount(DWORD Count); DWORD PitGetResolution(VOID); + VOID PitInitialize(VOID); #endif // _TIMER_H_
10 years, 11 months
1
0
0
0
[akhaldi] 61589: [GLU32] * Fix whatever Z is attempting to do.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sat Jan 11 21:26:12 2014 New Revision: 61589 URL:
http://svn.reactos.org/svn/reactos?rev=61589&view=rev
Log: [GLU32] * Fix whatever Z is attempting to do. Modified: trunk/reactos/dll/opengl/glu32/CMakeLists.txt Modified: trunk/reactos/dll/opengl/glu32/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/glu32/CMakeList…
============================================================================== --- trunk/reactos/dll/opengl/glu32/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/glu32/CMakeLists.txt [iso-8859-1] Sat Jan 11 21:26:12 2014 @@ -18,7 +18,6 @@ spec2def(glu32.dll glu32.spec ADD_IMPORTLIB) list(APPEND SOURCE - glu32.rc src/libutil/error.c src/libutil/glue.c src/libutil/mipmap.c @@ -110,7 +109,7 @@ src/libnurbs/nurbtess/searchTree.cc ${CMAKE_CURRENT_BINARY_DIR}/glu32.def) -add_library(glu32 SHARED ${SOURCE}) +add_library(glu32 SHARED ${SOURCE} glu32.rc) set_module_type(glu32 win32dll) if(NOT MSVC)
10 years, 11 months
1
0
0
0
[hbelusca] 61588: [DDK:NT_VDD] Declare some VDM memory services. [NTVDM] - Almost all of the XXXInitialize functions just return TRUE always, so VOIDify them instead (since they always succeed). - ...
by hbelusca@svn.reactos.org
Author: hbelusca Date: Sat Jan 11 20:59:27 2014 New Revision: 61588 URL:
http://svn.reactos.org/svn/reactos?rev=61588&view=rev
Log: [DDK:NT_VDD] Declare some VDM memory services. [NTVDM] - Almost all of the XXXInitialize functions just return TRUE always, so VOIDify them instead (since they always succeed). - Move almost all of the hardware initialization inside EmulatorInitialize. - Move pure console initialization/mode-saving/cleanup code into ConsoleInit/Cleanup functions in ntvdm.c instead of in bios.c. Modified: branches/ntvdm/include/ddk/nt_vdd.h branches/ntvdm/subsystems/ntvdm/bios/bios.c branches/ntvdm/subsystems/ntvdm/bios/bios.h branches/ntvdm/subsystems/ntvdm/emulator.c branches/ntvdm/subsystems/ntvdm/emulator.h branches/ntvdm/subsystems/ntvdm/hardware/cmos.c branches/ntvdm/subsystems/ntvdm/hardware/cmos.h branches/ntvdm/subsystems/ntvdm/hardware/pic.c branches/ntvdm/subsystems/ntvdm/hardware/pic.h branches/ntvdm/subsystems/ntvdm/hardware/timer.c branches/ntvdm/subsystems/ntvdm/hardware/timer.h branches/ntvdm/subsystems/ntvdm/ntvdm.c branches/ntvdm/subsystems/ntvdm/ntvdm.h Modified: branches/ntvdm/include/ddk/nt_vdd.h URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/include/ddk/nt_vdd.h?rev=…
============================================================================== --- branches/ntvdm/include/ddk/nt_vdd.h [iso-8859-1] (original) +++ branches/ntvdm/include/ddk/nt_vdd.h [iso-8859-1] Sat Jan 11 20:59:27 2014 @@ -35,6 +35,7 @@ VOID WINAPI VDDTerminateVDM(VOID); + /* * I/O Port services @@ -86,6 +87,69 @@ PVDD_IO_PORTRANGE pPortRange ); + +/* + * Memory services + */ + +typedef enum +{ + VDM_V86, + VDM_PM +} VDM_MODE; + +#ifndef MSW_PE +#define MSW_PE 0x0001 +#endif + +#define getMODE() ((getMSW() & MSW_PE) ? VDM_PM : VDM_V86) + +PBYTE +WINAPI +Sim32pGetVDMPointer +( + IN ULONG Address, + IN BOOLEAN ProtectedMode +); + +PBYTE +WINAPI +MGetVdmPointer +( + IN ULONG Address, + IN ULONG Size, + IN BOOLEAN ProtectedMode +); + +PVOID +WINAPI +VdmMapFlat +( + IN USHORT Segment, + IN ULONG Offset, + IN VDM_MODE Mode +); + +BOOL +WINAPI +VdmFlushCache +( + IN USHORT Segment, + IN ULONG Offset, + IN ULONG Size, + IN VDM_MODE Mode +); + +BOOL +WINAPI +VdmUnmapFlat +( + IN USHORT Segment, + IN ULONG Offset, + IN PVOID Buffer, + IN VDM_MODE Mode +); + #ifdef __cplusplus } #endif Modified: branches/ntvdm/subsystems/ntvdm/bios/bios.c URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/bios/bio…
============================================================================== --- branches/ntvdm/subsystems/ntvdm/bios/bios.c [iso-8859-1] (original) +++ branches/ntvdm/subsystems/ntvdm/bios/bios.c [iso-8859-1] Sat Jan 11 20:59:27 2014 @@ -25,11 +25,6 @@ PBIOS_DATA_AREA Bda; static BYTE BiosKeyboardMap[256]; -static HANDLE BiosConsoleInput = INVALID_HANDLE_VALUE; -static HANDLE BiosConsoleOutput = INVALID_HANDLE_VALUE; -static DWORD BiosSavedConInMode, BiosSavedConOutMode; -static CONSOLE_CURSOR_INFO BiosSavedCursorInfo; -static CONSOLE_SCREEN_BUFFER_INFO BiosSavedBufferInfo; /* PRIVATE FUNCTIONS **********************************************************/ @@ -314,7 +309,7 @@ return CharacterData; } -BOOLEAN BiosInitialize(VOID) +BOOLEAN BiosInitialize(HANDLE ConsoleInput, HANDLE ConsoleOutput) { /* Initialize the BDA */ Bda = (PBIOS_DATA_AREA)SEG_OFF_TO_PTR(BDA_SEGMENT, 0); @@ -353,64 +348,18 @@ ((PDWORD)BaseAddress)[0x48] = (DWORD)NULL; ((PDWORD)BaseAddress)[0x49] = (DWORD)NULL; - /* Get the input handle to the real console, and check for success */ - BiosConsoleInput = CreateFileW(L"CONIN$", - GENERIC_READ | GENERIC_WRITE, - FILE_SHARE_READ | FILE_SHARE_WRITE, - NULL, - OPEN_EXISTING, - 0, - NULL); - if (BiosConsoleInput == INVALID_HANDLE_VALUE) - { - return FALSE; - } - - /* Get the output handle to the real console, and check for success */ - BiosConsoleOutput = CreateFileW(L"CONOUT$", - GENERIC_READ | GENERIC_WRITE, - FILE_SHARE_READ | FILE_SHARE_WRITE, - NULL, - OPEN_EXISTING, - 0, - NULL); - if (BiosConsoleOutput == INVALID_HANDLE_VALUE) - { - CloseHandle(BiosConsoleInput); - return FALSE; - } - - /* Save the original input and output console modes */ - if (!GetConsoleMode(BiosConsoleInput , &BiosSavedConInMode ) || - !GetConsoleMode(BiosConsoleOutput, &BiosSavedConOutMode)) - { - CloseHandle(BiosConsoleOutput); - CloseHandle(BiosConsoleInput); - return FALSE; - } - - /* Save the original cursor and console screen buffer information */ - if (!GetConsoleCursorInfo(BiosConsoleOutput, &BiosSavedCursorInfo) || - !GetConsoleScreenBufferInfo(BiosConsoleOutput, &BiosSavedBufferInfo)) - { - CloseHandle(BiosConsoleOutput); - CloseHandle(BiosConsoleInput); - return FALSE; - } - /* Initialize the Video BIOS */ - if (!VidBiosInitialize(BiosConsoleOutput)) - { - CloseHandle(BiosConsoleOutput); - CloseHandle(BiosConsoleInput); - return FALSE; - } + if (!VidBiosInitialize(ConsoleOutput)) return FALSE; /* Set the console input mode */ - SetConsoleMode(BiosConsoleInput, ENABLE_MOUSE_INPUT | ENABLE_PROCESSED_INPUT); + SetConsoleMode(ConsoleInput, ENABLE_MOUSE_INPUT | ENABLE_PROCESSED_INPUT); /* Initialize PS2 */ - PS2Initialize(BiosConsoleInput); + PS2Initialize(ConsoleInput); + + /* + * The POST (Power On-Self Test) + */ /* Initialize the PIC */ IOWriteB(PIC_MASTER_CMD, PIC_ICW1 | PIC_ICW1_ICW4); @@ -441,39 +390,8 @@ VOID BiosCleanup(VOID) { - SMALL_RECT ConRect; - CONSOLE_SCREEN_BUFFER_INFO ConsoleInfo; - PS2Cleanup(); VidBiosCleanup(); - - /* Restore the old screen buffer */ - SetConsoleActiveScreenBuffer(BiosConsoleOutput); - - /* Restore the original console size */ - GetConsoleScreenBufferInfo(BiosConsoleOutput, &ConsoleInfo); - ConRect.Left = 0; // BiosSavedBufferInfo.srWindow.Left; - // ConRect.Top = ConsoleInfo.dwCursorPosition.Y / (BiosSavedBufferInfo.srWindow.Bottom - BiosSavedBufferInfo.srWindow.Top + 1); - // ConRect.Top *= (BiosSavedBufferInfo.srWindow.Bottom - BiosSavedBufferInfo.srWindow.Top + 1); - ConRect.Top = ConsoleInfo.dwCursorPosition.Y; - ConRect.Right = ConRect.Left + BiosSavedBufferInfo.srWindow.Right - BiosSavedBufferInfo.srWindow.Left; - ConRect.Bottom = ConRect.Top + BiosSavedBufferInfo.srWindow.Bottom - BiosSavedBufferInfo.srWindow.Top ; - /* See the following trick explanation in vga.c:VgaEnterTextMode() */ - SetConsoleScreenBufferSize(BiosConsoleOutput, BiosSavedBufferInfo.dwSize); - SetConsoleWindowInfo(BiosConsoleOutput, TRUE, &ConRect); - // SetConsoleWindowInfo(BiosConsoleOutput, TRUE, &BiosSavedBufferInfo.srWindow); - SetConsoleScreenBufferSize(BiosConsoleOutput, BiosSavedBufferInfo.dwSize); - - /* Restore the original cursor shape */ - SetConsoleCursorInfo(BiosConsoleOutput, &BiosSavedCursorInfo); - - /* Restore the original input and output console modes */ - SetConsoleMode(BiosConsoleOutput, BiosSavedConOutMode); - SetConsoleMode(BiosConsoleInput , BiosSavedConInMode ); - - /* Close the console handles */ - if (BiosConsoleOutput != INVALID_HANDLE_VALUE) CloseHandle(BiosConsoleOutput); - if (BiosConsoleInput != INVALID_HANDLE_VALUE) CloseHandle(BiosConsoleInput); } VOID BiosHandleIrq(BYTE IrqNumber, LPWORD Stack) Modified: branches/ntvdm/subsystems/ntvdm/bios/bios.h URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/bios/bio…
============================================================================== --- branches/ntvdm/subsystems/ntvdm/bios/bios.h [iso-8859-1] (original) +++ branches/ntvdm/subsystems/ntvdm/bios/bios.h [iso-8859-1] Sat Jan 11 20:59:27 2014 @@ -137,7 +137,7 @@ WORD BiosPeekCharacter(VOID); WORD BiosGetCharacter(VOID); -BOOLEAN BiosInitialize(VOID); +BOOLEAN BiosInitialize(HANDLE ConsoleInput, HANDLE ConsoleOutput); VOID BiosCleanup(VOID); VOID BiosHandleIrq(BYTE IrqNumber, LPWORD Stack); Modified: branches/ntvdm/subsystems/ntvdm/emulator.c URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/emulator…
============================================================================== --- branches/ntvdm/subsystems/ntvdm/emulator.c [iso-8859-1] (original) +++ branches/ntvdm/subsystems/ntvdm/emulator.c [iso-8859-1] Sat Jan 11 20:59:27 2014 @@ -11,20 +11,24 @@ #define NDEBUG #include "emulator.h" + #include "bios/bios.h" +#include "hardware/cmos.h" +#include "hardware/pic.h" +#include "hardware/speaker.h" +#include "hardware/timer.h" +#include "hardware/vga.h" + #include "bop.h" #include "vddsup.h" #include "io.h" #include "registers.h" -#include "hardware/vga.h" -#include "hardware/pic.h" - -// HACK -typedef INT VDM_MODE; /* PRIVATE VARIABLES **********************************************************/ FAST486_STATE EmulatorContext; +LPVOID BaseAddress = NULL; +BOOLEAN VdmRunning = TRUE; static BOOLEAN A20Line = FALSE; @@ -115,7 +119,14 @@ { /* Allocate memory for the 16-bit address space */ BaseAddress = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, MAX_ADDRESS); - if (BaseAddress == NULL) return FALSE; + if (BaseAddress == NULL) + { + wprintf(L"FATAL: Failed to allocate VDM memory.\n"); + return FALSE; + } + + /* Initialize I/O ports */ + /* Initialize RAM */ /* Initialize the CPU */ Fast486Initialize(&EmulatorContext, @@ -131,17 +142,30 @@ /* Enable interrupts */ setIF(1); + /* Initialize the PIC, the PIT, the CMOS and the PC Speaker */ + PicInitialize(); + PitInitialize(); + CmosInitialize(); + SpeakerInitialize(); + + /* Register the DebugBreak BOP */ + RegisterBop(BOP_DEBUGGER, EmulatorDebugBreak); + /* Initialize VDD support */ VDDSupInitialize(); - /* Register the DebugBreak BOP */ - RegisterBop(BOP_DEBUGGER, EmulatorDebugBreak); - return TRUE; } VOID EmulatorCleanup(VOID) { + SpeakerCleanup(); + CmosCleanup(); + // PitCleanup(); + // PicCleanup(); + + // Fast486Cleanup(); + /* Free the memory allocated for the 16-bit address space */ if (BaseAddress != NULL) HeapFree(GetProcessHeap(), 0, BaseAddress); } @@ -227,7 +251,7 @@ return SEG_OFF_TO_PTR(Segment, Offset); } -BOOL +BOOL WINAPI VdmFlushCache(IN USHORT Segment, IN ULONG Offset, Modified: branches/ntvdm/subsystems/ntvdm/emulator.h URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/emulator…
============================================================================== --- branches/ntvdm/subsystems/ntvdm/emulator.h [iso-8859-1] (original) +++ branches/ntvdm/subsystems/ntvdm/emulator.h [iso-8859-1] Sat Jan 11 20:59:27 2014 @@ -40,6 +40,25 @@ #define STACK_CS 3 #define STACK_FLAGS 4 + +/* Basic Memory Management */ +#define TO_LINEAR(seg, off) (((seg) << 4) + (off)) +#define MAX_SEGMENT 0xFFFF +#define MAX_OFFSET 0xFFFF +#define MAX_ADDRESS 0x1000000 // 16 MB of RAM + +#define FAR_POINTER(x) \ + (PVOID)((ULONG_PTR)BaseAddress + TO_LINEAR(HIWORD(x), LOWORD(x))) + +#define SEG_OFF_TO_PTR(seg, off) \ + (PVOID)((ULONG_PTR)BaseAddress + TO_LINEAR((seg), (off))) + + +/* BCD-Binary conversion */ +#define BINARY_TO_BCD(x) ((((x) / 1000) << 12) + (((x) / 100) << 8) + (((x) / 10) << 4) + ((x) % 10)) +#define BCD_TO_BINARY(x) (((x) >> 12) * 1000 + ((x) >> 8) * 100 + ((x) >> 4) * 10 + ((x) & 0x0F)) + + enum { EMULATOR_EXCEPTION_DIVISION_BY_ZERO, @@ -60,6 +79,8 @@ }; extern FAST486_STATE EmulatorContext; +extern LPVOID BaseAddress; +extern BOOLEAN VdmRunning; /* FUNCTIONS ******************************************************************/ Modified: branches/ntvdm/subsystems/ntvdm/hardware/cmos.c URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/hardware…
============================================================================== --- branches/ntvdm/subsystems/ntvdm/hardware/cmos.c [iso-8859-1] (original) +++ branches/ntvdm/subsystems/ntvdm/hardware/cmos.c [iso-8859-1] Sat Jan 11 20:59:27 2014 @@ -384,7 +384,7 @@ } } -BOOLEAN CmosInitialize(VOID) +VOID CmosInitialize(VOID) { DWORD CmosSize = sizeof(CmosMemory); @@ -433,8 +433,6 @@ /* Register the I/O Ports */ RegisterIoPort(CMOS_ADDRESS_PORT, NULL , CmosWritePort); RegisterIoPort(CMOS_DATA_PORT , CmosReadPort, CmosWritePort); - - return TRUE; } VOID CmosCleanup(VOID) Modified: branches/ntvdm/subsystems/ntvdm/hardware/cmos.h URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/hardware…
============================================================================== --- branches/ntvdm/subsystems/ntvdm/hardware/cmos.h [iso-8859-1] (original) +++ branches/ntvdm/subsystems/ntvdm/hardware/cmos.h [iso-8859-1] Sat Jan 11 20:59:27 2014 @@ -129,7 +129,7 @@ VOID RtcPeriodicTick(VOID); VOID RtcTimeUpdate(VOID); -BOOLEAN CmosInitialize(VOID); +VOID CmosInitialize(VOID); VOID CmosCleanup(VOID); #endif // _CMOS_H_ Modified: branches/ntvdm/subsystems/ntvdm/hardware/pic.c URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/hardware…
============================================================================== --- branches/ntvdm/subsystems/ntvdm/hardware/pic.c [iso-8859-1] (original) +++ branches/ntvdm/subsystems/ntvdm/hardware/pic.c [iso-8859-1] Sat Jan 11 20:59:27 2014 @@ -293,15 +293,13 @@ else return MasterPic.IntOffset + 7; } -BOOLEAN PicInitialize(VOID) +VOID PicInitialize(VOID) { /* Register the I/O Ports */ RegisterIoPort(PIC_MASTER_CMD , PicReadPort, PicWritePort); RegisterIoPort(PIC_SLAVE_CMD , PicReadPort, PicWritePort); RegisterIoPort(PIC_MASTER_DATA, PicReadPort, PicWritePort); RegisterIoPort(PIC_SLAVE_DATA , PicReadPort, PicWritePort); - - return TRUE; } Modified: branches/ntvdm/subsystems/ntvdm/hardware/pic.h URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/hardware…
============================================================================== --- branches/ntvdm/subsystems/ntvdm/hardware/pic.h [iso-8859-1] (original) +++ branches/ntvdm/subsystems/ntvdm/hardware/pic.h [iso-8859-1] Sat Jan 11 20:59:27 2014 @@ -50,7 +50,7 @@ VOID PicInterruptRequest(BYTE Number); BYTE PicGetInterrupt(VOID); -BOOLEAN PicInitialize(VOID); +VOID PicInitialize(VOID); #endif // _PIC_H_ Modified: branches/ntvdm/subsystems/ntvdm/hardware/timer.c URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/hardware…
============================================================================== --- branches/ntvdm/subsystems/ntvdm/hardware/timer.c [iso-8859-1] (original) +++ branches/ntvdm/subsystems/ntvdm/hardware/timer.c [iso-8859-1] Sat Jan 11 20:59:27 2014 @@ -350,15 +350,13 @@ return PIT_BASE_FREQUENCY / MinReloadValue; } -BOOLEAN PitInitialize(VOID) +VOID PitInitialize(VOID) { /* Register the I/O Ports */ RegisterIoPort(PIT_COMMAND_PORT, NULL , PitWritePort); RegisterIoPort(PIT_DATA_PORT(0), PitReadPort, PitWritePort); RegisterIoPort(PIT_DATA_PORT(1), PitReadPort, PitWritePort); RegisterIoPort(PIT_DATA_PORT(2), PitReadPort, PitWritePort); - - return TRUE; } /* EOF */ Modified: branches/ntvdm/subsystems/ntvdm/hardware/timer.h URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/hardware…
============================================================================== --- branches/ntvdm/subsystems/ntvdm/hardware/timer.h [iso-8859-1] (original) +++ branches/ntvdm/subsystems/ntvdm/hardware/timer.h [iso-8859-1] Sat Jan 11 20:59:27 2014 @@ -52,7 +52,7 @@ VOID PitDecrementCount(DWORD Count); DWORD PitGetResolution(VOID); -BOOLEAN PitInitialize(VOID); +VOID PitInitialize(VOID); #endif // _TIMER_H_ Modified: branches/ntvdm/subsystems/ntvdm/ntvdm.c URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/ntvdm.c?…
============================================================================== --- branches/ntvdm/subsystems/ntvdm/ntvdm.c [iso-8859-1] (original) +++ branches/ntvdm/subsystems/ntvdm/ntvdm.c [iso-8859-1] Sat Jan 11 20:59:27 2014 @@ -15,9 +15,7 @@ #include "bios/bios.h" #include "hardware/cmos.h" -#include "hardware/pic.h" #include "hardware/ps2.h" -#include "hardware/speaker.h" #include "hardware/timer.h" #include "hardware/vga.h" #include "dos/dos.h" @@ -30,8 +28,11 @@ /* PUBLIC VARIABLES ***********************************************************/ -BOOLEAN VdmRunning = TRUE; -LPVOID BaseAddress = NULL; +static HANDLE ConsoleInput = INVALID_HANDLE_VALUE; +static HANDLE ConsoleOutput = INVALID_HANDLE_VALUE; +static DWORD OrgConsoleInputMode, OrgConsoleOutputMode; +static CONSOLE_CURSOR_INFO OrgConsoleCursorInfo; +static CONSOLE_SCREEN_BUFFER_INFO OrgConsoleBufferInfo; /* PUBLIC FUNCTIONS ***********************************************************/ @@ -65,6 +66,97 @@ } } return TRUE; +} + +BOOL ConsoleInit(VOID) +{ + /* Set the handler routine */ + SetConsoleCtrlHandler(ConsoleCtrlHandler, TRUE); + + /* Get the input handle to the real console, and check for success */ + ConsoleInput = CreateFileW(L"CONIN$", + GENERIC_READ | GENERIC_WRITE, + FILE_SHARE_READ | FILE_SHARE_WRITE, + NULL, + OPEN_EXISTING, + 0, + NULL); + if (ConsoleInput == INVALID_HANDLE_VALUE) + { + wprintf(L"FATAL: Cannot retrieve a handle to the console input\n"); + return FALSE; + } + + /* Get the output handle to the real console, and check for success */ + ConsoleOutput = CreateFileW(L"CONOUT$", + GENERIC_READ | GENERIC_WRITE, + FILE_SHARE_READ | FILE_SHARE_WRITE, + NULL, + OPEN_EXISTING, + 0, + NULL); + if (ConsoleOutput == INVALID_HANDLE_VALUE) + { + CloseHandle(ConsoleInput); + wprintf(L"FATAL: Cannot retrieve a handle to the console output\n"); + return FALSE; + } + + /* Save the original input and output console modes */ + if (!GetConsoleMode(ConsoleInput , &OrgConsoleInputMode ) || + !GetConsoleMode(ConsoleOutput, &OrgConsoleOutputMode)) + { + CloseHandle(ConsoleOutput); + CloseHandle(ConsoleInput); + wprintf(L"FATAL: Cannot save console in/out modes\n"); + return FALSE; + } + + /* Save the original cursor and console screen buffer information */ + if (!GetConsoleCursorInfo(ConsoleOutput, &OrgConsoleCursorInfo) || + !GetConsoleScreenBufferInfo(ConsoleOutput, &OrgConsoleBufferInfo)) + { + CloseHandle(ConsoleOutput); + CloseHandle(ConsoleInput); + wprintf(L"FATAL: Cannot save console cursor/screen-buffer info\n"); + return FALSE; + } + + return TRUE; +} + +VOID ConsoleCleanup(VOID) +{ + SMALL_RECT ConRect; + CONSOLE_SCREEN_BUFFER_INFO ConsoleInfo; + + /* Restore the old screen buffer */ + SetConsoleActiveScreenBuffer(ConsoleOutput); + + /* Restore the original console size */ + GetConsoleScreenBufferInfo(ConsoleOutput, &ConsoleInfo); + ConRect.Left = 0; // OrgConsoleBufferInfo.srWindow.Left; + // ConRect.Top = ConsoleInfo.dwCursorPosition.Y / (OrgConsoleBufferInfo.srWindow.Bottom - OrgConsoleBufferInfo.srWindow.Top + 1); + // ConRect.Top *= (OrgConsoleBufferInfo.srWindow.Bottom - OrgConsoleBufferInfo.srWindow.Top + 1); + ConRect.Top = ConsoleInfo.dwCursorPosition.Y; + ConRect.Right = ConRect.Left + OrgConsoleBufferInfo.srWindow.Right - OrgConsoleBufferInfo.srWindow.Left; + ConRect.Bottom = ConRect.Top + OrgConsoleBufferInfo.srWindow.Bottom - OrgConsoleBufferInfo.srWindow.Top ; + /* See the following trick explanation in vga.c:VgaEnterTextMode() */ + SetConsoleScreenBufferSize(ConsoleOutput, OrgConsoleBufferInfo.dwSize); + SetConsoleWindowInfo(ConsoleOutput, TRUE, &ConRect); + // SetConsoleWindowInfo(ConsoleOutput, TRUE, &OrgConsoleBufferInfo.srWindow); + SetConsoleScreenBufferSize(ConsoleOutput, OrgConsoleBufferInfo.dwSize); + + /* Restore the original cursor shape */ + SetConsoleCursorInfo(ConsoleOutput, &OrgConsoleCursorInfo); + + /* Restore the original input and output console modes */ + SetConsoleMode(ConsoleOutput, OrgConsoleOutputMode); + SetConsoleMode(ConsoleInput , OrgConsoleInputMode ); + + /* Close the console handles */ + if (ConsoleOutput != INVALID_HANDLE_VALUE) CloseHandle(ConsoleOutput); + if (ConsoleInput != INVALID_HANDLE_VALUE) CloseHandle(ConsoleInput); } INT wmain(INT argc, WCHAR *argv[]) @@ -81,9 +173,6 @@ DWORD Cycles = 0; INT KeyboardIntCounter = 0; - /* Set the handler routine */ - SetConsoleCtrlHandler(ConsoleCtrlHandler, TRUE); - #ifndef TESTING UNREFERENCED_PARAMETER(argc); UNREFERENCED_PARAMETER(argv); @@ -105,10 +194,17 @@ DPRINT1("\n\n\nNTVDM - Starting '%s'...\n\n\n", CommandLine); + /* Initialize the console */ + if (!ConsoleInit()) + { + wprintf(L"FATAL: A problem occurred when trying to initialize the console\n"); + goto Cleanup; + } + /* Initialize the emulator */ if (!EmulatorInitialize()) { - wprintf(L"FATAL: Failed to initialize the CPU emulator\n"); + wprintf(L"FATAL: Failed to initialize the emulator\n"); goto Cleanup; } @@ -119,38 +215,8 @@ goto Cleanup; } - /* Initialize the PIC */ - if (!PicInitialize()) - { - wprintf(L"FATAL: Failed to initialize the PIC.\n"); - goto Cleanup; - } - - /* Initialize the PIT */ - if (!PitInitialize()) - { - wprintf(L"FATAL: Failed to initialize the PIT.\n"); - goto Cleanup; - } - - /* Initialize the CMOS */ - if (!CmosInitialize()) - { - wprintf(L"FATAL: Failed to initialize the VDM CMOS.\n"); - goto Cleanup; - } - - /* Initialize the PC Speaker */ - SpeakerInitialize(); - - - - - - - /* Initialize the system BIOS */ - if (!BiosInitialize()) + if (!BiosInitialize(ConsoleInput, ConsoleOutput)) { wprintf(L"FATAL: Failed to initialize the VDM BIOS.\n"); goto Cleanup; @@ -264,10 +330,9 @@ VgaRefreshDisplay(); Cleanup: - SpeakerCleanup(); BiosCleanup(); - CmosCleanup(); EmulatorCleanup(); + ConsoleCleanup(); DPRINT1("\n\n\nNTVDM - Exiting...\n\n\n"); Modified: branches/ntvdm/subsystems/ntvdm/ntvdm.h URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/ntvdm.h?…
============================================================================== --- branches/ntvdm/subsystems/ntvdm/ntvdm.h [iso-8859-1] (original) +++ branches/ntvdm/subsystems/ntvdm/ntvdm.h [iso-8859-1] Sat Jan 11 20:59:27 2014 @@ -30,31 +30,12 @@ /* DEFINES ********************************************************************/ -/* Basic Memory Management */ -#define TO_LINEAR(seg, off) (((seg) << 4) + (off)) -#define MAX_SEGMENT 0xFFFF -#define MAX_OFFSET 0xFFFF -#define MAX_ADDRESS 0x1000000 // 16 MB of RAM - -#define FAR_POINTER(x) \ - (PVOID)((ULONG_PTR)BaseAddress + TO_LINEAR(HIWORD(x), LOWORD(x))) - -#define SEG_OFF_TO_PTR(seg, off) \ - (PVOID)((ULONG_PTR)BaseAddress + TO_LINEAR((seg), (off))) - -/* BCD-Binary conversion */ -#define BINARY_TO_BCD(x) ((((x) / 1000) << 12) + (((x) / 100) << 8) + (((x) / 10) << 4) + ((x) % 10)) -#define BCD_TO_BINARY(x) (((x) >> 12) * 1000 + ((x) >> 8) * 100 + ((x) >> 4) * 10 + ((x) & 0x0F)) - /* Processor speed */ #define STEPS_PER_CYCLE 256 #define KBD_INT_CYCLES 16 /* FUNCTIONS ******************************************************************/ -extern LPVOID BaseAddress; -extern BOOLEAN VdmRunning; - VOID DisplayMessage(LPCWSTR Format, ...); #endif // _NTVDM_H_
10 years, 11 months
1
0
0
0
[ekohl] 61587: [MSGINA] - WlxDisplaySASNotice: Do not try an auto admin logon here. Check for auto admin logon instead and let WlxLoggedOutSAS do the logon stuff. [WINLOGON] - Avoid posting two SAS...
by ekohl@svn.reactos.org
Author: ekohl Date: Sat Jan 11 20:47:41 2014 New Revision: 61587 URL:
http://svn.reactos.org/svn/reactos?rev=61587&view=rev
Log: [MSGINA] - WlxDisplaySASNotice: Do not try an auto admin logon here. Check for auto admin logon instead and let WlxLoggedOutSAS do the logon stuff. [WINLOGON] - Avoid posting two SAS notification messages when winlogon is started up. Modified: trunk/reactos/base/system/winlogon/sas.c trunk/reactos/dll/win32/msgina/msgina.c Modified: trunk/reactos/base/system/winlogon/sas.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/winlogon/sas.c…
============================================================================== --- trunk/reactos/base/system/winlogon/sas.c [iso-8859-1] (original) +++ trunk/reactos/base/system/winlogon/sas.c [iso-8859-1] Sat Jan 11 20:47:41 2014 @@ -845,7 +845,10 @@ Session->Gina.Functions.WlxDisplaySASNotice(Session->Gina.Context); break; case WLX_SAS_ACTION_NONE: /* 0x02 */ - Session->Gina.Functions.WlxDisplaySASNotice(Session->Gina.Context); + if (Session->LogonState == STATE_LOGGED_OFF) + { + Session->Gina.Functions.WlxDisplaySASNotice(Session->Gina.Context); + } break; case WLX_SAS_ACTION_LOCK_WKSTA: /* 0x03 */ if (Session->Gina.Functions.WlxIsLockOk(Session->Gina.Context)) @@ -919,7 +922,7 @@ case WLX_SAS_TYPE_TIMEOUT: /* 0x00 */ { Session->Gina.Functions.WlxDisplaySASNotice(Session->Gina.Context); - break; + return; } default: { Modified: trunk/reactos/dll/win32/msgina/msgina.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msgina/msgina.c?…
============================================================================== --- trunk/reactos/dll/win32/msgina/msgina.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msgina/msgina.c [iso-8859-1] Sat Jan 11 20:47:41 2014 @@ -572,6 +572,47 @@ return FALSE; } + +static +BOOL +CheckAutoAdminLogon( + IN PGINA_CONTEXT pgContext) +{ + HKEY WinLogonKey = NULL; + LPWSTR AutoLogon = NULL; + BOOL result = FALSE; + LONG rc; + + if (pgContext->AutoLogonState == AUTOLOGON_DISABLED) + return FALSE; + + rc = RegOpenKeyExW(HKEY_LOCAL_MACHINE, + L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\WinLogon", + 0, + KEY_QUERY_VALUE, + &WinLogonKey); + if (rc != ERROR_SUCCESS) + goto cleanup; + + rc = ReadRegSzKey(WinLogonKey, + L"AutoAdminLogon", + &AutoLogon); + + if (rc != ERROR_SUCCESS) + goto cleanup; + + if (wcscmp(AutoLogon, L"1") == 0) + result = TRUE; + +cleanup: + if (WinLogonKey != NULL) + RegCloseKey(WinLogonKey); + HeapFree(GetProcessHeap(), 0, AutoLogon); + + return result; +} + + static BOOL DoAutoLogon( IN PGINA_CONTEXT pgContext) @@ -685,7 +726,7 @@ return; } - if (DoAutoLogon(pgContext)) + if (CheckAutoAdminLogon(pgContext)) { /* Don't display the window, we want to do an automatic logon */ pgContext->AutoLogonState = AUTOLOGON_ONCE;
10 years, 11 months
1
0
0
0
[hbelusca] 61586: [NTVDM]: Break the BIOS into the BIOS and the video BIOS.
by hbelusca@svn.reactos.org
Author: hbelusca Date: Sat Jan 11 17:05:25 2014 New Revision: 61586 URL:
http://svn.reactos.org/svn/reactos?rev=61586&view=rev
Log: [NTVDM]: Break the BIOS into the BIOS and the video BIOS. Added: branches/ntvdm/subsystems/ntvdm/bios/vidbios.c - copied, changed from r61583, branches/ntvdm/subsystems/ntvdm/bios/bios.c branches/ntvdm/subsystems/ntvdm/bios/vidbios.h - copied, changed from r61583, branches/ntvdm/subsystems/ntvdm/bios/bios.h Modified: branches/ntvdm/subsystems/ntvdm/CMakeLists.txt branches/ntvdm/subsystems/ntvdm/bios/bios.c branches/ntvdm/subsystems/ntvdm/bios/bios.h branches/ntvdm/subsystems/ntvdm/dos/dos.c [This mail would be too long, it was shortened to contain the URLs only.] Modified: branches/ntvdm/subsystems/ntvdm/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/CMakeLis…
Modified: branches/ntvdm/subsystems/ntvdm/bios/bios.c URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/bios/bio…
Modified: branches/ntvdm/subsystems/ntvdm/bios/bios.h URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/bios/bio…
Copied: branches/ntvdm/subsystems/ntvdm/bios/vidbios.c (from r61583, branches/ntvdm/subsystems/ntvdm/bios/bios.c) URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/bios/vid…
Copied: branches/ntvdm/subsystems/ntvdm/bios/vidbios.h (from r61583, branches/ntvdm/subsystems/ntvdm/bios/bios.h) URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/bios/vid…
Modified: branches/ntvdm/subsystems/ntvdm/dos/dos.c URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/dos/dos.…
10 years, 11 months
1
0
0
0
← Newer
1
...
28
29
30
31
32
33
34
...
43
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
Results per page:
10
25
50
100
200