ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
January 2008
----- 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
24 participants
539 discussions
Start a n
N
ew thread
[cwittich] 32002: wasn't fast enough to hit the cancel button cast to VOID* instead of using CopyMemory
by cwittich@svn.reactos.org
Author: cwittich Date: Fri Jan 25 20:41:29 2008 New Revision: 32002 URL:
http://svn.reactos.org/svn/reactos?rev=32002&view=rev
Log: wasn't fast enough to hit the cancel button cast to VOID* instead of using CopyMemory Modified: trunk/reactos/base/applications/charmap/map.c Modified: trunk/reactos/base/applications/charmap/map.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/charmap/…
============================================================================== --- trunk/reactos/base/applications/charmap/map.c (original) +++ trunk/reactos/base/applications/charmap/map.c Fri Jan 25 20:41:29 2008 @@ -111,15 +111,13 @@ CreateLargeCell(PMAP infoPtr) { RECT rLarge; - POINT p; CopyRect(&rLarge, &infoPtr->pActiveCell->CellExt); - CopyMemory(&p, &rLarge, sizeof(POINT)); MapWindowPoints(infoPtr->hMapWnd, infoPtr->hParent, - &p, + (VOID*)&rLarge, 2); InflateRect(&rLarge, @@ -149,15 +147,13 @@ MoveLargeCell(PMAP infoPtr) { RECT rLarge; - POINT p; CopyRect(&rLarge, &infoPtr->pActiveCell->CellExt); - CopyMemory(&p, &rLarge, sizeof(POINT)); MapWindowPoints(infoPtr->hMapWnd, infoPtr->hParent, - &p, + (VOID*)&rLarge, 2); InflateRect(&rLarge,
16 years, 9 months
1
0
0
0
[cwittich] 32001: fix warnings don't try to cast away const
by cwittich@svn.reactos.org
Author: cwittich Date: Fri Jan 25 20:36:55 2008 New Revision: 32001 URL:
http://svn.reactos.org/svn/reactos?rev=32001&view=rev
Log: fix warnings don't try to cast away const Modified: trunk/reactos/base/applications/charmap/charmap.c trunk/reactos/base/applications/charmap/map.c Modified: trunk/reactos/base/applications/charmap/charmap.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/charmap/…
============================================================================== --- trunk/reactos/base/applications/charmap/charmap.c (original) +++ trunk/reactos/base/applications/charmap/charmap.c Fri Jan 25 20:36:55 2008 @@ -190,6 +190,7 @@ { static HICON hSmIcon; static HICON hBgIcon; + LPWSTR lpAboutText = NULL; switch(Message) { @@ -229,16 +230,13 @@ IDC_FONTCOMBO)); ChangeMapFont(hDlg); - hSysMenu = GetSystemMenu(hDlg, FALSE); if (hSysMenu != NULL) { - LPCWSTR lpAboutText = NULL; - if (LoadStringW(hInstance, IDS_ABOUT, - (LPWSTR)&lpAboutText, + lpAboutText, 0)) { AppendMenuW(hSysMenu, Modified: trunk/reactos/base/applications/charmap/map.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/charmap/…
============================================================================== --- trunk/reactos/base/applications/charmap/map.c (original) +++ trunk/reactos/base/applications/charmap/map.c Fri Jan 25 20:36:55 2008 @@ -111,13 +111,15 @@ CreateLargeCell(PMAP infoPtr) { RECT rLarge; + POINT p; CopyRect(&rLarge, &infoPtr->pActiveCell->CellExt); + CopyMemory(&p, &rLarge, sizeof(POINT)); MapWindowPoints(infoPtr->hMapWnd, infoPtr->hParent, - (LPPOINT)&rLarge, + &p, 2); InflateRect(&rLarge, @@ -147,13 +149,15 @@ MoveLargeCell(PMAP infoPtr) { RECT rLarge; + POINT p; CopyRect(&rLarge, &infoPtr->pActiveCell->CellExt); + CopyMemory(&p, &rLarge, sizeof(POINT)); MapWindowPoints(infoPtr->hMapWnd, infoPtr->hParent, - (LPPOINT)&rLarge, + &p, 2); InflateRect(&rLarge,
16 years, 9 months
1
0
0
0
[gedmurphy] 32000: better class placement
by gedmurphy@svn.reactos.org
Author: gedmurphy Date: Fri Jan 25 20:21:25 2008 New Revision: 32000 URL:
http://svn.reactos.org/svn/reactos?rev=32000&view=rev
Log: better class placement Modified: trunk/tools/RosTE/GUI/ConfigHandler.cs trunk/tools/RosTE/GUI/MainForm.cs trunk/tools/RosTE/GUI/VirtualMachine.cs Modified: trunk/tools/RosTE/GUI/ConfigHandler.cs URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosTE/GUI/ConfigHandler.cs?r…
============================================================================== --- trunk/tools/RosTE/GUI/ConfigHandler.cs (original) +++ trunk/tools/RosTE/GUI/ConfigHandler.cs Fri Jan 25 20:21:25 2008 @@ -7,12 +7,12 @@ namespace RosTEGUI { - public struct VirtMach + public struct MainVmInfo { public int id; public string path; - public VirtMach(int idIn, string pathIn) + public MainVmInfo(int idIn, string pathIn) { id = idIn; path = pathIn; @@ -29,7 +29,7 @@ private int updateSched; private bool appDebug; - List<VirtMach> virtMachs = null; + List<MainVmInfo> virtMachs = null; #region properties public string QemuPath @@ -64,9 +64,9 @@ #endregion #region virtmach element - public string GetExistingImage(int index) - { - foreach (VirtMach vm in virtMachs) + public string GetImagePath(int index) + { + foreach (MainVmInfo vm in virtMachs) { if (vm.id == index) return vm.path; @@ -83,14 +83,14 @@ { if (virtMachs == null) { - virtMachs = new List<VirtMach>(); + virtMachs = new List<MainVmInfo>(); } try { foreach (DataRow dr in dataSet.Tables["VirtMach"].Rows) { - virtMachs.Add(new VirtMach((int)dr["VMConfigID"], (string)dr["Path"])); + virtMachs.Add(new MainVmInfo((int)dr["VMConfigID"], (string)dr["Path"])); } bRet = true; @@ -113,7 +113,7 @@ DataTable virtMachTable = dataSet.Tables["VirtMach"]; virtMachTable.Clear(); - foreach (VirtMach vm in virtMachs) + foreach (MainVmInfo vm in virtMachs) { DataRow dr = virtMachTable.NewRow(); dr["VMConfigID"] = vm.id; @@ -134,7 +134,7 @@ if (dataSet != null && virtMachs != null) { int id = virtMachs.Count; - virtMachs.Add(new VirtMach(id, pathIn)); + virtMachs.Add(new MainVmInfo(id, pathIn)); } return virtMachs.Count; @@ -144,7 +144,7 @@ { bool bRet = false; - foreach (VirtMach vm in virtMachs) + foreach (MainVmInfo vm in virtMachs) { if (vm.id == index) { @@ -341,4 +341,215 @@ } #endregion } + + + public struct VirtMachInfo + { + public int virtMachID; + public string name; + public string machType; + public string defDir; + public int memSize; + public bool setClockToHost; + public bool cdRomEnable; + public bool cdRomUsePhys; + public string cdRomPhysDrv; + public bool cdRomUseIso; + public string cdRomIsoImg; + public bool floppyEnable; + public bool floppyUsePhys; + public string floppyPhysDrv; + public bool floppyUseImg; + public string floppyIsoImg; + } + + public class VirtMachConfig + { + private DataSet dataSet = null; + private List<VirtMachInfo> virtMachInfo = null; + + public List<VirtMachInfo> VMInfo + { + get { return virtMachInfo; } + } + + public bool LoadVmSettings() + { + bool bRet = false; + + if (dataSet != null) + { + if (virtMachInfo == null) + { + virtMachInfo = new List<VirtMachInfo>(); + } + + try + { + foreach (DataRow vmRow in dataSet.Tables["VMConfig"].Rows) + { + VirtMachInfo vmi = new VirtMachInfo(); + vmi.virtMachID = (int)vmRow["VirtMachID"]; + vmi.name = (string)vmRow["Name"]; + vmi.machType = (string)vmRow["MachType"]; + vmi.defDir = (string)vmRow["DefDir"]; + vmi.memSize = (int)vmRow["MemSize"]; + vmi.setClockToHost = (bool)vmRow["SetClockToHost"]; + vmi.cdRomEnable = (bool)vmRow["CdRomEnable"]; + vmi.cdRomUsePhys = (bool)vmRow["CdRomUsePhys"]; + vmi.cdRomPhysDrv = (string)vmRow["CdRomPhysDrv"]; + vmi.cdRomUseIso = (bool)vmRow["CdRomUseIso"]; + vmi.cdRomIsoImg = (string)vmRow["CdRomIsoImg"]; + vmi.floppyEnable = (bool)vmRow["FloppyEnable"]; + vmi.floppyUsePhys = (bool)vmRow["FloppyUsePhys"]; + vmi.floppyPhysDrv = (string)vmRow["FloppyPhysDrv"]; + vmi.floppyUseImg = (bool)vmRow["FloppyUseImg"]; + vmi.floppyIsoImg = (string)vmRow["FloppyIsoImg"]; + + virtMachInfo.Add(vmi); + } + + bRet = true; + } + catch (Exception ex) + { + Debug.LogMessage("error loading VM config", ex.Message, ex.StackTrace, true); + } + } + + return bRet; + } + + public void SaveVmSettings() + { + if (dataSet != null) + { + dataSet.Tables["VirtMach"].Rows.Clear(); + + try + { + foreach (VirtMachInfo vmi in virtMachInfo) + { + DataRow vmRow = dataSet.Tables["VirtMach"].NewRow(); + + vmRow["VirtMachID"] = vmi.virtMachID; + vmRow["Name"] = vmi.name; + vmRow["MachType"] = vmi.machType; + vmRow["DefDir"] = vmi.defDir; + vmRow["MemSize"] = vmi.memSize; + vmRow["SetClockToHost"] = vmi.setClockToHost; + vmRow["CdRomEnable"] = vmi.cdRomEnable; + vmRow["CdRomUsePhys"] = vmi.cdRomUsePhys; + vmRow["CdRomPhysDrv"] = vmi.cdRomPhysDrv; + vmRow["CdRomUseIso"] = vmi.cdRomUseIso; + vmRow["CdRomIsoImg"] = vmi.cdRomIsoImg; + vmRow["FloppyEnable"] = vmi.floppyEnable; + vmRow["FloppyUsePhys"] = vmi.floppyUsePhys; + vmRow["FloppyPhysDrv"] = vmi.floppyPhysDrv; + vmRow["FloppyUseImg"] = vmi.floppyUseImg; + vmRow["FloppyIsoImg"] = vmi.floppyIsoImg; + } + } + catch (Exception ex) + { + Debug.LogMessage("error loading VM config", ex.Message, ex.StackTrace, true); + } + } + } + + + public bool LoadVMConfig(string path) + { + XmlTextReader xtr = null; + string fileName = path + "\\Config.xml"; + bool ret = false; + + if (LoadVirtMachSchema()) + { + if (File.Exists(fileName)) + { + try + { + FileStream fs = new FileStream(fileName, FileMode.Open, FileAccess.Read); + xtr = new XmlTextReader(fs); + dataSet.ReadXml(xtr, System.Data.XmlReadMode.ReadSchema); + xtr.Close(); + ret = true; + } + catch (Exception ex) + { + Debug.LogMessage("error loading VM config", ex.Message, ex.StackTrace, true); + } + finally + { + if (xtr != null) + xtr.Close(); + } + } + } + + return ret; + } + + public void SaveVMConfig(string path) + { + XmlTextWriter xtw = null; + string fileName = path + "\\Config.xml"; + + if (!Directory.Exists(fileName)) + Directory.CreateDirectory(fileName); + + if (dataSet == null) + { + if (!LoadVirtMachSchema()) + return; + } + + try + { + FileStream fs = new FileStream(fileName, FileMode.Create, FileAccess.Write); + xtw = new XmlTextWriter(fs, System.Text.Encoding.Unicode); + dataSet.WriteXml(xtw, System.Data.XmlWriteMode.WriteSchema); + } + catch (Exception ex) + { + Debug.LogMessage("error saving VM config", ex.Message, ex.StackTrace, true); + } + finally + { + if (xtw != null) + xtw.Close(); + } + } + + private bool LoadVirtMachSchema() + { + XmlTextReader xtr = null; + string filename = "VMConfig.xsd"; + bool ret = false; + + dataSet = new DataSet(); + if (File.Exists(filename)) + { + try + { + FileStream fs = new FileStream(filename, FileMode.Open, FileAccess.Read); + xtr = new XmlTextReader(fs); + dataSet.ReadXmlSchema(xtr); + ret = true; + } + catch (Exception ex) + { + Debug.LogMessage("error loading VM config schema", ex.Message, ex.StackTrace, true); + } + finally + { + if (xtr != null) + xtr.Close(); + } + } + + return ret; + } + } } Modified: trunk/tools/RosTE/GUI/MainForm.cs URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosTE/GUI/MainForm.cs?rev=32…
============================================================================== --- trunk/tools/RosTE/GUI/MainForm.cs (original) +++ trunk/tools/RosTE/GUI/MainForm.cs Fri Jan 25 20:21:25 2008 @@ -7,7 +7,7 @@ using System.IO; using System.Xml.Serialization; using Microsoft.Win32; - +using System.Collections.Generic; namespace RosTEGUI { @@ -39,15 +39,21 @@ int num = mainConf.GetNumberOfVms(); for (int i = 0; i < num; i++) { - string image = mainConf.GetExistingImage(i); - VirtualMachine vm = new VirtualMachine(); - if (vm.LoadVMConfig(image)) - { - vm.LoadVmSettings(); - - ListViewItem lvi = VirtMachListView.Items.Add(vm.ToString(), 0); - lvi.SubItems.Add(vm.MemSize.ToString() + " MB"); - lvi.Tag = vm; + string path = mainConf.GetImagePath(i); + VirtMachConfig vmConfig = new VirtMachConfig(); + if (vmConfig.LoadVMConfig(path)) + { + if (vmConfig.LoadVmSettings()) + { + foreach (VirtMachInfo vmInfo in vmConfig.VMInfo) + { + VirtualMachine vm = new VirtualMachine(); + + ListViewItem lvi = VirtMachListView.Items.Add(vmConfig.ToString(), 0); + lvi.SubItems.Add(vm.MemSize.ToString() + " MB"); + lvi.Tag = vm; + } + } } } } @@ -178,8 +184,8 @@ { foreach(ListViewItem lvi in VirtMachListView.Items) { - VirtualMachine vm = (VirtualMachine)lvi.Tag; - vm.SaveVMConfig(); + VirtMachConfig vm = (VirtMachConfig)lvi.Tag; + vm.SaveVMConfig("err"); } mainConf.SaveSettings(); Modified: trunk/tools/RosTE/GUI/VirtualMachine.cs URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosTE/GUI/VirtualMachine.cs?…
============================================================================== --- trunk/tools/RosTE/GUI/VirtualMachine.cs (original) +++ trunk/tools/RosTE/GUI/VirtualMachine.cs Fri Jan 25 20:21:25 2008 @@ -9,27 +9,6 @@ namespace RosTEGUI { - public struct VirtMachInfo - { - public int virtMachID; - public string name; - public string machType; - public string defDir; - public int memSize; - public bool setClockToHost; - public bool cdRomEnable; - public bool cdRomUsePhys; - public string cdRomPhysDrv; - public bool cdRomUseIso; - public string cdRomIsoImg; - public bool floppyEnable; - public bool floppyUsePhys; - public string floppyPhysDrv; - public bool floppyUseImg; - public string floppyIsoImg; - } - - public class VMHardDrive { private DataRow hdDataRow; @@ -133,15 +112,9 @@ public class VirtualMachine { private DataRow vmDataRow; - private List<VirtMachInfo> virtMachInfo = null; + private ArrayList hardDrives; private ArrayList netCards; - private DataSet dataSet = null; - - public DataSet DataSet - { - get { return dataSet; } - } #region Virtual machine properties @@ -335,54 +308,7 @@ string existImg, int memSize) { - DataRow netDataRow; bool ret = false; - - try - { - DataTable vmdt = dataSet.Tables["VMConfig"]; - vmDataRow = vmdt.NewRow(); - vmDataRow["VirtMachID"] = vmdt.Rows.Count + 1; - vmDataRow["Name"] = name; - vmDataRow["MachType"] = "pc"; - vmDataRow["DefDir"] = dir; - vmDataRow["MemSize"] = memSize; - vmDataRow["SetClockToHost"] = true; - vmDataRow["CdRomEnable"] = true; - vmDataRow["CdRomUsePhys"] = true; - vmDataRow["CdRomPhysDrv"] = string.Empty; - vmDataRow["CdRomUseIso"] = false; - vmDataRow["CdRomIsoImg"] = string.Empty; - vmDataRow["FloppyEnable"] = true; - vmDataRow["FloppyUsePhys"] = true; - vmDataRow["FloppyPhysDrv"] = string.Empty; - vmDataRow["FloppyUseImg"] = false; - vmDataRow["FloppyIsoImg"] = string.Empty; - vmdt.Rows.Add(vmDataRow); - - VMHardDrive vmhd = new VMHardDrive(); - vmhd.CreateHardDrive("Main Drive", "hda", dir, 768, true); - hardDrives.Add(vmhd); - - DataTable netdt = dataSet.Tables["NetCards"]; - netDataRow = netdt.NewRow(); - netDataRow["CardID"] = netdt.Rows.Count + 1; - netDataRow["VirtMachID"] = vmDataRow["VirtMachID"]; - netDataRow["Option"] = "user"; - netDataRow["Vlan"] = 0; - netDataRow["MacAddr"] = string.Empty; - netDataRow["Model"] = string.Empty; - netDataRow["Hostname"] = string.Empty; - netdt.Rows.Add(netDataRow); - netCards.Add(netDataRow); - - ret = true; - } - catch (Exception e) - { - string message = "Failed to populate database"; - Debug.LogMessage(message, e.Message, e.StackTrace, true); - } return ret; } @@ -476,185 +402,5 @@ { return hardDrives; } - - - public bool LoadVmSettings() - { - bool bRet = false; - - if (dataSet != null) - { - if (virtMachInfo == null) - { - virtMachInfo = new List<VirtMachInfo>(); - } - - try - { - foreach (DataRow vmRow in dataSet.Tables["VMConfig"].Rows) - { - VirtMachInfo vmi = new VirtMachInfo(); - vmi.virtMachID = (int)vmRow["VirtMachID"]; - vmi.name = (string)vmRow["Name"]; - vmi.machType = (string)vmRow["MachType"]; - vmi.defDir = (string)vmRow["DefDir"]; - vmi.memSize = (int)vmRow["MemSize"]; - vmi.setClockToHost = (bool)vmRow["SetClockToHost"]; - vmi.cdRomEnable = (bool)vmRow["CdRomEnable"]; - vmi.cdRomUsePhys = (bool)vmRow["CdRomUsePhys"]; - vmi.cdRomPhysDrv = (string)vmRow["CdRomPhysDrv"]; - vmi.cdRomUseIso = (bool)vmRow["CdRomUseIso"]; - vmi.cdRomIsoImg = (string)vmRow["CdRomIsoImg"]; - vmi.floppyEnable = (bool)vmRow["FloppyEnable"]; - vmi.floppyUsePhys = (bool)vmRow["FloppyUsePhys"]; - vmi.floppyPhysDrv = (string)vmRow["FloppyPhysDrv"]; - vmi.floppyUseImg = (bool)vmRow["FloppyUseImg"]; - vmi.floppyIsoImg = (string)vmRow["FloppyIsoImg"]; - - virtMachInfo.Add(vmi); - } - - bRet = true; - } - catch (Exception ex) - { - Debug.LogMessage("error loading VM config", ex.Message, ex.StackTrace, true); - } - } - - return bRet; - } - - public void SaveVmSettings() - { - if (dataSet != null) - { - dataSet.Tables["VirtMach"].Rows.Clear(); - - try - { - foreach (VirtMachInfo vmi in virtMachInfo) - { - DataRow vmRow = dataSet.Tables["VirtMach"].NewRow(); - - vmRow["VirtMachID"] = vmi.virtMachID; - vmRow["Name"] = vmi.name; - vmRow["MachType"] = vmi.machType; - vmRow["DefDir"] = vmi.defDir; - vmRow["MemSize"] = vmi.memSize; - vmRow["SetClockToHost"] = vmi.setClockToHost; - vmRow["CdRomEnable"] = vmi.cdRomEnable; - vmRow["CdRomUsePhys"] = vmi.cdRomUsePhys; - vmRow["CdRomPhysDrv"] = vmi.cdRomPhysDrv; - vmRow["CdRomUseIso"] = vmi.cdRomUseIso; - vmRow["CdRomIsoImg"] = vmi.cdRomIsoImg; - vmRow["FloppyEnable"] = vmi.floppyEnable; - vmRow["FloppyUsePhys"] = vmi.floppyUsePhys; - vmRow["FloppyPhysDrv"] = vmi.floppyPhysDrv; - vmRow["FloppyUseImg"] = vmi.floppyUseImg; - vmRow["FloppyIsoImg"] = vmi.floppyIsoImg; - } - } - catch (Exception ex) - { - Debug.LogMessage("error loading VM config", ex.Message, ex.StackTrace, true); - } - } - } - - - public bool LoadVMConfig(string path) - { - XmlTextReader xtr = null; - string fileName = path + "\\Config.xml"; - bool ret = false; - - if (LoadVirtMachSchema()) - { - if (File.Exists(fileName)) - { - try - { - FileStream fs = new FileStream(fileName, FileMode.Open, FileAccess.Read); - xtr = new XmlTextReader(fs); - dataSet.ReadXml(xtr, System.Data.XmlReadMode.ReadSchema); - xtr.Close(); - ret = true; - } - catch (Exception ex) - { - Debug.LogMessage("error loading VM config", ex.Message, ex.StackTrace, true); - } - finally - { - if (xtr != null) - xtr.Close(); - } - } - } - - return ret; - } - - public void SaveVMConfig() - { - XmlTextWriter xtw = null; - string fileName = DefDir + "\\Config.xml"; - - if (!Directory.Exists(DefDir)) - Directory.CreateDirectory(DefDir); - - if (dataSet == null) - { - if (!LoadVirtMachSchema()) - return; - } - - try - { - FileStream fs = new FileStream(fileName, FileMode.Create, FileAccess.Write); - xtw = new XmlTextWriter(fs, System.Text.Encoding.Unicode); - dataSet.WriteXml(xtw, System.Data.XmlWriteMode.WriteSchema); - } - catch (Exception ex) - { - Debug.LogMessage("error saving VM config", ex.Message, ex.StackTrace, true); - } - finally - { - if (xtw != null) - xtw.Close(); - } - } - - private bool LoadVirtMachSchema() - { - XmlTextReader xtr = null; - string filename = "VMConfig.xsd"; - bool ret = false; - - dataSet = new DataSet(); - if (File.Exists(filename)) - { - try - { - FileStream fs = new FileStream(filename, FileMode.Open, FileAccess.Read); - xtr = new XmlTextReader(fs); - dataSet.ReadXmlSchema(xtr); - ret = true; - } - catch (Exception ex) - { - Debug.LogMessage("error loading VM config schema", ex.Message, ex.StackTrace, true); - } - finally - { - if (xtr != null) - xtr.Close(); - } - } - - return ret; - } } }
16 years, 9 months
1
0
0
0
[fireball] 31999: - Make identifiers in configuration trees ASCII-strings, as they are in real NT. - NB: Don't forget to update the bootloader in your installation.
by fireball@svn.reactos.org
Author: fireball Date: Fri Jan 25 19:35:34 2008 New Revision: 31999 URL:
http://svn.reactos.org/svn/reactos?rev=31999&view=rev
Log: - Make identifiers in configuration trees ASCII-strings, as they are in real NT. - NB: Don't forget to update the bootloader in your installation. Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/hardware.c trunk/reactos/boot/freeldr/freeldr/arch/i386/hwacpi.c trunk/reactos/boot/freeldr/freeldr/arch/i386/hwapm.c trunk/reactos/boot/freeldr/freeldr/arch/i386/hwpci.c trunk/reactos/boot/freeldr/freeldr/arch/i386/xboxhw.c trunk/reactos/boot/freeldr/freeldr/include/arch/i386/hardware.h trunk/reactos/boot/freeldr/freeldr/include/arch/powerpc/hardware.h trunk/reactos/boot/freeldr/freeldr/reactos/archwsup.c trunk/reactos/ntoskrnl/config/cmconfig.c trunk/reactos/ntoskrnl/config/cmdata.c trunk/reactos/ntoskrnl/include/internal/cm.h Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/hardware.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/i386/hardware.c (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/i386/hardware.c Fri Jan 25 19:35:34 2008 @@ -79,7 +79,7 @@ /* Timeout in ms for sending to keyboard controller. */ #define CONTROLLER_TIMEOUT 250 -static WCHAR Hex[] = L"0123456789ABCDEF"; +static CHAR Hex[] = "0123456789ABCDEF"; static unsigned int delay_count = 1; extern ULONG reactos_disk_count; @@ -252,7 +252,7 @@ 0xFFFFFFFF); /* Set the identifier */ - FldrSetIdentifier(BusKey, L"PNP BIOS"); + FldrSetIdentifier(BusKey, "PNP BIOS"); /* Set 'Configuration Data' value */ Size = sizeof(CM_PARTIAL_RESOURCE_LIST) + (NodeSize * NodeCount); @@ -405,7 +405,7 @@ ULONG i; ULONG Checksum; ULONG Signature; - WCHAR Identifier[20]; + CHAR Identifier[20]; CHAR ArcName[256]; /* Read the MBR */ @@ -448,7 +448,7 @@ Identifier[5] = Hex[(Checksum >> 8) & 0x0F]; Identifier[6] = Hex[(Checksum >> 4) & 0x0F]; Identifier[7] = Hex[Checksum & 0x0F]; - Identifier[8] = L'-'; + Identifier[8] = '-'; Identifier[9] = Hex[(Signature >> 28) & 0x0F]; Identifier[10] = Hex[(Signature >> 24) & 0x0F]; Identifier[11] = Hex[(Signature >> 20) & 0x0F]; @@ -457,10 +457,10 @@ Identifier[14] = Hex[(Signature >> 8) & 0x0F]; Identifier[15] = Hex[(Signature >> 4) & 0x0F]; Identifier[16] = Hex[Signature & 0x0F]; - Identifier[17] = L'-'; - Identifier[18] = L'A'; + Identifier[17] = '-'; + Identifier[18] = 'A'; Identifier[19] = 0; - DbgPrint((DPRINT_HWDETECT, "Identifier: %S\n", Identifier)); + DbgPrint((DPRINT_HWDETECT, "Identifier: %s\n", Identifier)); /* Set identifier */ FldrSetIdentifier(DiskKey, Identifier); @@ -511,7 +511,7 @@ PCM_PARTIAL_RESOURCE_LIST PartialResourceList; PCM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptor; PCM_FLOPPY_DEVICE_DATA FloppyData; - WCHAR Identifier[20]; + CHAR Identifier[20]; PCONFIGURATION_COMPONENT_DATA PeripheralKey; ULONG Size; ULONG FloppyNumber; @@ -579,7 +579,7 @@ MmHeapFree(PartialResourceList); /* Set 'Identifier' value */ - swprintf(Identifier, L"FLOPPY%u", FloppyNumber + 1); + sprintf(Identifier, "FLOPPY%u", FloppyNumber + 1); FldrSetIdentifier(PeripheralKey, Identifier); } } @@ -956,7 +956,7 @@ { CM_PARTIAL_RESOURCE_LIST PartialResourceList; char Buffer[256]; - WCHAR Identifier[256]; + CHAR Identifier[256]; PCONFIGURATION_COMPONENT_DATA PeripheralKey; ULONG MouseType; ULONG Length; @@ -1063,28 +1063,28 @@ } DbgPrint((DPRINT_HWDETECT, - "Identifier string: %S\n", + "Identifier string: %s\n", Identifier)); } - if (Length == 0 || wcslen(Identifier) < 11) + if (Length == 0 || strlen(Identifier) < 11) { switch (MouseType) { case MOUSE_TYPE_LOGITECH: - wcscpy (Identifier, - L"LOGITECH SERIAL MOUSE"); + strcpy (Identifier, + "LOGITECH SERIAL MOUSE"); break; case MOUSE_TYPE_WHEELZ: - wcscpy (Identifier, - L"MICROSOFT SERIAL MOUSE WITH WHEEL"); + strcpy (Identifier, + "MICROSOFT SERIAL MOUSE WITH WHEEL"); break; case MOUSE_TYPE_MICROSOFT: default: - wcscpy (Identifier, - L"MICROSOFT SERIAL MOUSE"); + strcpy (Identifier, + "MICROSOFT SERIAL MOUSE"); break; } } @@ -1130,7 +1130,7 @@ PCM_SERIAL_DEVICE_DATA SerialDeviceData; ULONG Irq[4] = {4, 3, 4, 3}; ULONG Base; - WCHAR Buffer[80]; + CHAR Buffer[80]; PUSHORT BasePtr; ULONG ControllerNumber = 0; PCONFIGURATION_COMPONENT_DATA ControllerKey; @@ -1218,7 +1218,7 @@ MmHeapFree(PartialResourceList); /* Set 'Identifier' value */ - swprintf(Buffer, L"COM%u", i + 1); + sprintf(Buffer, "COM%u", i + 1); FldrSetIdentifier(ControllerKey, Buffer); DbgPrint((DPRINT_HWDETECT, "Created value: Identifier %s\n", @@ -1241,7 +1241,7 @@ PCM_PARTIAL_RESOURCE_LIST PartialResourceList; PCM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptor; ULONG Irq[3] = {7, 5, (ULONG)-1}; - WCHAR Buffer[80]; + CHAR Buffer[80]; PCONFIGURATION_COMPONENT_DATA ControllerKey; PUSHORT BasePtr; ULONG Base; @@ -1323,7 +1323,7 @@ MmHeapFree(PartialResourceList); /* Set 'Identifier' value */ - swprintf(Buffer, L"PARALLEL%u", i + 1); + sprintf(Buffer, "PARALLEL%u", i + 1); FldrSetIdentifier(ControllerKey, Buffer); DbgPrint((DPRINT_HWDETECT, "Created value: Identifier %s\n", @@ -1468,7 +1468,7 @@ MmHeapFree(PartialResourceList); /* Set 'Identifier' value */ - FldrSetIdentifier(PeripheralKey, L"PCAT_ENHANCED"); + FldrSetIdentifier(PeripheralKey, "PCAT_ENHANCED"); } } @@ -1735,7 +1735,7 @@ sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR)); /* Set 'Identifier' value */ - FldrSetIdentifier(PeripheralKey, L"MICROSOFT PS2 MOUSE"); + FldrSetIdentifier(PeripheralKey, "MICROSOFT PS2 MOUSE"); } } } @@ -1744,7 +1744,7 @@ static VOID DetectDisplayController(PCONFIGURATION_COMPONENT_DATA BusKey) { - WCHAR Buffer[80]; + CHAR Buffer[80]; PCONFIGURATION_COMPONENT_DATA ControllerKey; USHORT VesaVersion; @@ -1780,13 +1780,13 @@ if (VesaVersion >= 0x0200) { - wcscpy(Buffer, - L"VBE Display"); + strcpy(Buffer, + "VBE Display"); } else { - wcscpy(Buffer, - L"VGA Display"); + strcpy(Buffer, + "VGA Display"); } /* Set 'Identifier' value */ @@ -1821,7 +1821,7 @@ (*BusNumber)++; /* Set 'Identifier' value */ - FldrSetIdentifier(BusKey, L"ISA"); + FldrSetIdentifier(BusKey, "ISA"); /* Set 'Configuration Data' value */ Size = sizeof(CM_PARTIAL_RESOURCE_LIST) - Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/hwacpi.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/i386/hwacpi.c (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/i386/hwacpi.c Fri Jan 25 19:35:34 2008 @@ -86,7 +86,7 @@ (*BusNumber)++; /* Set 'Identifier' value */ - FldrSetIdentifier(BiosKey, L"ACPI BIOS"); + FldrSetIdentifier(BiosKey, "ACPI BIOS"); } /* FIXME: Add congiguration data */ Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/hwapm.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/i386/hwapm.c (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/i386/hwapm.c Fri Jan 25 19:35:34 2008 @@ -89,7 +89,7 @@ (*BusNumber)++; /* Set 'Identifier' value */ - FldrSetIdentifier(BiosKey, L"APM"); + FldrSetIdentifier(BiosKey, "APM"); } /* FIXME: Add configuration data */ Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/hwpci.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/i386/hwpci.c (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/i386/hwpci.c Fri Jan 25 19:35:34 2008 @@ -168,7 +168,7 @@ 0xFFFFFFFF); /* Set 'Identifier' value */ - FldrSetIdentifier(TableKey, L"PCI Real-mode IRQ Routing Table"); + FldrSetIdentifier(TableKey, "PCI Real-mode IRQ Routing Table"); /* Set 'Configuration Data' value */ Size = FIELD_OFFSET(CM_PARTIAL_RESOURCE_LIST, PartialDescriptors) + @@ -218,7 +218,7 @@ ULONG Size; PCONFIGURATION_COMPONENT_DATA BusKey; ULONG i; - WCHAR szPci[] = L"PCI"; + CHAR szPci[] = "PCI"; /* Report the PCI BIOS */ if (FindPciBios(&BusData)) @@ -241,7 +241,7 @@ (*BusNumber)++; /* Set 'Identifier' value */ - FldrSetIdentifier(BiosKey, L"PCI BIOS"); + FldrSetIdentifier(BiosKey, "PCI BIOS"); /* Set 'Configuration Data' value */ Size = FIELD_OFFSET(CM_PARTIAL_RESOURCE_LIST, Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/xboxhw.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/i386/xboxhw.c (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/i386/xboxhw.c Fri Jan 25 19:35:34 2008 @@ -22,7 +22,7 @@ #define NDEBUG #include <debug.h> -static WCHAR Hex[] = L"0123456789ABCDEF"; +static CHAR Hex[] = "0123456789ABCDEF"; //static unsigned int delay_count = 1; extern ULONG reactos_disk_count; @@ -102,7 +102,7 @@ ULONG i; ULONG Checksum; ULONG Signature; - WCHAR Identifier[20]; + CHAR Identifier[20]; CHAR ArcName[256]; /* Read the MBR */ @@ -145,7 +145,7 @@ Identifier[5] = Hex[(Checksum >> 8) & 0x0F]; Identifier[6] = Hex[(Checksum >> 4) & 0x0F]; Identifier[7] = Hex[Checksum & 0x0F]; - Identifier[8] = L'-'; + Identifier[8] = '-'; Identifier[9] = Hex[(Signature >> 28) & 0x0F]; Identifier[10] = Hex[(Signature >> 24) & 0x0F]; Identifier[11] = Hex[(Signature >> 20) & 0x0F]; @@ -154,10 +154,10 @@ Identifier[14] = Hex[(Signature >> 8) & 0x0F]; Identifier[15] = Hex[(Signature >> 4) & 0x0F]; Identifier[16] = Hex[Signature & 0x0F]; - Identifier[17] = L'-'; - Identifier[18] = L'A'; + Identifier[17] = '-'; + Identifier[18] = 'A'; Identifier[19] = 0; - DbgPrint((DPRINT_HWDETECT, "Identifier: %S\n", Identifier)); + DbgPrint((DPRINT_HWDETECT, "Identifier: %s\n", Identifier)); /* Set identifier */ FldrSetIdentifier(DiskKey, Identifier); @@ -318,7 +318,7 @@ (*BusNumber)++; /* Set 'Identifier' value */ - FldrSetIdentifier(BusKey, L"ISA"); + FldrSetIdentifier(BusKey, "ISA"); /* Set 'Configuration Data' value */ Size = sizeof(CM_PARTIAL_RESOURCE_LIST) - Modified: trunk/reactos/boot/freeldr/freeldr/include/arch/i386/hardware.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/include/arch/i386/hardware.h (original) +++ trunk/reactos/boot/freeldr/freeldr/include/arch/i386/hardware.h Fri Jan 25 19:35:34 2008 @@ -51,7 +51,7 @@ NTAPI FldrSetIdentifier( IN PCONFIGURATION_COMPONENT_DATA ComponentKey, - IN PWCHAR Identifier + IN PCHAR Identifier ); VOID Modified: trunk/reactos/boot/freeldr/freeldr/include/arch/powerpc/hardware.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/include/arch/powerpc/hardware.h (original) +++ trunk/reactos/boot/freeldr/freeldr/include/arch/powerpc/hardware.h Fri Jan 25 19:35:34 2008 @@ -50,7 +50,7 @@ NTAPI FldrSetIdentifier( IN PCONFIGURATION_COMPONENT_DATA ComponentKey, - IN PWCHAR Identifier + IN PCHAR Identifier ); VOID Modified: trunk/reactos/boot/freeldr/freeldr/reactos/archwsup.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/react…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/reactos/archwsup.c (original) +++ trunk/reactos/boot/freeldr/freeldr/reactos/archwsup.c Fri Jan 25 19:35:34 2008 @@ -71,21 +71,20 @@ VOID NTAPI FldrSetIdentifier(IN PCONFIGURATION_COMPONENT_DATA ComponentData, - IN PWCHAR IdentifierString) + IN PCHAR IdentifierString) { ULONG IdentifierLength; PCONFIGURATION_COMPONENT Component = &ComponentData->ComponentEntry; PCHAR Identifier; /* Allocate memory for the identifier */ - /* WARNING: This should be ASCII data */ - IdentifierLength = (wcslen(IdentifierString) + 1) * sizeof(WCHAR); + IdentifierLength = strlen(IdentifierString) + 1; Identifier = FldrpHwHeapAlloc(IdentifierLength); if (!Identifier) return; - + /* Copy the identifier */ RtlCopyMemory(Identifier, IdentifierString, IdentifierLength); - + /* Set component information */ Component->IdentifierLength = IdentifierLength; Component->Identifier = Identifier; Modified: trunk/reactos/ntoskrnl/config/cmconfig.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/cmconfig.c…
============================================================================== --- trunk/reactos/ntoskrnl/config/cmconfig.c (original) +++ trunk/reactos/ntoskrnl/config/cmconfig.c Fri Jan 25 19:35:34 2008 @@ -115,7 +115,6 @@ Status = RtlAnsiStringToUnicodeString(&ValueData, &TempString, TRUE); - RtlCreateUnicodeString(&ValueData, (PWCHAR)Component->Identifier); if (NT_SUCCESS(Status)) { /* Save the identifier in the registry */ @@ -244,8 +243,8 @@ for (i = 0; CmpMultifunctionTypes[i].Identifier; i++) { /* Check for a name match */ - if (!_wcsicmp(CmpMultifunctionTypes[i].Identifier, - (PWCHAR)Component->Identifier)) + if (!_stricmp(CmpMultifunctionTypes[i].Identifier, + Component->Identifier)) { /* Match found */ break; Modified: trunk/reactos/ntoskrnl/config/cmdata.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/cmdata.c?r…
============================================================================== --- trunk/reactos/ntoskrnl/config/cmdata.c (original) +++ trunk/reactos/ntoskrnl/config/cmdata.c Fri Jan 25 19:35:34 2008 @@ -124,14 +124,14 @@ CMP_MF_TYPE CmpMultifunctionTypes[] = { - {L"ISA", Isa, 0}, - {L"MCA", MicroChannel, 0}, - {L"PCI", PCIBus, 0}, - {L"VME", VMEBus, 0}, - {L"PCMCIA", PCMCIABus, 0}, - {L"CBUS", CBus, 0}, - {L"MPIPI", MPIBus, 0}, - {L"MPSA", MPSABus, 0}, + {"ISA", Isa, 0}, + {"MCA", MicroChannel, 0}, + {"PCI", PCIBus, 0}, + {"VME", VMEBus, 0}, + {"PCMCIA", PCMCIABus, 0}, + {"CBUS", CBus, 0}, + {"MPIPI", MPIBus, 0}, + {"MPSA", MPSABus, 0}, {NULL, Internal, 0} }; Modified: trunk/reactos/ntoskrnl/include/internal/cm.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/cm.h (original) +++ trunk/reactos/ntoskrnl/include/internal/cm.h Fri Jan 25 19:35:34 2008 @@ -472,9 +472,9 @@ // typedef struct _CMP_MF_TYPE { - PWCHAR Identifier; + PCHAR Identifier; USHORT InterfaceType; - USHORT Count; + USHORT Count; } CMP_MF_TYPE, *PCMP_MF_TYPE; //
16 years, 9 months
1
0
0
0
[gedmurphy] 31998: continue rewriting stuff...
by gedmurphy@svn.reactos.org
Author: gedmurphy Date: Fri Jan 25 18:28:38 2008 New Revision: 31998 URL:
http://svn.reactos.org/svn/reactos?rev=31998&view=rev
Log: continue rewriting stuff... Modified: trunk/tools/RosTE/GUI/ConfigHandler.cs trunk/tools/RosTE/GUI/MainForm.cs trunk/tools/RosTE/GUI/VirtualMachine.cs Modified: trunk/tools/RosTE/GUI/ConfigHandler.cs URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosTE/GUI/ConfigHandler.cs?r…
============================================================================== --- trunk/tools/RosTE/GUI/ConfigHandler.cs (original) +++ trunk/tools/RosTE/GUI/ConfigHandler.cs Fri Jan 25 18:28:38 2008 @@ -21,7 +21,6 @@ public class MainConfig { - private VMConfig vmConfig = null; private DataSet dataSet = null; private string qemuPath; @@ -134,14 +133,14 @@ { if (dataSet != null && virtMachs != null) { - int id = virtMachs.Count + 1; + int id = virtMachs.Count; virtMachs.Add(new VirtMach(id, pathIn)); } return virtMachs.Count; } - public void DeleteVirtMach(int index) + public bool DeleteVirtMach(int index) { bool bRet = false; @@ -153,6 +152,8 @@ bRet = true; } } + + return bRet; } public int GetNumberOfVms() @@ -311,6 +312,7 @@ #region private methods private bool LoadMainSchema() { + XmlTextReader xtr = null; string filename = "MainConfig.xsd"; bool ret = false; @@ -320,14 +322,18 @@ try { FileStream fs = new FileStream(filename, FileMode.Open, FileAccess.Read); - XmlTextReader xtr = new XmlTextReader(fs); + xtr = new XmlTextReader(fs); dataSet.ReadXmlSchema(xtr); - xtr.Close(); ret = true; } catch (Exception ex) { Debug.LogMessage("error loading main config schema", ex.Message, ex.StackTrace, true); + } + finally + { + if (xtr != null) + xtr.Close(); } } @@ -335,50 +341,4 @@ } #endregion } - - - - public class VMConfig - { - private DataSet data = null; - - public DataSet DataSet - { - get { return data; } - } - - /// <summary> - /// Load the schema for the virtual machine configuration file - /// </summary> - /// <returns>True on success, false on failure</returns> - public bool LoadVirtMachData() - { - XmlTextReader xtr = null; - string filename = "VMConfig.xsd"; - bool ret = false; - - data = new DataSet(); - if (File.Exists(filename)) - { - try - { - FileStream fs = new FileStream(filename, FileMode.Open, FileAccess.Read); - xtr = new XmlTextReader(fs); - data.ReadXmlSchema(xtr); - ret = true; - } - catch (Exception ex) - { - Debug.LogMessage("error loading VM config schema", ex.Message, ex.StackTrace, true); - } - finally - { - if (xtr != null) - xtr.Close(); - } - } - - return ret; - } - } } Modified: trunk/tools/RosTE/GUI/MainForm.cs URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosTE/GUI/MainForm.cs?rev=31…
============================================================================== --- trunk/tools/RosTE/GUI/MainForm.cs (original) +++ trunk/tools/RosTE/GUI/MainForm.cs Fri Jan 25 18:28:38 2008 @@ -14,7 +14,6 @@ public partial class MainForm : Form { private MainConfig mainConf; - private VMConfig mainData; public MainForm() { @@ -44,6 +43,8 @@ VirtualMachine vm = new VirtualMachine(); if (vm.LoadVMConfig(image)) { + vm.LoadVmSettings(); + ListViewItem lvi = VirtMachListView.Items.Add(vm.ToString(), 0); lvi.SubItems.Add(vm.MemSize.ToString() + " MB"); lvi.Tag = vm; Modified: trunk/tools/RosTE/GUI/VirtualMachine.cs URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosTE/GUI/VirtualMachine.cs?…
============================================================================== --- trunk/tools/RosTE/GUI/VirtualMachine.cs (original) +++ trunk/tools/RosTE/GUI/VirtualMachine.cs Fri Jan 25 18:28:38 2008 @@ -5,13 +5,35 @@ using System.Xml; using System.Windows.Forms; using System.Collections; +using System.Collections.Generic; namespace RosTEGUI { + public struct VirtMachInfo + { + public int virtMachID; + public string name; + public string machType; + public string defDir; + public int memSize; + public bool setClockToHost; + public bool cdRomEnable; + public bool cdRomUsePhys; + public string cdRomPhysDrv; + public bool cdRomUseIso; + public string cdRomIsoImg; + public bool floppyEnable; + public bool floppyUsePhys; + public string floppyPhysDrv; + public bool floppyUseImg; + public string floppyIsoImg; + } + + public class VMHardDrive { - private VMConfig vmConfig; private DataRow hdDataRow; + private DataSet dataSet; #region properties @@ -47,12 +69,6 @@ get { return (bool)hdDataRow["BootImg"]; } set { hdDataRow["BootImg"] = value; } } - - public VMHardDrive(VMConfig vmConfigIn) - { - vmConfig = vmConfigIn; - } - #endregion public override string ToString() @@ -70,7 +86,7 @@ try { - DataTable hddt = vmConfig.DataSet.Tables["HardDisks"]; + DataTable hddt = dataSet.Tables["HardDisks"]; hdDataRow = hddt.NewRow(); hdDataRow["DiskID"] = hddt.Rows.Count; hdDataRow["Name"] = nameIn; @@ -93,7 +109,7 @@ public void DeleteHardDrive(int diskID) { - DataTable dt = vmConfig.DataSet.Tables["HardDisks"]; + DataTable dt = dataSet.Tables["HardDisks"]; //DataRow dr = dt.Rows.Find(diskID); <-- can't seem to apply a primary key?? // workaround for the above foreach (DataRow dr in dt.Rows) @@ -109,17 +125,23 @@ public void LoadHardDrive(int index) { - DataTable hddt = vmConfig.DataSet.Tables["HardDisks"]; + DataTable hddt = dataSet.Tables["HardDisks"]; hdDataRow = hddt.Rows[index]; } } public class VirtualMachine { - private VMConfig vmConfig; private DataRow vmDataRow; + private List<VirtMachInfo> virtMachInfo = null; private ArrayList hardDrives; private ArrayList netCards; + private DataSet dataSet = null; + + public DataSet DataSet + { + get { return dataSet; } + } #region Virtual machine properties @@ -318,7 +340,7 @@ try { - DataTable vmdt = vmConfig.DataSet.Tables["VMConfig"]; + DataTable vmdt = dataSet.Tables["VMConfig"]; vmDataRow = vmdt.NewRow(); vmDataRow["VirtMachID"] = vmdt.Rows.Count + 1; vmDataRow["Name"] = name; @@ -338,11 +360,11 @@ vmDataRow["FloppyIsoImg"] = string.Empty; vmdt.Rows.Add(vmDataRow); - VMHardDrive vmhd = new VMHardDrive(vmConfig); + VMHardDrive vmhd = new VMHardDrive(); vmhd.CreateHardDrive("Main Drive", "hda", dir, 768, true); hardDrives.Add(vmhd); - DataTable netdt = vmConfig.DataSet.Tables["NetCards"]; + DataTable netdt = dataSet.Tables["NetCards"]; netDataRow = netdt.NewRow(); netDataRow["CardID"] = netdt.Rows.Count + 1; netDataRow["VirtMachID"] = vmDataRow["VirtMachID"]; @@ -365,74 +387,18 @@ return ret; } - public bool LoadVMConfig(string path) - { - bool ret = false; - string fileName = path + "\\Config.xml"; - - if (File.Exists(fileName)) - { - try - { - FileStream fs = new FileStream(fileName, FileMode.Open, FileAccess.Read); - XmlTextReader xtr = new XmlTextReader(fs); - vmConfig.DataSet.ReadXml(xtr, System.Data.XmlReadMode.ReadSchema); - xtr.Close(); - - DataTable vmdt = vmConfig.DataSet.Tables["VMConfig"]; - vmDataRow = vmdt.Rows[0]; - - DataTable hddt = vmConfig.DataSet.Tables["HardDisks"]; - for (int i = 0; i < hddt.Rows.Count; i++) - { - VMHardDrive vmhd = new VMHardDrive(vmConfig); - vmhd.LoadHardDrive(i); - hardDrives.Add(vmhd); - } - - DataTable netdt = vmConfig.DataSet.Tables["NetCards"]; - foreach (DataRow dr in netdt.Rows) - netCards.Add(dr); - - ret = true; - } - catch (Exception e) - { - MessageBox.Show("error loading the VM Config.xml: " + e.Message); - } - } - - return ret; - } - - public void SaveVMConfig() - { - try - { - string fileName = DefDir + "\\Config.xml"; - Directory.CreateDirectory(DefDir); - FileStream fs = new FileStream(fileName, FileMode.Create, FileAccess.Write); - XmlTextWriter xtw = new XmlTextWriter(fs, System.Text.Encoding.Unicode); - vmConfig.DataSet.WriteXml(xtw, System.Data.XmlWriteMode.WriteSchema); - xtw.Close(); - } - catch (Exception e) - { - MessageBox.Show("error loading VM Config.xml: " + e.Message); - } - } #endregion public VirtualMachine() - { + {/* vmConfig = new VMConfig(); if (!vmConfig.LoadVirtMachData()) MessageBox.Show("Failed to load VM Schema"); hardDrives = new ArrayList(3); - netCards = new ArrayList(); + netCards = new ArrayList();*/ } public override string ToString() @@ -490,7 +456,7 @@ int sizeIn, bool bootImgIn) { - VMHardDrive vmhd = new VMHardDrive(vmConfig); + VMHardDrive vmhd = new VMHardDrive(); if (vmhd.CreateHardDrive(nameIn, driveIn, pathIn, sizeIn, bootImgIn)) { hardDrives.Add(vmhd); @@ -510,5 +476,185 @@ { return hardDrives; } + + + public bool LoadVmSettings() + { + bool bRet = false; + + if (dataSet != null) + { + if (virtMachInfo == null) + { + virtMachInfo = new List<VirtMachInfo>(); + } + + try + { + foreach (DataRow vmRow in dataSet.Tables["VMConfig"].Rows) + { + VirtMachInfo vmi = new VirtMachInfo(); + vmi.virtMachID = (int)vmRow["VirtMachID"]; + vmi.name = (string)vmRow["Name"]; + vmi.machType = (string)vmRow["MachType"]; + vmi.defDir = (string)vmRow["DefDir"]; + vmi.memSize = (int)vmRow["MemSize"]; + vmi.setClockToHost = (bool)vmRow["SetClockToHost"]; + vmi.cdRomEnable = (bool)vmRow["CdRomEnable"]; + vmi.cdRomUsePhys = (bool)vmRow["CdRomUsePhys"]; + vmi.cdRomPhysDrv = (string)vmRow["CdRomPhysDrv"]; + vmi.cdRomUseIso = (bool)vmRow["CdRomUseIso"]; + vmi.cdRomIsoImg = (string)vmRow["CdRomIsoImg"]; + vmi.floppyEnable = (bool)vmRow["FloppyEnable"]; + vmi.floppyUsePhys = (bool)vmRow["FloppyUsePhys"]; + vmi.floppyPhysDrv = (string)vmRow["FloppyPhysDrv"]; + vmi.floppyUseImg = (bool)vmRow["FloppyUseImg"]; + vmi.floppyIsoImg = (string)vmRow["FloppyIsoImg"]; + + virtMachInfo.Add(vmi); + } + + bRet = true; + } + catch (Exception ex) + { + Debug.LogMessage("error loading VM config", ex.Message, ex.StackTrace, true); + } + } + + return bRet; + } + + public void SaveVmSettings() + { + if (dataSet != null) + { + dataSet.Tables["VirtMach"].Rows.Clear(); + + try + { + foreach (VirtMachInfo vmi in virtMachInfo) + { + DataRow vmRow = dataSet.Tables["VirtMach"].NewRow(); + + vmRow["VirtMachID"] = vmi.virtMachID; + vmRow["Name"] = vmi.name; + vmRow["MachType"] = vmi.machType; + vmRow["DefDir"] = vmi.defDir; + vmRow["MemSize"] = vmi.memSize; + vmRow["SetClockToHost"] = vmi.setClockToHost; + vmRow["CdRomEnable"] = vmi.cdRomEnable; + vmRow["CdRomUsePhys"] = vmi.cdRomUsePhys; + vmRow["CdRomPhysDrv"] = vmi.cdRomPhysDrv; + vmRow["CdRomUseIso"] = vmi.cdRomUseIso; + vmRow["CdRomIsoImg"] = vmi.cdRomIsoImg; + vmRow["FloppyEnable"] = vmi.floppyEnable; + vmRow["FloppyUsePhys"] = vmi.floppyUsePhys; + vmRow["FloppyPhysDrv"] = vmi.floppyPhysDrv; + vmRow["FloppyUseImg"] = vmi.floppyUseImg; + vmRow["FloppyIsoImg"] = vmi.floppyIsoImg; + } + } + catch (Exception ex) + { + Debug.LogMessage("error loading VM config", ex.Message, ex.StackTrace, true); + } + } + } + + + public bool LoadVMConfig(string path) + { + XmlTextReader xtr = null; + string fileName = path + "\\Config.xml"; + bool ret = false; + + if (LoadVirtMachSchema()) + { + if (File.Exists(fileName)) + { + try + { + FileStream fs = new FileStream(fileName, FileMode.Open, FileAccess.Read); + xtr = new XmlTextReader(fs); + dataSet.ReadXml(xtr, System.Data.XmlReadMode.ReadSchema); + xtr.Close(); + ret = true; + } + catch (Exception ex) + { + Debug.LogMessage("error loading VM config", ex.Message, ex.StackTrace, true); + } + finally + { + if (xtr != null) + xtr.Close(); + } + } + } + + return ret; + } + + public void SaveVMConfig() + { + XmlTextWriter xtw = null; + string fileName = DefDir + "\\Config.xml"; + + if (!Directory.Exists(DefDir)) + Directory.CreateDirectory(DefDir); + + if (dataSet == null) + { + if (!LoadVirtMachSchema()) + return; + } + + try + { + FileStream fs = new FileStream(fileName, FileMode.Create, FileAccess.Write); + xtw = new XmlTextWriter(fs, System.Text.Encoding.Unicode); + dataSet.WriteXml(xtw, System.Data.XmlWriteMode.WriteSchema); + } + catch (Exception ex) + { + Debug.LogMessage("error saving VM config", ex.Message, ex.StackTrace, true); + } + finally + { + if (xtw != null) + xtw.Close(); + } + } + + private bool LoadVirtMachSchema() + { + XmlTextReader xtr = null; + string filename = "VMConfig.xsd"; + bool ret = false; + + dataSet = new DataSet(); + if (File.Exists(filename)) + { + try + { + FileStream fs = new FileStream(filename, FileMode.Open, FileAccess.Read); + xtr = new XmlTextReader(fs); + dataSet.ReadXmlSchema(xtr); + ret = true; + } + catch (Exception ex) + { + Debug.LogMessage("error loading VM config schema", ex.Message, ex.StackTrace, true); + } + finally + { + if (xtr != null) + xtr.Close(); + } + } + + return ret; + } } }
16 years, 9 months
1
0
0
0
[cwittich] 31997: fix 640x480 resolution
by cwittich@svn.reactos.org
Author: cwittich Date: Fri Jan 25 18:16:14 2008 New Revision: 31997 URL:
http://svn.reactos.org/svn/reactos?rev=31997&view=rev
Log: fix 640x480 resolution Modified: trunk/reactos/base/setup/vmwinst/lang/cs-CZ.rc trunk/reactos/base/setup/vmwinst/lang/da-DK.rc trunk/reactos/base/setup/vmwinst/lang/de-DE.rc trunk/reactos/base/setup/vmwinst/lang/el-GR.rc trunk/reactos/base/setup/vmwinst/lang/en-US.rc trunk/reactos/base/setup/vmwinst/lang/es-ES.rc trunk/reactos/base/setup/vmwinst/lang/fr-FR.rc trunk/reactos/base/setup/vmwinst/lang/hu-HU.rc trunk/reactos/base/setup/vmwinst/lang/id-ID.rc trunk/reactos/base/setup/vmwinst/lang/it-IT.rc trunk/reactos/base/setup/vmwinst/lang/ja-JP.rc trunk/reactos/base/setup/vmwinst/lang/lt-LT.rc trunk/reactos/base/setup/vmwinst/lang/nb-NO.rc trunk/reactos/base/setup/vmwinst/lang/pl-PL.rc trunk/reactos/base/setup/vmwinst/lang/ru-RU.rc trunk/reactos/base/setup/vmwinst/lang/uk-UA.rc trunk/reactos/base/setup/vmwinst/lang/zh-CN.rc Modified: trunk/reactos/base/setup/vmwinst/lang/cs-CZ.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/vmwinst/lang/cs…
============================================================================== --- trunk/reactos/base/setup/vmwinst/lang/cs-CZ.rc (original) +++ trunk/reactos/base/setup/vmwinst/lang/cs-CZ.rc Fri Jan 25 18:16:14 2008 @@ -32,7 +32,7 @@ FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN LTEXT "Ovladaè obrazovky VMware(r) SVGA byl úspìnì nainstalován. Nyní, prosím, vyberte preferované rozliení obrazovky:",-1,25,5,225,20 - PUSHBUTTON "640x480", 540, 25, 30, 65, 15, BS_AUTORADIOBUTTON + PUSHBUTTON "640x480", 1120, 25, 30, 65, 15, BS_AUTORADIOBUTTON PUSHBUTTON "800x600", 1400, 25, 45, 65, 15, BS_AUTORADIOBUTTON PUSHBUTTON "1024x768", 1792, 25, 60, 65, 15, BS_AUTORADIOBUTTON PUSHBUTTON "1152x864", 2016, 25, 75, 65, 15, BS_AUTORADIOBUTTON Modified: trunk/reactos/base/setup/vmwinst/lang/da-DK.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/vmwinst/lang/da…
============================================================================== --- trunk/reactos/base/setup/vmwinst/lang/da-DK.rc (original) +++ trunk/reactos/base/setup/vmwinst/lang/da-DK.rc Fri Jan 25 18:16:14 2008 @@ -32,7 +32,7 @@ FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN LTEXT "WMware(r) SVGA driver er blevet installeret med succes. Vælg din favorit Skærm Opløsning:",-1,25,5,225,20 - PUSHBUTTON "640x480", 540, 25, 30, 65, 15, BS_AUTORADIOBUTTON + PUSHBUTTON "640x480", 1120, 25, 30, 65, 15, BS_AUTORADIOBUTTON PUSHBUTTON "800x600", 1400, 25, 45, 65, 15, BS_AUTORADIOBUTTON PUSHBUTTON "1024x768", 1792, 25, 60, 65, 15, BS_AUTORADIOBUTTON PUSHBUTTON "1152x864", 2016, 25, 75, 65, 15, BS_AUTORADIOBUTTON Modified: trunk/reactos/base/setup/vmwinst/lang/de-DE.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/vmwinst/lang/de…
============================================================================== --- trunk/reactos/base/setup/vmwinst/lang/de-DE.rc (original) +++ trunk/reactos/base/setup/vmwinst/lang/de-DE.rc Fri Jan 25 18:16:14 2008 @@ -32,7 +32,7 @@ FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN LTEXT "Der VMware(r) SVGA Treiber wurde erfolgreich installiert. Wählen Sie bitte Ihre Auflösung:",-1,25,5,225,20 - PUSHBUTTON "640x480", 540, 25, 30, 65, 15, BS_AUTORADIOBUTTON + PUSHBUTTON "640x480", 1120, 25, 30, 65, 15, BS_AUTORADIOBUTTON PUSHBUTTON "800x600", 1400, 25, 45, 65, 15, BS_AUTORADIOBUTTON PUSHBUTTON "1024x768", 1792, 25, 60, 65, 15, BS_AUTORADIOBUTTON PUSHBUTTON "1152x864", 2016, 25, 75, 65, 15, BS_AUTORADIOBUTTON Modified: trunk/reactos/base/setup/vmwinst/lang/el-GR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/vmwinst/lang/el…
============================================================================== --- trunk/reactos/base/setup/vmwinst/lang/el-GR.rc (original) +++ trunk/reactos/base/setup/vmwinst/lang/el-GR.rc Fri Jan 25 18:16:14 2008 @@ -32,7 +32,7 @@ FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN LTEXT "Ï ïäçãüò ôçò VMware(r) SVGA åãêáôáóôÜèçêå åðéôõ÷þò. Ðáñáêáëþ åðéëÝîôå ôçí áãáðçìÝíç óáò áíÜëõóç ïèüíçò:",-1,25,5,225,20 - PUSHBUTTON "640x480", 540, 25, 30, 65, 15, BS_AUTORADIOBUTTON + PUSHBUTTON "640x480", 1120, 25, 30, 65, 15, BS_AUTORADIOBUTTON PUSHBUTTON "800x600", 1400, 25, 45, 65, 15, BS_AUTORADIOBUTTON PUSHBUTTON "1024x768", 1792, 25, 60, 65, 15, BS_AUTORADIOBUTTON PUSHBUTTON "1152x864", 2016, 25, 75, 65, 15, BS_AUTORADIOBUTTON Modified: trunk/reactos/base/setup/vmwinst/lang/en-US.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/vmwinst/lang/en…
============================================================================== --- trunk/reactos/base/setup/vmwinst/lang/en-US.rc (original) +++ trunk/reactos/base/setup/vmwinst/lang/en-US.rc Fri Jan 25 18:16:14 2008 @@ -32,7 +32,7 @@ FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN LTEXT "The VMware(r) SVGA driver has been successfully installed. Please choose your favorite screen resolution:",-1,25,5,225,20 - PUSHBUTTON "640x480", 540, 25, 30, 65, 15, BS_AUTORADIOBUTTON + PUSHBUTTON "640x480", 1120, 25, 30, 65, 15, BS_AUTORADIOBUTTON PUSHBUTTON "800x600", 1400, 25, 45, 65, 15, BS_AUTORADIOBUTTON PUSHBUTTON "1024x768", 1792, 25, 60, 65, 15, BS_AUTORADIOBUTTON PUSHBUTTON "1152x864", 2016, 25, 75, 65, 15, BS_AUTORADIOBUTTON Modified: trunk/reactos/base/setup/vmwinst/lang/es-ES.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/vmwinst/lang/es…
============================================================================== --- trunk/reactos/base/setup/vmwinst/lang/es-ES.rc (original) +++ trunk/reactos/base/setup/vmwinst/lang/es-ES.rc Fri Jan 25 18:16:14 2008 @@ -34,7 +34,7 @@ FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN LTEXT "El controlador SVGA VMware(r) ha sido instalado satisfactoriamente.\nPor favor elija su resolución de pantalla favorita:",-1,25,5,225,20 - PUSHBUTTON "640x480", 540, 25, 30, 65, 15, BS_AUTORADIOBUTTON + PUSHBUTTON "640x480", 1120, 25, 30, 65, 15, BS_AUTORADIOBUTTON PUSHBUTTON "800x600", 1400, 25, 45, 65, 15, BS_AUTORADIOBUTTON PUSHBUTTON "1024x768", 1792, 25, 60, 65, 15, BS_AUTORADIOBUTTON PUSHBUTTON "1152x864", 2016, 25, 75, 65, 15, BS_AUTORADIOBUTTON Modified: trunk/reactos/base/setup/vmwinst/lang/fr-FR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/vmwinst/lang/fr…
============================================================================== --- trunk/reactos/base/setup/vmwinst/lang/fr-FR.rc (original) +++ trunk/reactos/base/setup/vmwinst/lang/fr-FR.rc Fri Jan 25 18:16:14 2008 @@ -32,7 +32,7 @@ FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN LTEXT "Le pilote SVGA de VMware(r) a été installé avec succès. Veuillez choisir votre résolution d'écran favorite:",-1,25,5,225,20 - PUSHBUTTON "640x480", 540, 25, 30, 65, 15, BS_AUTORADIOBUTTON + PUSHBUTTON "640x480", 1120, 25, 30, 65, 15, BS_AUTORADIOBUTTON PUSHBUTTON "800x600", 1400, 25, 45, 65, 15, BS_AUTORADIOBUTTON PUSHBUTTON "1024x768", 1792, 25, 60, 65, 15, BS_AUTORADIOBUTTON PUSHBUTTON "1152x864", 2016, 25, 75, 65, 15, BS_AUTORADIOBUTTON Modified: trunk/reactos/base/setup/vmwinst/lang/hu-HU.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/vmwinst/lang/hu…
============================================================================== --- trunk/reactos/base/setup/vmwinst/lang/hu-HU.rc (original) +++ trunk/reactos/base/setup/vmwinst/lang/hu-HU.rc Fri Jan 25 18:16:14 2008 @@ -33,7 +33,7 @@ FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN LTEXT "A VMware(r) SVGA meghajtó sikeresen telepítve lett. Kérlek állítsd be milyen felbontásban szeretnéd használni:",-1,25,5,225,20 - PUSHBUTTON "640x480", 540, 25, 30, 65, 15, BS_AUTORADIOBUTTON + PUSHBUTTON "640x480", 1120, 25, 30, 65, 15, BS_AUTORADIOBUTTON PUSHBUTTON "800x600", 1400, 25, 45, 65, 15, BS_AUTORADIOBUTTON PUSHBUTTON "1024x768", 1792, 25, 60, 65, 15, BS_AUTORADIOBUTTON PUSHBUTTON "1152x864", 2016, 25, 75, 65, 15, BS_AUTORADIOBUTTON Modified: trunk/reactos/base/setup/vmwinst/lang/id-ID.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/vmwinst/lang/id…
============================================================================== --- trunk/reactos/base/setup/vmwinst/lang/id-ID.rc (original) +++ trunk/reactos/base/setup/vmwinst/lang/id-ID.rc Fri Jan 25 18:16:14 2008 @@ -32,7 +32,7 @@ FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN LTEXT "VMware(r) SVGA driver sudah diinstalasi dengan sukses. Silah pilih resolusi layar favorit anda:",-1,25,5,225,20 - PUSHBUTTON "640x480", 540, 25, 30, 65, 15, BS_AUTORADIOBUTTON + PUSHBUTTON "640x480", 1120, 25, 30, 65, 15, BS_AUTORADIOBUTTON PUSHBUTTON "800x600", 1400, 25, 45, 65, 15, BS_AUTORADIOBUTTON PUSHBUTTON "1024x768", 1792, 25, 60, 65, 15, BS_AUTORADIOBUTTON PUSHBUTTON "1152x864", 2016, 25, 75, 65, 15, BS_AUTORADIOBUTTON Modified: trunk/reactos/base/setup/vmwinst/lang/it-IT.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/vmwinst/lang/it…
============================================================================== --- trunk/reactos/base/setup/vmwinst/lang/it-IT.rc (original) +++ trunk/reactos/base/setup/vmwinst/lang/it-IT.rc Fri Jan 25 18:16:14 2008 @@ -32,7 +32,7 @@ FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN LTEXT "The VMware(r) SVGA driver has been successfully installed. Please choose your favorite screen resolution:",-1,25,5,225,20 - PUSHBUTTON "640x480", 540, 25, 30, 65, 15, BS_AUTORADIOBUTTON + PUSHBUTTON "640x480", 1120, 25, 30, 65, 15, BS_AUTORADIOBUTTON PUSHBUTTON "800x600", 1400, 25, 45, 65, 15, BS_AUTORADIOBUTTON PUSHBUTTON "1024x768", 1792, 25, 60, 65, 15, BS_AUTORADIOBUTTON PUSHBUTTON "1152x864", 2016, 25, 75, 65, 15, BS_AUTORADIOBUTTON Modified: trunk/reactos/base/setup/vmwinst/lang/ja-JP.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/vmwinst/lang/ja…
============================================================================== --- trunk/reactos/base/setup/vmwinst/lang/ja-JP.rc (original) +++ trunk/reactos/base/setup/vmwinst/lang/ja-JP.rc Fri Jan 25 18:16:14 2008 @@ -32,7 +32,7 @@ FONT 9, "MS UI Gothic", 0, 0, 0x0 BEGIN LTEXT "VMware(R) SVGA hCoÌCXg[ɬ÷µÜµ½Bgpµ½¢æÊðxðIðµÄ¾³¢:",-1,25,5,225,20 - PUSHBUTTON "640x480", 540, 25, 30, 65, 15, BS_AUTORADIOBUTTON + PUSHBUTTON "640x480", 1120, 25, 30, 65, 15, BS_AUTORADIOBUTTON PUSHBUTTON "800x600", 1400, 25, 45, 65, 15, BS_AUTORADIOBUTTON PUSHBUTTON "1024x768", 1792, 25, 60, 65, 15, BS_AUTORADIOBUTTON PUSHBUTTON "1152x864", 2016, 25, 75, 65, 15, BS_AUTORADIOBUTTON Modified: trunk/reactos/base/setup/vmwinst/lang/lt-LT.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/vmwinst/lang/lt…
============================================================================== --- trunk/reactos/base/setup/vmwinst/lang/lt-LT.rc (original) +++ trunk/reactos/base/setup/vmwinst/lang/lt-LT.rc Fri Jan 25 18:16:14 2008 @@ -34,7 +34,7 @@ FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN LTEXT "VMware(r) SVGA vaizdo tvarkyklë ádiegta sëkmingai. Pasirinkite norimà ekrano skiriamàjà gebà:",-1,25,5,225,20 - PUSHBUTTON "640x480", 540, 25, 30, 65, 15, BS_AUTORADIOBUTTON + PUSHBUTTON "640x480", 1120, 25, 30, 65, 15, BS_AUTORADIOBUTTON PUSHBUTTON "800x600", 1400, 25, 45, 65, 15, BS_AUTORADIOBUTTON PUSHBUTTON "1024x768", 1792, 25, 60, 65, 15, BS_AUTORADIOBUTTON PUSHBUTTON "1152x864", 2016, 25, 75, 65, 15, BS_AUTORADIOBUTTON Modified: trunk/reactos/base/setup/vmwinst/lang/nb-NO.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/vmwinst/lang/nb…
============================================================================== --- trunk/reactos/base/setup/vmwinst/lang/nb-NO.rc (original) +++ trunk/reactos/base/setup/vmwinst/lang/nb-NO.rc Fri Jan 25 18:16:14 2008 @@ -32,7 +32,7 @@ FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN LTEXT "VMware(r) SVGA driver har blitt vellykket innstallert. Venligst velg din favoritt skjerm oppløsning:",-1,25,5,225,20 - PUSHBUTTON "640x480", 540, 25, 30, 65, 15, BS_AUTORADIOBUTTON + PUSHBUTTON "640x480", 1120, 25, 30, 65, 15, BS_AUTORADIOBUTTON PUSHBUTTON "800x600", 1400, 25, 45, 65, 15, BS_AUTORADIOBUTTON PUSHBUTTON "1024x768", 1792, 25, 60, 65, 15, BS_AUTORADIOBUTTON PUSHBUTTON "1152x864", 2016, 25, 75, 65, 15, BS_AUTORADIOBUTTON Modified: trunk/reactos/base/setup/vmwinst/lang/pl-PL.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/vmwinst/lang/pl…
============================================================================== --- trunk/reactos/base/setup/vmwinst/lang/pl-PL.rc (original) +++ trunk/reactos/base/setup/vmwinst/lang/pl-PL.rc Fri Jan 25 18:16:14 2008 @@ -38,7 +38,7 @@ FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN LTEXT "Sterownik SVGA VMware(r) zosta³ zainstalowany pomylnie. Proszê wybraæ rozdzielczoæ ekranu:",-1,25,5,225,20 - PUSHBUTTON "640x480", 540, 25, 30, 65, 15, BS_AUTORADIOBUTTON + PUSHBUTTON "640x480", 1120, 25, 30, 65, 15, BS_AUTORADIOBUTTON PUSHBUTTON "800x600", 1400, 25, 45, 65, 15, BS_AUTORADIOBUTTON PUSHBUTTON "1024x768", 1792, 25, 60, 65, 15, BS_AUTORADIOBUTTON PUSHBUTTON "1152x864", 2016, 25, 75, 65, 15, BS_AUTORADIOBUTTON Modified: trunk/reactos/base/setup/vmwinst/lang/ru-RU.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/vmwinst/lang/ru…
============================================================================== --- trunk/reactos/base/setup/vmwinst/lang/ru-RU.rc (original) +++ trunk/reactos/base/setup/vmwinst/lang/ru-RU.rc Fri Jan 25 18:16:14 2008 @@ -32,7 +32,7 @@ FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN LTEXT "Óñòàíîâêà SVGA-äðàéâåðà VMware(r) çàâåðøåíà óñïåøíî. Âûáåðèòå ïðåäïî÷òèòåëüíîå ðàçðåøåíèå ýêðàíà:",-1,25,5,225,20 - PUSHBUTTON "640x480", 540, 25, 30, 65, 15, BS_AUTORADIOBUTTON + PUSHBUTTON "640x480", 1120, 25, 30, 65, 15, BS_AUTORADIOBUTTON PUSHBUTTON "800x600", 1400, 25, 45, 65, 15, BS_AUTORADIOBUTTON PUSHBUTTON "1024x768", 1792, 25, 60, 65, 15, BS_AUTORADIOBUTTON PUSHBUTTON "1152x864", 2016, 25, 75, 65, 15, BS_AUTORADIOBUTTON Modified: trunk/reactos/base/setup/vmwinst/lang/uk-UA.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/vmwinst/lang/uk…
============================================================================== --- trunk/reactos/base/setup/vmwinst/lang/uk-UA.rc (original) +++ trunk/reactos/base/setup/vmwinst/lang/uk-UA.rc Fri Jan 25 18:16:14 2008 @@ -40,7 +40,7 @@ FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN LTEXT "Óñòàíîâêó SVGA äðàéâåðà VMware(r) çàâåðøåíî óñï³øíî. Îáåð³òü ïåðåâàæíó ðîçä³ëüíó çäàòí³ñòü åêðàíó:",-1,25,5,225,20 - PUSHBUTTON "640x480", 540, 25, 30, 65, 15, BS_AUTORADIOBUTTON + PUSHBUTTON "640x480", 1120, 25, 30, 65, 15, BS_AUTORADIOBUTTON PUSHBUTTON "800x600", 1400, 25, 45, 65, 15, BS_AUTORADIOBUTTON PUSHBUTTON "1024x768", 1792, 25, 60, 65, 15, BS_AUTORADIOBUTTON PUSHBUTTON "1152x864", 2016, 25, 75, 65, 15, BS_AUTORADIOBUTTON Modified: trunk/reactos/base/setup/vmwinst/lang/zh-CN.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/vmwinst/lang/zh…
============================================================================== --- trunk/reactos/base/setup/vmwinst/lang/zh-CN.rc (original) +++ trunk/reactos/base/setup/vmwinst/lang/zh-CN.rc Fri Jan 25 18:16:14 2008 @@ -53,7 +53,7 @@ FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN LTEXT " VMware(r) SVGA Çý¶¯³ÌÐòÒѾ³É¹¦°²×°¡£ÇëÑ¡ÔñÏëʹÓõÄÆÁÄ»·Ö±æÂÊ :",-1,25,5,225,20 - PUSHBUTTON "640x480", 540, 25, 30, 65, 15, BS_AUTORADIOBUTTON + PUSHBUTTON "640x480", 1120, 25, 30, 65, 15, BS_AUTORADIOBUTTON PUSHBUTTON "800x600", 1400, 25, 45, 65, 15, BS_AUTORADIOBUTTON PUSHBUTTON "1024x768", 1792, 25, 60, 65, 15, BS_AUTORADIOBUTTON PUSHBUTTON "1152x864", 2016, 25, 75, 65, 15, BS_AUTORADIOBUTTON
16 years, 9 months
1
0
0
0
[fireball] 31996: - Add a runtime switch between using freeldr-embedded configuration tree heap, or using a real heap allocation (for NT-way). - Use that in winldr.
by fireball@svn.reactos.org
Author: fireball Date: Fri Jan 25 18:08:27 2008 New Revision: 31996 URL:
http://svn.reactos.org/svn/reactos?rev=31996&view=rev
Log: - Add a runtime switch between using freeldr-embedded configuration tree heap, or using a real heap allocation (for NT-way). - Use that in winldr. Modified: trunk/reactos/boot/freeldr/freeldr/reactos/archwsup.c trunk/reactos/boot/freeldr/freeldr/windows/winldr.c Modified: trunk/reactos/boot/freeldr/freeldr/reactos/archwsup.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/react…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/reactos/archwsup.c (original) +++ trunk/reactos/boot/freeldr/freeldr/reactos/archwsup.c Fri Jan 25 18:08:27 2008 @@ -18,6 +18,8 @@ ULONG FldrpHwHeapLocation; PCONFIGURATION_COMPONENT_DATA FldrArcHwTreeRoot; +BOOLEAN UseRealHeap = FALSE; + /* FUNCTIONS ******************************************************************/ PVOID @@ -25,13 +27,21 @@ FldrpHwHeapAlloc(IN ULONG Size) { PVOID Buffer; - - /* Return a block of memory from the ARC Hardware Heap */ - Buffer = &reactos_arc_hardware_data[FldrpHwHeapLocation]; - - /* Increment the heap location */ - FldrpHwHeapLocation += Size; - if (FldrpHwHeapLocation > HW_MAX_ARC_HEAP_SIZE) Buffer = NULL; + + if (UseRealHeap) + { + /* Allocate memory from generic bootloader heap */ + Buffer = MmHeapAlloc(Size); + } + else + { + /* Return a block of memory from the ARC Hardware Heap */ + Buffer = &reactos_arc_hardware_data[FldrpHwHeapLocation]; + + /* Increment the heap location */ + FldrpHwHeapLocation += Size; + if (FldrpHwHeapLocation > HW_MAX_ARC_HEAP_SIZE) Buffer = NULL; + } /* Clear it */ if (Buffer) Modified: trunk/reactos/boot/freeldr/freeldr/windows/winldr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/windo…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/windows/winldr.c (original) +++ trunk/reactos/boot/freeldr/freeldr/windows/winldr.c Fri Jan 25 18:08:27 2008 @@ -29,6 +29,8 @@ extern ARC_DISK_SIGNATURE reactos_arc_disk_info[]; extern char reactos_arc_strings[32][256]; +extern BOOLEAN UseRealHeap; + BOOLEAN WinLdrCheckForLoadedDll(IN OUT PLOADER_PARAMETER_BLOCK WinLdrBlock, IN PCH DllName, @@ -429,6 +431,7 @@ AllocateAndInitLPB(&LoaderBlock); /* Detect hardware */ + UseRealHeap = TRUE; LoaderBlock->ConfigurationRoot = MachHwDetect(); /* Load kernel */
16 years, 9 months
1
0
0
0
[cwittich] 31995: reenable it...
by cwittich@svn.reactos.org
Author: cwittich Date: Fri Jan 25 18:04:03 2008 New Revision: 31995 URL:
http://svn.reactos.org/svn/reactos?rev=31995&view=rev
Log: reenable it... 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 (original) +++ trunk/reactos/dll/win32/syssetup/wizard.c Fri Jan 25 18:04:03 2008 @@ -1985,13 +1985,22 @@ { case PSN_SETACTIVE: /* Enable the correct buttons on for the active page */ - PropSheet_SetWizButtons(GetParent(hwndDlg), PSWIZB_FINISH); + PropSheet_SetWizButtons(GetParent(hwndDlg), PSWIZB_BACK | PSWIZB_FINISH); SendDlgItemMessage(hwndDlg, IDC_RESTART_PROGRESS, PBM_SETRANGE, 0, MAKELPARAM(0, 300)); SendDlgItemMessage(hwndDlg, IDC_RESTART_PROGRESS, PBM_SETPOS, 0, 0); SetTimer(hwndDlg, 1, 50, NULL); break; + + case PSN_WIZBACK: + /* Handle a Back button click, if necessary */ + KillTimer(hwndDlg, 1); + + /* Skip the progress page */ + SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_DATETIMEPAGE); + SetupData.UnattendSetup = FALSE; + return TRUE; case PSN_WIZFINISH: /* Handle a Finish button click, if necessary */
16 years, 9 months
1
0
0
0
[cwittich] 31994: disable the Back button on Finish page
by cwittich@svn.reactos.org
Author: cwittich Date: Fri Jan 25 18:00:29 2008 New Revision: 31994 URL:
http://svn.reactos.org/svn/reactos?rev=31994&view=rev
Log: disable the Back button on Finish page 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 (original) +++ trunk/reactos/dll/win32/syssetup/wizard.c Fri Jan 25 18:00:29 2008 @@ -1985,22 +1985,13 @@ { case PSN_SETACTIVE: /* Enable the correct buttons on for the active page */ - PropSheet_SetWizButtons(GetParent(hwndDlg), PSWIZB_BACK | PSWIZB_FINISH); + PropSheet_SetWizButtons(GetParent(hwndDlg), PSWIZB_FINISH); SendDlgItemMessage(hwndDlg, IDC_RESTART_PROGRESS, PBM_SETRANGE, 0, MAKELPARAM(0, 300)); SendDlgItemMessage(hwndDlg, IDC_RESTART_PROGRESS, PBM_SETPOS, 0, 0); SetTimer(hwndDlg, 1, 50, NULL); break; - - case PSN_WIZBACK: - /* Handle a Back button click, if necessary */ - KillTimer(hwndDlg, 1); - - /* Skip the progress page */ - SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_DATETIMEPAGE); - SetupData.UnattendSetup = FALSE; - return TRUE; case PSN_WIZFINISH: /* Handle a Finish button click, if necessary */
16 years, 9 months
1
0
0
0
[cwittich] 31993: changed the index to get better readable code spotted by pablo at menichini dot com dot ar
by cwittich@svn.reactos.org
Author: cwittich Date: Fri Jan 25 17:18:41 2008 New Revision: 31993 URL:
http://svn.reactos.org/svn/reactos?rev=31993&view=rev
Log: changed the index to get better readable code spotted by pablo at menichini dot com dot ar Modified: trunk/reactos/drivers/filesystems/vfat/dirwr.c Modified: trunk/reactos/drivers/filesystems/vfat/dirwr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/vfat/d…
============================================================================== --- trunk/reactos/drivers/filesystems/vfat/dirwr.c (original) +++ trunk/reactos/drivers/filesystems/vfat/dirwr.c Fri Jan 25 17:18:41 2008 @@ -327,9 +327,9 @@ if (aName[i] == '.') { i++; - for (j = 8; j < 11 && aName[i]; j++, i++) - { - DirContext.DirEntry.Fat.Ext[j - 8] = aName[i]; + for (j = 0; j < 3 && aName[i]; j++, i++) + { + DirContext.DirEntry.Fat.Ext[j] = aName[i]; } } if (DirContext.DirEntry.Fat.Filename[0] == 0xe5)
16 years, 9 months
1
0
0
0
← Newer
1
...
5
6
7
8
9
10
11
...
54
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
Results per page:
10
25
50
100
200