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
September 2006
----- 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
16 participants
146 discussions
Start a n
N
ew thread
[ion] 24306: - Fix some bugs in intrin.h (missing __inline__ statments in some locations, which were causing warnings due to "static"). - Remove intrinsics in winddk.h since they're now properly done in intrin.h (thanks KJK!!!) - Make freeldr.c setup the boot KTSS like NTLDR does, so that the GDT entry for it is valid (and remove the code that was doing this from Ki386InitializeTss) - Refactor KiSystemStartup to use 100% dynamic pointers and machine data queried from the Loader Block or actual G
by ion@svn.reactos.org
Author: ion Date: Sat Sep 30 09:42:22 2006 New Revision: 24306 URL:
http://svn.reactos.org/svn/reactos?rev=24306&view=rev
Log: - Fix some bugs in intrin.h (missing __inline__ statments in some locations, which were causing warnings due to "static"). - Remove intrinsics in winddk.h since they're now properly done in intrin.h (thanks KJK!!!) - Make freeldr.c setup the boot KTSS like NTLDR does, so that the GDT entry for it is valid (and remove the code that was doing this from Ki386InitializeTss) - Refactor KiSystemStartup to use 100% dynamic pointers and machine data queried from the Loader Block or actual GDT/IDT/Selectors in memory, isntead of hard-coded ntoskrnl offsets. This makes it possible to be loaded by NTLDR, which sets these system structures up by itself. (we do it in freeldr.c, as hacks). Modified: trunk/reactos/include/ddk/winddk.h trunk/reactos/include/psdk/intrin.h trunk/reactos/ntoskrnl/include/internal/i386/ke.h trunk/reactos/ntoskrnl/include/internal/ke.h trunk/reactos/ntoskrnl/ke/freeldr.c trunk/reactos/ntoskrnl/ke/i386/cpu.c trunk/reactos/ntoskrnl/ke/i386/kiinit.c Modified: trunk/reactos/include/ddk/winddk.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/winddk.h?rev=2…
============================================================================== --- trunk/reactos/include/ddk/winddk.h (original) +++ trunk/reactos/include/ddk/winddk.h Sat Sep 30 09:42:22 2006 @@ -10568,30 +10568,6 @@ #endif -#ifdef __GNUC__ - -/* Available as intrinsics on MSVC */ -static __inline void _disable(void) {__asm__ __volatile__("cli\n");} -static __inline void _enable(void) {__asm__ __volatile__("sti\n");} - -static __inline ULONG64 __readcr3(void) -{ - ULONG_PTR Ret; - __asm__ __volatile__("movl %%cr3, %0;\n" - :"=r"(Ret)); - return (ULONG64)Ret; -} - -static __inline ULONG64 __readcr4(void) -{ - ULONG_PTR Ret; - __asm__ __volatile__("movl %%cr4, %0; \n" - :"=r"(Ret)); - return (ULONG64)Ret; -} - -#endif - #ifdef __cplusplus } #endif Modified: trunk/reactos/include/psdk/intrin.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/intrin.h?rev=…
============================================================================== --- trunk/reactos/include/psdk/intrin.h (original) +++ trunk/reactos/include/psdk/intrin.h Sat Sep 30 09:42:22 2006 @@ -609,20 +609,20 @@ /*** Bit manipulation ***/ -static __attribute__((always_inline)) unsigned char _BitScanForward(unsigned long * const Index, const unsigned long Mask) +static __inline__ __attribute__((always_inline)) unsigned char _BitScanForward(unsigned long * const Index, const unsigned long Mask) { __asm__("bsfl %[Mask], %[Index]" : [Index] "=r" (*Index) : [Mask] "mr" (Mask)); return Mask ? 1 : 0; } -static __attribute__((always_inline)) unsigned char _BitScanReverse(unsigned long * const Index, const unsigned long Mask) +static __inline__ __attribute__((always_inline)) unsigned char _BitScanReverse(unsigned long * const Index, const unsigned long Mask) { __asm__("bsrl %[Mask], %[Index]" : [Index] "=r" (*Index) : [Mask] "mr" (Mask)); return Mask ? 1 : 0; } /* NOTE: again, the bizarre implementation follows Visual C++ */ -static __attribute__((always_inline)) unsigned char _bittest(const long * const a, const long b) +static __inline__ __attribute__((always_inline)) unsigned char _bittest(const long * const a, const long b) { unsigned char retval; Modified: trunk/reactos/ntoskrnl/include/internal/i386/ke.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/i386/ke.h (original) +++ trunk/reactos/ntoskrnl/include/internal/i386/ke.h Sat Sep 30 09:42:22 2006 @@ -56,9 +56,14 @@ KiInitializeGdt(struct _KPCR* Pcr); VOID Ki386ApplicationProcessorInitializeTSS(VOID); -VOID -NTAPI -Ki386InitializeTss(VOID); + +VOID +FASTCALL +Ki386InitializeTss( + IN PKTSS Tss, + IN PKIDTENTRY Idt +); + VOID KiGdtPrepareForApplicationProcessorInit(ULONG Id); VOID @@ -203,6 +208,7 @@ #define Ke386GetCr4() _Ke386GetCr(4) #define Ke386SetCr4(X) _Ke386SetCr(4,X) #define Ke386GetSs() _Ke386GetSeg(ss) +#define Ke386GetFs() _Ke386GetSeg(fs) #define Ke386SetFs(X) _Ke386SetSeg(fs, X) #define Ke386SetDs(X) _Ke386SetSeg(ds, X) #define Ke386SetEs(X) _Ke386SetSeg(es, X) Modified: trunk/reactos/ntoskrnl/include/internal/ke.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/ke.h (original) +++ trunk/reactos/ntoskrnl/include/internal/ke.h Sat Sep 30 09:42:22 2006 @@ -807,6 +807,13 @@ VOID ); + +VOID +NTAPI +KiInitializeMachineType( + VOID +); + VOID NTAPI KiFlushNPXState( Modified: trunk/reactos/ntoskrnl/ke/freeldr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/freeldr.c?rev=…
============================================================================== --- trunk/reactos/ntoskrnl/ke/freeldr.c (original) +++ trunk/reactos/ntoskrnl/ke/freeldr.c Sat Sep 30 09:42:22 2006 @@ -87,10 +87,22 @@ PIMAGE_OPTIONAL_HEADER OptHead; PLOADER_PARAMETER_BLOCK NtLoaderBlock; CHAR* s; + PKTSS Tss; + PKGDTENTRY TssEntry; /* Load the GDT and IDT */ Ke386SetGlobalDescriptorTable(KiGdtDescriptor); Ke386SetInterruptDescriptorTable(KiIdtDescriptor); + + /* Initialize the boot TSS */ + Tss = &KiBootTss; + TssEntry = &KiBootGdt[KGDT_TSS / sizeof(KGDTENTRY)]; + TssEntry->HighWord.Bits.Type = I386_TSS; + TssEntry->HighWord.Bits.Pres = 1; + TssEntry->HighWord.Bits.Dpl = 0; + TssEntry->BaseLow = (USHORT)((ULONG_PTR)Tss & 0xFFFF); + TssEntry->HighWord.Bytes.BaseMid = (UCHAR)((ULONG_PTR)Tss >> 16); + TssEntry->HighWord.Bytes.BaseHi = (UCHAR)((ULONG_PTR)Tss >> 24); /* Copy the Loader Block Data locally since Low-Memory will be wiped */ memcpy(&KeRosLoaderBlock, LoaderBlock, sizeof(ROS_LOADER_PARAMETER_BLOCK)); Modified: trunk/reactos/ntoskrnl/ke/i386/cpu.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/cpu.c?rev…
============================================================================== --- trunk/reactos/ntoskrnl/ke/i386/cpu.c (original) +++ trunk/reactos/ntoskrnl/ke/i386/cpu.c Sat Sep 30 09:42:22 2006 @@ -61,6 +61,7 @@ ULONG MxcsrFeatureMask = 0; ULONG KeI386XMMIPresent = 0; ULONG KeI386FxsrPresent = 0; +ULONG KeI386MachineType; ULONG Ke386Pae = FALSE; ULONG Ke386GlobalPagesEnabled = FALSE; ULONG Ke386NoExecute = FALSE; @@ -549,33 +550,24 @@ } VOID -NTAPI -Ki386InitializeTss(VOID) -{ - PKTSS Tss; +FASTCALL +Ki386InitializeTss(IN PKTSS Tss, + IN PKIDTENTRY Idt) +{ PKGDTENTRY TssEntry; PKIDTENTRY TaskGateEntry; PKIDT_ACCESS TaskGateAccess; /* Initialize the boot TSS. */ - Tss = &KiBootTss; TssEntry = &KiBootGdt[KGDT_TSS / sizeof(KGDTENTRY)]; KiInitializeTSS2(Tss, TssEntry); KiInitializeTSS(Tss); - /* Initialize a descriptor for the TSS */ - TssEntry->HighWord.Bits.Type = I386_TSS; - TssEntry->HighWord.Bits.Pres = 1; - TssEntry->HighWord.Bits.Dpl = 0; - TssEntry->BaseLow = (USHORT)((ULONG_PTR)Tss & 0xFFFF); - TssEntry->HighWord.Bytes.BaseMid = (UCHAR)((ULONG_PTR)Tss >> 16); - TssEntry->HighWord.Bytes.BaseHi = (UCHAR)((ULONG_PTR)Tss >> 24); - /* Load the task register */ Ke386SetTr(KGDT_TSS); /* Setup the Task Gate for Double Fault Traps */ - TaskGateEntry = &KiIdt[8]; + TaskGateEntry = &Idt[8]; TaskGateAccess = (PKIDT_ACCESS)&TaskGateEntry->Access; #if 0 TaskGateAccess->SegmentType = I386_TASK_GATE; @@ -607,7 +599,7 @@ TssEntry->LimitLow = KTSS_IO_MAPS; /* Now setup the NMI Task Gate */ - TaskGateEntry = &KiIdt[2]; + TaskGateEntry = &Idt[2]; TaskGateAccess = (PKIDT_ACCESS)&TaskGateEntry->Access; #if 0 TaskGateAccess->SegmentType = I386_TASK_GATE; @@ -763,6 +755,14 @@ Ke386GetLocalDescriptorTable(ProcessorState->SpecialRegisters.Ldtr); } +VOID +NTAPI +KiInitializeMachineType(VOID) +{ + /* Set the Machine Type we got from NTLDR */ + KeI386MachineType = KeLoaderBlock->u.I386.MachineType & 0x000FF; +} + /* PUBLIC FUNCTIONS **********************************************************/ /* Modified: trunk/reactos/ntoskrnl/ke/i386/kiinit.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/kiinit.c?…
============================================================================== --- trunk/reactos/ntoskrnl/ke/i386/kiinit.c (original) +++ trunk/reactos/ntoskrnl/ke/i386/kiinit.c Sat Sep 30 09:42:22 2006 @@ -11,6 +11,7 @@ #include <ntoskrnl.h> #define NDEBUG #include <debug.h> +#include <intrin.h> /* GLOBALS *******************************************************************/ @@ -229,11 +230,56 @@ VOID NTAPI +KiGetMachineBootPointers(IN PKGDTENTRY *Gdt, + IN PKIDTENTRY *Idt, + IN PKIPCR *Pcr, + IN PKTSS *Tss) +{ + KDESCRIPTOR GdtDescriptor, IdtDescriptor; + KGDTENTRY TssSelector, PcrSelector; + ULONG Tr, Fs; + + /* Get GDT and IDT descriptors */ + Ke386GetGlobalDescriptorTable(GdtDescriptor); + Ke386GetInterruptDescriptorTable(IdtDescriptor); + + /* Save IDT and GDT */ + *Gdt = (PKGDTENTRY)GdtDescriptor.Base; + *Idt = (PKIDTENTRY)IdtDescriptor.Base; + + /* Get TSS and FS Selectors */ + Ke386GetTr(&Tr); + if (Tr != KGDT_TSS) Tr = KGDT_TSS; // FIXME: HACKHACK + Fs = Ke386GetFs(); + + /* Get PCR Selector, mask it and get its GDT Entry */ + PcrSelector = *(PKGDTENTRY)((ULONG_PTR)*Gdt + (Fs & ~RPL_MASK)); + + /* Get the KPCR itself */ + *Pcr = (PKIPCR)(ULONG_PTR)(PcrSelector.BaseLow | + PcrSelector.HighWord.Bytes.BaseMid << 16 | + PcrSelector.HighWord.Bytes.BaseHi << 24); + + /* Get TSS Selector, mask it and get its GDT Entry */ + TssSelector = *(PKGDTENTRY)((ULONG_PTR)*Gdt + (Tr & ~RPL_MASK)); + + /* Get the KTSS itself */ + *Tss = (PKTSS)(ULONG_PTR)(TssSelector.BaseLow | + TssSelector.HighWord.Bytes.BaseMid << 16 | + TssSelector.HighWord.Bytes.BaseHi << 24); +} + +VOID +NTAPI KiSystemStartup(IN PLOADER_PARAMETER_BLOCK LoaderBlock) { ULONG Cpu; - PKIPCR Pcr = (PKIPCR)KPCR_BASE; - PKPRCB Prcb; + PKTHREAD InitialThread; + PVOID InitialStack; + PKGDTENTRY Gdt; + PKIDTENTRY Idt; + PKTSS Tss; + PKIPCR Pcr; /* Save the loader block and get the current CPU */ KeLoaderBlock = LoaderBlock; @@ -243,30 +289,47 @@ /* If this is the boot CPU, set FS and the CPU Number*/ Ke386SetFs(KGDT_R0_PCR); KeGetPcr()->Number = Cpu; + + /* Set the initial stack and idle thread as well */ + LoaderBlock->KernelStack = (ULONG_PTR)P0BootStack; + LoaderBlock->Thread = (ULONG_PTR)&KiInitialThread; } + + /* Save the initial thread and stack */ + InitialStack = (PVOID)LoaderBlock->KernelStack; + InitialThread = (PKTHREAD)LoaderBlock->Thread; + + /* Clean the APC List Head */ + InitializeListHead(&InitialThread->ApcState.ApcListHead[KernelMode]); + + /* Initialize the machine type */ + KiInitializeMachineType(); /* Skip initial setup if this isn't the Boot CPU */ if (Cpu) goto AppCpuInit; - /* Setup the boot (Freeldr should've done), double fault and NMI TSS */ - Ki386InitializeTss(); + /* Get GDT, IDT, PCR and TSS pointers */ + KiGetMachineBootPointers(&Gdt, &Idt, &Pcr, &Tss); + + /* Setup the TSS descriptors and entries */ + Ki386InitializeTss(Tss, Idt); /* Initialize the PCR */ RtlZeroMemory(Pcr, PAGE_SIZE); KiInitializePcr(Cpu, Pcr, - KiIdt, - KiBootGdt, - &KiBootTss, - &KiInitialThread.Tcb, + Idt, + Gdt, + Tss, + InitialThread, KiDoubleFaultStack); /* Set us as the current process */ - KiInitialThread.Tcb.ApcState.Process = &KiInitialProcess.Pcb; + InitialThread->ApcState.Process = &KiInitialProcess.Pcb; /* Clear DR6/7 to cleanup bootloader debugging */ - Pcr->PrcbData.ProcessorState.SpecialRegisters.KernelDr6 = 0; - Pcr->PrcbData.ProcessorState.SpecialRegisters.KernelDr7 = 0; + __writefsdword(KPCR_DR6, 0); + __writefsdword(KPCR_DR7, 0); /* Load Ring 3 selectors for DS/ES */ Ke386SetDs(KGDT_R3_DATA | RPL_MASK); @@ -274,11 +337,10 @@ /* Setup CPU-related fields */ AppCpuInit: - Prcb = Pcr->Prcb; - Pcr->Number = Cpu; - Pcr->SetMember = 1 << Cpu; - Pcr->SetMemberCopy = 1 << Cpu; - Prcb->SetMember = 1 << Cpu; + __writefsdword(KPCR_NUMBER, Cpu); + __writefsdword(KPCR_SET_MEMBER, 1 << Cpu); + __writefsdword(KPCR_SET_MEMBER_COPY, 1 << Cpu); + __writefsdword(KPCR_PRCB_SET_MEMBER, 1 << Cpu); /* Initialize the Processor with HAL */ HalInitializeProcessor(Cpu, KeLoaderBlock); @@ -296,11 +358,11 @@ /* Raise to HIGH_LEVEL */ KfRaiseIrql(HIGH_LEVEL); - /* Call main kernel intialization */ + /* Call main kernel initialization */ KiInitializeKernel(&KiInitialProcess.Pcb, - &KiInitialThread.Tcb, - P0BootStack, - Prcb, + InitialThread, + InitialStack, + &Pcr->PrcbData, //(PKPRCB)__readfsdword(KPCR_PRCB), Cpu, LoaderBlock); @@ -314,4 +376,3 @@ KiIdleLoop(); } -
18 years, 2 months
1
0
0
0
[ion] 24305: - Use LOADER_PARAMETER_BLOCK everywhere in ReactOS except freeldr.c - Implemented KiRosFrldrLpbtoNtLpb to do a lightweight conversion and setup. Next patches will try to get rid of PLOADER_MODULE and use LDR_DATA_TABLE_ENTRY as well as increase bootstrap compatibility.
by ion@svn.reactos.org
Author: ion Date: Sat Sep 30 07:33:50 2006 New Revision: 24305 URL:
http://svn.reactos.org/svn/reactos?rev=24305&view=rev
Log: - Use LOADER_PARAMETER_BLOCK everywhere in ReactOS except freeldr.c - Implemented KiRosFrldrLpbtoNtLpb to do a lightweight conversion and setup. Next patches will try to get rid of PLOADER_MODULE and use LDR_DATA_TABLE_ENTRY as well as increase bootstrap compatibility. Modified: trunk/reactos/hal/halx86/generic/display.c trunk/reactos/hal/halx86/generic/halinit.c trunk/reactos/hal/halx86/include/halp.h trunk/reactos/hal/halx86/up/halinit_up.c trunk/reactos/include/ndk/ketypes.h trunk/reactos/include/reactos/rosldr.h trunk/reactos/ntoskrnl/cm/registry.c trunk/reactos/ntoskrnl/ex/init.c trunk/reactos/ntoskrnl/include/internal/io.h trunk/reactos/ntoskrnl/include/internal/ke.h trunk/reactos/ntoskrnl/include/internal/ntoskrnl.h trunk/reactos/ntoskrnl/include/internal/po.h trunk/reactos/ntoskrnl/io/iomgr/disk.c trunk/reactos/ntoskrnl/io/iomgr/driver.c trunk/reactos/ntoskrnl/io/iomgr/iomgr.c trunk/reactos/ntoskrnl/kd/kdinit.c trunk/reactos/ntoskrnl/kdbg/kdb_symbols.c trunk/reactos/ntoskrnl/ke/freeldr.c trunk/reactos/ntoskrnl/ke/i386/kiinit.c trunk/reactos/ntoskrnl/ke/krnlinit.c trunk/reactos/ntoskrnl/mm/freelist.c trunk/reactos/ntoskrnl/mm/mminit.c trunk/reactos/ntoskrnl/po/power.c Modified: trunk/reactos/hal/halx86/generic/display.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/generic/display…
============================================================================== --- trunk/reactos/hal/halx86/generic/display.c (original) +++ trunk/reactos/hal/halx86/generic/display.c Sat Sep 30 07:33:50 2006 @@ -571,7 +571,7 @@ /* PRIVATE FUNCTIONS ********************************************************/ VOID FASTCALL -HalInitializeDisplay (PROS_LOADER_PARAMETER_BLOCK LoaderBlock) +HalInitializeDisplay (PLOADER_PARAMETER_BLOCK LoaderBlock) /* * FUNCTION: Initalize the display * ARGUMENTS: Modified: trunk/reactos/hal/halx86/generic/halinit.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/generic/halinit…
============================================================================== --- trunk/reactos/hal/halx86/generic/halinit.c (original) +++ trunk/reactos/hal/halx86/generic/halinit.c Sat Sep 30 07:33:50 2006 @@ -38,7 +38,7 @@ if (BootPhase == 0) { RtlZeroMemory(&HalpHooks, sizeof(HALP_HOOKS)); - HalpInitPhase0((PROS_LOADER_PARAMETER_BLOCK)LoaderBlock); + HalpInitPhase0(LoaderBlock); } else if (BootPhase == 1) { @@ -46,7 +46,7 @@ //HalpInitPhase1(); /* Initialize display and make the screen black */ - HalInitializeDisplay ((PROS_LOADER_PARAMETER_BLOCK)LoaderBlock); + HalInitializeDisplay (LoaderBlock); HalpInitBusHandlers(); HalpInitDma(); Modified: trunk/reactos/hal/halx86/include/halp.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/include/halp.h?…
============================================================================== --- trunk/reactos/hal/halx86/include/halp.h (original) +++ trunk/reactos/hal/halx86/include/halp.h Sat Sep 30 07:33:50 2006 @@ -19,7 +19,7 @@ } KD_PORT_INFORMATION, *PKD_PORT_INFORMATION; /* display.c */ -VOID FASTCALL HalInitializeDisplay (struct _ROS_LOADER_PARAMETER_BLOCK *LoaderBlock); +VOID FASTCALL HalInitializeDisplay (struct _LOADER_PARAMETER_BLOCK *LoaderBlock); VOID FASTCALL HalClearDisplay (UCHAR CharAttribute); /* adapter.c */ @@ -47,7 +47,7 @@ PVOID HalpMapPhysMemory(ULONG PhysAddr, ULONG Size); /* Non-generic initialization */ -VOID HalpInitPhase0 (PROS_LOADER_PARAMETER_BLOCK LoaderBlock); +VOID HalpInitPhase0 (PLOADER_PARAMETER_BLOCK LoaderBlock); VOID HalpInitPhase1(VOID); VOID NTAPI HalpClockInterrupt(VOID); Modified: trunk/reactos/hal/halx86/up/halinit_up.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/up/halinit_up.c…
============================================================================== --- trunk/reactos/hal/halx86/up/halinit_up.c (original) +++ trunk/reactos/hal/halx86/up/halinit_up.c Sat Sep 30 07:33:50 2006 @@ -18,7 +18,7 @@ /* FUNCTIONS ***************************************************************/ VOID -HalpInitPhase0(PROS_LOADER_PARAMETER_BLOCK LoaderBlock) +HalpInitPhase0(PLOADER_PARAMETER_BLOCK LoaderBlock) { HalpInitPICs(); Modified: trunk/reactos/include/ndk/ketypes.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/ketypes.h?rev=…
============================================================================== --- trunk/reactos/include/ndk/ketypes.h (original) +++ trunk/reactos/include/ndk/ketypes.h Sat Sep 30 07:33:50 2006 @@ -974,11 +974,7 @@ // // Exported Loader Parameter Block // -#ifndef _REACTOS_ extern struct _LOADER_PARAMETER_BLOCK NTSYSAPI *KeLoaderBlock; -#else -extern struct _ROS_LOADER_PARAMETER_BLOCK NTSYSAPI KeLoaderBlock; -#endif // // Exported Hardware Data Modified: trunk/reactos/include/reactos/rosldr.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/rosldr.h?r…
============================================================================== --- trunk/reactos/include/reactos/rosldr.h (original) +++ trunk/reactos/include/reactos/rosldr.h Sat Sep 30 07:33:50 2006 @@ -44,4 +44,10 @@ ULONG KernelBase; } ROS_LOADER_PARAMETER_BLOCK, *PROS_LOADER_PARAMETER_BLOCK; +extern LOADER_MODULE KeLoaderModules[64]; +extern ULONG KeLoaderModuleCount; +extern ULONG MmFreeLdrMemHigher, MmFreeLdrMemLower; +extern BOOLEAN AcpiTableDetected; +extern ULONG MmFreeLdrPageDirectoryStart, MmFreeLdrPageDirectoryEnd; + #endif Modified: trunk/reactos/ntoskrnl/cm/registry.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/cm/registry.c?rev…
============================================================================== --- trunk/reactos/ntoskrnl/cm/registry.c (original) +++ trunk/reactos/ntoskrnl/cm/registry.c Sat Sep 30 07:33:50 2006 @@ -153,7 +153,7 @@ CmImportHardwareHive (NULL, 0); /* Initialize volatile registry settings */ - if (SetupBoot == FALSE) CmInit2((PCHAR)KeLoaderBlock.CommandLine); + if (SetupBoot == FALSE) CmInit2(KeLoaderBlock->LoadOptions); } VOID Modified: trunk/reactos/ntoskrnl/ex/init.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/init.c?rev=243…
============================================================================== --- trunk/reactos/ntoskrnl/ex/init.c (original) +++ trunk/reactos/ntoskrnl/ex/init.c Sat Sep 30 07:33:50 2006 @@ -292,7 +292,7 @@ PCHAR Name; /* Loop the Module List and get the modules we want */ - for (i = 1; i < KeLoaderBlock.ModsCount; i++) { + for (i = 1; i < KeLoaderModuleCount; i++) { /* Get the Name of this Module */ if (!(Name = strrchr((PCHAR)KeLoaderModules[i].String, '\\'))) { @@ -341,7 +341,7 @@ { PCHAR p1, p2; - p1 = (PCHAR)KeLoaderBlock.CommandLine; + p1 = KeLoaderBlock->LoadOptions; while(*p1 && (p2 = strchr(p1, '/'))) { p2++; @@ -429,7 +429,7 @@ sprintf(str, "Found %x system processor(s). [%lu MB Memory]\n", (int)KeNumberProcessors, - (KeLoaderBlock.MemHigher + 1088)/ 1024); + (MmFreeLdrMemHigher + 1088)/ 1024); HalDisplayString(str); } @@ -527,7 +527,7 @@ ExecuteRuntimeAsserts(); /* Initialize HAL */ - HalInitSystem (0, (PLOADER_PARAMETER_BLOCK)&KeLoaderBlock); + HalInitSystem (0, KeLoaderBlock); /* Sets up the Text Sections of the Kernel and HAL for debugging */ LdrInit1(); @@ -586,7 +586,7 @@ HalAllProcessorsStarted(); /* Do Phase 1 HAL Initalization */ - HalInitSystem(1, (PLOADER_PARAMETER_BLOCK)&KeLoaderBlock); + HalInitSystem(1, KeLoaderBlock); } VOID @@ -614,13 +614,13 @@ ExpInitializeCallbacks(); /* Call KD Providers at Phase 1 */ - KdInitSystem(1, (PROS_LOADER_PARAMETER_BLOCK)&KeLoaderBlock); + KdInitSystem(1, KeLoaderBlock); /* Initialize I/O Objects, Filesystems, Error Logging and Shutdown */ IoInit(); /* TBD */ - PoInit((PROS_LOADER_PARAMETER_BLOCK)&KeLoaderBlock, ForceAcpiDisable); + PoInit(AcpiTableDetected, ForceAcpiDisable); /* Initialize the Registry (Hives are NOT yet loaded!) */ CmInitializeRegistry(); @@ -638,13 +638,13 @@ HalReportResourceUsage(); /* Clear the screen to blue */ - HalInitSystem(2, (PLOADER_PARAMETER_BLOCK)&KeLoaderBlock); + HalInitSystem(2, KeLoaderBlock); /* Display version number and copyright/warranty message */ if (NoGuiBoot) ExpDisplayNotice(); /* Call KD Providers at Phase 2 */ - KdInitSystem(2, (PROS_LOADER_PARAMETER_BLOCK)&KeLoaderBlock); + KdInitSystem(2, KeLoaderBlock); /* Import and create NLS Data and Sections */ RtlpInitNls(); @@ -675,7 +675,7 @@ PsLocateSystemDll(); /* Initialize shared user page. Set dos system path, dos device map, etc. */ - InitSystemSharedUserPage ((PCHAR)KeLoaderBlock.CommandLine); + InitSystemSharedUserPage (KeLoaderBlock->LoadOptions); /* Create 'ReactOSInitDone' event */ RtlInitUnicodeString(&EventName, L"\\ReactOSInitDone"); Modified: trunk/reactos/ntoskrnl/include/internal/io.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/io.h (original) +++ trunk/reactos/ntoskrnl/include/internal/io.h Sat Sep 30 07:33:50 2006 @@ -978,7 +978,7 @@ VOID FASTCALL xHalIoAssignDriveLetters( - IN PROS_LOADER_PARAMETER_BLOCK LoaderBlock, + IN PLOADER_PARAMETER_BLOCK LoaderBlock, IN PSTRING NtDeviceName, OUT PUCHAR NtSystemPath, OUT PSTRING NtSystemPathString Modified: trunk/reactos/ntoskrnl/include/internal/ke.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/ke.h (original) +++ trunk/reactos/ntoskrnl/include/internal/ke.h Sat Sep 30 07:33:50 2006 @@ -661,7 +661,7 @@ VOID NTAPI KiSystemStartup( - IN PROS_LOADER_PARAMETER_BLOCK LoaderBlock + IN PLOADER_PARAMETER_BLOCK LoaderBlock ); VOID Modified: trunk/reactos/ntoskrnl/include/internal/ntoskrnl.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/ntoskrnl.h (original) +++ trunk/reactos/ntoskrnl/include/internal/ntoskrnl.h Sat Sep 30 07:33:50 2006 @@ -59,7 +59,7 @@ /* * Initalization functions (called once by main()) */ -VOID MmInitSystem(ULONG Phase, PROS_LOADER_PARAMETER_BLOCK LoaderBlock, ULONG LastKernelAddress); +VOID MmInitSystem(ULONG Phase, PLOADER_PARAMETER_BLOCK LoaderBlock, ULONG LastKernelAddress); VOID IoInit(VOID); VOID IoInit2(BOOLEAN BootLog); VOID NTAPI IoInit3(VOID); @@ -71,7 +71,7 @@ VOID CmShutdownRegistry(VOID); BOOLEAN CmImportSystemHive(PCHAR ChunkBase, ULONG ChunkSize); BOOLEAN CmImportHardwareHive(PCHAR ChunkBase, ULONG ChunkSize); -VOID KdInitSystem(ULONG Reserved, PROS_LOADER_PARAMETER_BLOCK LoaderBlock); +VOID KdInitSystem(ULONG Reserved, PLOADER_PARAMETER_BLOCK LoaderBlock); /* FIXME - RtlpCreateUnicodeString is obsolete and should be removed ASAP! */ BOOLEAN FASTCALL Modified: trunk/reactos/ntoskrnl/include/internal/po.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/po.h (original) +++ trunk/reactos/ntoskrnl/include/internal/po.h Sat Sep 30 07:33:50 2006 @@ -38,7 +38,7 @@ VOID NTAPI PoInit( - PROS_LOADER_PARAMETER_BLOCK LoaderBlock, + BOOLEAN HaveAcpiTable, BOOLEAN ForceAcpiDisable ); Modified: trunk/reactos/ntoskrnl/io/iomgr/disk.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/disk.c?r…
============================================================================== --- trunk/reactos/ntoskrnl/io/iomgr/disk.c (original) +++ trunk/reactos/ntoskrnl/io/iomgr/disk.c Sat Sep 30 07:33:50 2006 @@ -616,7 +616,7 @@ VOID FASTCALL -xHalIoAssignDriveLetters(IN PROS_LOADER_PARAMETER_BLOCK LoaderBlock, +xHalIoAssignDriveLetters(IN PLOADER_PARAMETER_BLOCK LoaderBlock, IN PSTRING NtDeviceName, OUT PUCHAR NtSystemPath, OUT PSTRING NtSystemPathString) Modified: trunk/reactos/ntoskrnl/io/iomgr/driver.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/driver.c…
============================================================================== --- trunk/reactos/ntoskrnl/io/iomgr/driver.c (original) +++ trunk/reactos/ntoskrnl/io/iomgr/driver.c Sat Sep 30 07:33:50 2006 @@ -465,8 +465,6 @@ ULONG i; CHAR SearchName[256]; PCHAR ModuleName; - PLOADER_MODULE KeLoaderModules = - (PLOADER_MODULE)KeLoaderBlock.ModsAddr; /* * FIXME: @@ -476,7 +474,7 @@ */ _snprintf(SearchName, sizeof(SearchName), "%wZ.sys", ServiceName); - for (i = 1; i < KeLoaderBlock.ModsCount; i++) + for (i = 1; i < KeLoaderModuleCount; i++) { ModuleName = (PCHAR)KeLoaderModules[i].String; if (!_stricmp(ModuleName, SearchName)) @@ -940,7 +938,6 @@ ULONG ModuleLoaded; PCHAR ModuleName; PCHAR Extension; - PLOADER_MODULE KeLoaderModules = (PLOADER_MODULE)KeLoaderBlock.ModsAddr; ULONG i; UNICODE_STRING DriverName; NTSTATUS Status; @@ -948,7 +945,7 @@ DPRINT("IopInitializeBootDrivers()\n"); BootDriverCount = 0; - for (i = 0; i < KeLoaderBlock.ModsCount; i++) + for (i = 0; i < KeLoaderModuleCount; i++) { ModuleStart = KeLoaderModules[i].ModStart; ModuleSize = KeLoaderModules[i].ModEnd - ModuleStart; @@ -988,13 +985,13 @@ /* * Free memory for all boot files, except ntoskrnl.exe. */ - for (i = 1; i < KeLoaderBlock.ModsCount; i++) + for (i = 1; i < KeLoaderModuleCount; i++) { MiFreeBootDriverMemory((PVOID)KeLoaderModules[i].ModStart, KeLoaderModules[i].ModEnd - KeLoaderModules[i].ModStart); } - KeLoaderBlock.ModsCount = 0; + KeLoaderModuleCount = 0; if (BootDriverCount == 0) { Modified: trunk/reactos/ntoskrnl/io/iomgr/iomgr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/iomgr.c?…
============================================================================== --- trunk/reactos/ntoskrnl/io/iomgr/iomgr.c (original) +++ trunk/reactos/ntoskrnl/io/iomgr/iomgr.c Sat Sep 30 07:33:50 2006 @@ -482,8 +482,8 @@ IoCreateArcNames(); /* Create the SystemRoot symbolic link */ - DPRINT("CommandLine: %s\n", (PCHAR)KeLoaderBlock.CommandLine); - Status = IoCreateSystemRootLink((PCHAR)KeLoaderBlock.CommandLine); + DPRINT("CommandLine: %s\n", KeLoaderBlock->LoadOptions); + Status = IoCreateSystemRootLink(KeLoaderBlock->LoadOptions); if (!NT_SUCCESS(Status)) { CPRINT("IoCreateSystemRootLink FAILED: (0x%x) - ", Status); KEBUGCHECK(INACCESSIBLE_BOOT_DEVICE); @@ -493,7 +493,7 @@ KdbInit(); /* I/O is now setup for disk access, so phase 3 */ - KdInitSystem(3, (PROS_LOADER_PARAMETER_BLOCK)&KeLoaderBlock); + KdInitSystem(3, KeLoaderBlock); /* Load services for devices found by PnP manager */ IopInitializePnpServices(IopRootDeviceNode, FALSE); @@ -509,7 +509,7 @@ IopStopBootLog(); /* Assign drive letters */ - IoAssignDriveLetters((PLOADER_PARAMETER_BLOCK)&KeLoaderBlock, + IoAssignDriveLetters(KeLoaderBlock, NULL, NULL, NULL); Modified: trunk/reactos/ntoskrnl/kd/kdinit.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/kd/kdinit.c?rev=2…
============================================================================== --- trunk/reactos/ntoskrnl/kd/kdinit.c (original) +++ trunk/reactos/ntoskrnl/kd/kdinit.c Sat Sep 30 07:33:50 2006 @@ -44,7 +44,7 @@ PCHAR STDCALL KdpGetWrapperDebugMode(PCHAR Currentp2, - PROS_LOADER_PARAMETER_BLOCK LoaderBlock) + PLOADER_PARAMETER_BLOCK LoaderBlock) { PCHAR p2 = Currentp2; @@ -77,7 +77,7 @@ /* Get the KDBG Settings and enable it */ KdDebuggerEnabled = TRUE; KdDebuggerNotPresent = FALSE; - KdbpGetCommandLineSettings((PCHAR)LoaderBlock->CommandLine); + KdbpGetCommandLineSettings(LoaderBlock->LoadOptions); #endif return p2; } @@ -162,7 +162,7 @@ VOID INIT_FUNCTION KdInitSystem(ULONG BootPhase, - PROS_LOADER_PARAMETER_BLOCK LoaderBlock) + PLOADER_PARAMETER_BLOCK LoaderBlock) { ULONG Value; ULONG i; @@ -173,7 +173,7 @@ { /* Parse the Command Line */ - p1 = (PCHAR)LoaderBlock->CommandLine; + p1 = LoaderBlock->LoadOptions; while (p1 && (p2 = strchr(p1, '/'))) { /* Move past the slash */ Modified: trunk/reactos/ntoskrnl/kdbg/kdb_symbols.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/kdbg/kdb_symbols.…
============================================================================== --- trunk/reactos/ntoskrnl/kdbg/kdb_symbols.c (original) +++ trunk/reactos/ntoskrnl/kdbg/kdb_symbols.c Sat Sep 30 07:33:50 2006 @@ -592,7 +592,6 @@ { PLDR_DATA_TABLE_ENTRY ModuleObject; UNICODE_STRING UnicodeString; - PLOADER_MODULE KeLoaderModules = (PLOADER_MODULE)KeLoaderBlock.ModsAddr; ANSI_STRING AnsiString; ULONG i; BOOLEAN IsRaw; @@ -621,14 +620,14 @@ return; } - for (i = 0; i < KeLoaderBlock.ModsCount; i++) + for (i = 0; i < KeLoaderModuleCount; i++) { if (0 == _stricmp(FileName, (PCHAR)KeLoaderModules[i].String)) { break; } } - if (i < KeLoaderBlock.ModsCount) + if (i < KeLoaderModuleCount) { KeLoaderModules[i].Reserved = 1; if (ModuleObject->PatchInformation != NULL) @@ -697,7 +696,7 @@ /* Check the command line for /LOADSYMBOLS, /NOLOADSYMBOLS, * /LOADSYMBOLS={YES|NO}, /NOLOADSYMBOLS={YES|NO} */ - p1 = (PCHAR) KeLoaderBlock.CommandLine; + p1 = KeLoaderBlock->LoadOptions; while('\0' != *p1 && NULL != (p2 = strchr(p1, '/'))) { p2++; Modified: trunk/reactos/ntoskrnl/ke/freeldr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/freeldr.c?rev=…
============================================================================== --- trunk/reactos/ntoskrnl/ke/freeldr.c (original) +++ trunk/reactos/ntoskrnl/ke/freeldr.c Sat Sep 30 07:33:50 2006 @@ -16,6 +16,7 @@ /* FreeLDR Module Data */ LOADER_MODULE KeLoaderModules[64]; +ULONG KeLoaderModuleCount; static CHAR KeLoaderModuleStrings[64][256]; PLOADER_MODULE CachedModules[MaximumCachedModuleType]; @@ -25,17 +26,53 @@ ULONG_PTR FirstKrnlPhysAddr; ULONG_PTR LastKrnlPhysAddr; ULONG_PTR LastKernelAddress; +ULONG MmFreeLdrMemHigher, MmFreeLdrMemLower; +ULONG MmFreeLdrPageDirectoryStart, MmFreeLdrPageDirectoryEnd; /* FreeLDR Loader Data */ -ROS_LOADER_PARAMETER_BLOCK KeLoaderBlock; +ROS_LOADER_PARAMETER_BLOCK KeRosLoaderBlock; static CHAR KeLoaderCommandLine[256]; +BOOLEAN AcpiTableDetected; /* FreeLDR PE Hack Data */ extern unsigned int _image_base__; ULONG_PTR KERNEL_BASE = (ULONG_PTR)&_image_base__; extern LDR_DATA_TABLE_ENTRY HalModuleObject; +/* NT Loader Data */ +LOADER_PARAMETER_BLOCK BldrLoaderBlock; +CHAR BldrCommandLine[256]; + /* FUNCTIONS *****************************************************************/ + +VOID +NTAPI +KiRosFrldrLpbToNtLpb(IN PROS_LOADER_PARAMETER_BLOCK RosLoaderBlock, + IN PLOADER_PARAMETER_BLOCK *NtLoaderBlock) +{ + PLOADER_PARAMETER_BLOCK LoaderBlock; + + /* First get some kernel-loader globals */ + AcpiTableDetected = (RosLoaderBlock->Flags & MB_FLAGS_ACPI_TABLE) ? TRUE : FALSE; + MmFreeLdrMemHigher = RosLoaderBlock->MemHigher; + MmFreeLdrMemLower = RosLoaderBlock->MemLower; + MmFreeLdrPageDirectoryStart = RosLoaderBlock->PageDirectoryStart; + MmFreeLdrPageDirectoryEnd = RosLoaderBlock->PageDirectoryEnd; + KeLoaderModuleCount = RosLoaderBlock->ModsCount; + + /* Set the NT Loader block and initialize it */ + *NtLoaderBlock = LoaderBlock = &BldrLoaderBlock; + RtlZeroMemory(LoaderBlock, sizeof(LOADER_PARAMETER_BLOCK)); + + /* Setup the list heads */ + InitializeListHead(&LoaderBlock->LoadOrderListHead); + InitializeListHead(&LoaderBlock->MemoryDescriptorListHead); + InitializeListHead(&LoaderBlock->BootDriverListHead); + + /* Setup command line */ + LoaderBlock->LoadOptions = BldrCommandLine; + strcpy(BldrCommandLine, KeLoaderCommandLine); +} VOID NTAPI @@ -48,6 +85,7 @@ ULONG DriverSize; PIMAGE_NT_HEADERS NtHeader; PIMAGE_OPTIONAL_HEADER OptHead; + PLOADER_PARAMETER_BLOCK NtLoaderBlock; CHAR* s; /* Load the GDT and IDT */ @@ -55,27 +93,27 @@ Ke386SetInterruptDescriptorTable(KiIdtDescriptor); /* Copy the Loader Block Data locally since Low-Memory will be wiped */ - memcpy(&KeLoaderBlock, LoaderBlock, sizeof(ROS_LOADER_PARAMETER_BLOCK)); + memcpy(&KeRosLoaderBlock, LoaderBlock, sizeof(ROS_LOADER_PARAMETER_BLOCK)); memcpy(&KeLoaderModules[1], - (PVOID)KeLoaderBlock.ModsAddr, - sizeof(LOADER_MODULE) * KeLoaderBlock.ModsCount); - KeLoaderBlock.ModsCount++; - KeLoaderBlock.ModsAddr = (ULONG)&KeLoaderModules; + (PVOID)KeRosLoaderBlock.ModsAddr, + sizeof(LOADER_MODULE) * KeRosLoaderBlock.ModsCount); + KeRosLoaderBlock.ModsCount++; + KeRosLoaderBlock.ModsAddr = (ULONG)&KeLoaderModules; /* Check for BIOS memory map */ KeMemoryMapRangeCount = 0; - if (KeLoaderBlock.Flags & MB_FLAGS_MMAP_INFO) + if (KeRosLoaderBlock.Flags & MB_FLAGS_MMAP_INFO) { /* We have a memory map from the nice BIOS */ - size = *((PULONG)(KeLoaderBlock.MmapAddr - sizeof(ULONG))); + size = *((PULONG)(KeRosLoaderBlock.MmapAddr - sizeof(ULONG))); i = 0; /* Map it until we run out of size */ - while (i < KeLoaderBlock.MmapLength) + while (i < KeRosLoaderBlock.MmapLength) { /* Copy into the Kernel Memory Map */ memcpy (&KeMemoryMap[KeMemoryMapRangeCount], - (PVOID)(KeLoaderBlock.MmapAddr + i), + (PVOID)(KeRosLoaderBlock.MmapAddr + i), sizeof(ADDRESS_RANGE)); /* Increase Memory Map Count */ @@ -86,23 +124,23 @@ } /* Save data */ - KeLoaderBlock.MmapLength = KeMemoryMapRangeCount * + KeRosLoaderBlock.MmapLength = KeMemoryMapRangeCount * sizeof(ADDRESS_RANGE); - KeLoaderBlock.MmapAddr = (ULONG)KeMemoryMap; + KeRosLoaderBlock.MmapAddr = (ULONG)KeMemoryMap; } else { /* Nothing from BIOS */ - KeLoaderBlock.MmapLength = 0; - KeLoaderBlock.MmapAddr = (ULONG)KeMemoryMap; + KeRosLoaderBlock.MmapLength = 0; + KeRosLoaderBlock.MmapAddr = (ULONG)KeMemoryMap; } /* Save the Base Address */ - MmSystemRangeStart = (PVOID)KeLoaderBlock.KernelBase; + MmSystemRangeStart = (PVOID)KeRosLoaderBlock.KernelBase; /* Set the Command Line */ strcpy(KeLoaderCommandLine, (PCHAR)LoaderBlock->CommandLine); - KeLoaderBlock.CommandLine = (ULONG)KeLoaderCommandLine; + KeRosLoaderBlock.CommandLine = (ULONG)KeLoaderCommandLine; /* Write the first Module (the Kernel) */ strcpy(KeLoaderModuleStrings[0], "ntoskrnl.exe"); @@ -118,7 +156,7 @@ PAGE_ROUND_UP((ULONG)OptHead->SizeOfImage); /* Create a block for each module */ - for (i = 1; i < KeLoaderBlock.ModsCount; i++) + for (i = 1; i < KeRosLoaderBlock.ModsCount; i++) { /* Check if we have to copy the path or not */ if ((s = strrchr((PCHAR)KeLoaderModules[i].String, '/')) != 0) @@ -147,7 +185,7 @@ } /* Choose last module address as the final kernel address */ - LastKernelAddress = PAGE_ROUND_UP(KeLoaderModules[KeLoaderBlock. + LastKernelAddress = PAGE_ROUND_UP(KeLoaderModules[KeRosLoaderBlock. ModsCount - 1].ModEnd); /* Select the HAL Base */ @@ -196,8 +234,11 @@ (PVOID)DriverBase, &DriverSize); + /* Convert the loader block */ + KiRosFrldrLpbToNtLpb(&KeRosLoaderBlock, &NtLoaderBlock); + /* Do general System Startup */ - KiSystemStartup(LoaderBlock); + KiSystemStartup(NtLoaderBlock); } /* EOF */ Modified: trunk/reactos/ntoskrnl/ke/i386/kiinit.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/kiinit.c?…
============================================================================== --- trunk/reactos/ntoskrnl/ke/i386/kiinit.c (original) +++ trunk/reactos/ntoskrnl/ke/i386/kiinit.c Sat Sep 30 07:33:50 2006 @@ -82,7 +82,7 @@ IN PVOID IdleStack, IN PKPRCB Prcb, IN CCHAR Number, - IN PROS_LOADER_PARAMETER_BLOCK LoaderBlock) + IN PLOADER_PARAMETER_BLOCK LoaderBlock) { BOOLEAN NpxPresent; ULONG FeatureBits; @@ -229,14 +229,14 @@ VOID NTAPI -KiSystemStartup(IN PROS_LOADER_PARAMETER_BLOCK LoaderBlock) +KiSystemStartup(IN PLOADER_PARAMETER_BLOCK LoaderBlock) { ULONG Cpu; PKIPCR Pcr = (PKIPCR)KPCR_BASE; PKPRCB Prcb; /* Save the loader block and get the current CPU */ - //KeLoaderBlock = LoaderBlock; + KeLoaderBlock = LoaderBlock; Cpu = KeNumberProcessors; if (!Cpu) { @@ -281,14 +281,14 @@ Prcb->SetMember = 1 << Cpu; /* Initialize the Processor with HAL */ - HalInitializeProcessor(Cpu, (PLOADER_PARAMETER_BLOCK)&KeLoaderBlock); + HalInitializeProcessor(Cpu, KeLoaderBlock); /* Set active processors */ KeActiveProcessors |= Pcr->SetMember; KeNumberProcessors++; /* Initialize the Debugger for the Boot CPU */ - if (!Cpu) KdInitSystem (0, &KeLoaderBlock); + if (!Cpu) KdInitSystem (0, KeLoaderBlock); /* Check for break-in */ if (KdPollBreakIn()) DbgBreakPointWithStatus(1); @@ -314,3 +314,4 @@ KiIdleLoop(); } + Modified: trunk/reactos/ntoskrnl/ke/krnlinit.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/krnlinit.c?rev…
============================================================================== --- trunk/reactos/ntoskrnl/ke/krnlinit.c (original) +++ trunk/reactos/ntoskrnl/ke/krnlinit.c Sat Sep 30 07:33:50 2006 @@ -14,6 +14,9 @@ #include <internal/napi.h> /* GLOBALS *******************************************************************/ + +/* ARC Loader Block */ +PLOADER_PARAMETER_BLOCK KeLoaderBlock; /* PRCB Array */ PKPRCB KiProcessorBlock[MAXIMUM_PROCESSORS]; Modified: trunk/reactos/ntoskrnl/mm/freelist.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/freelist.c?rev…
============================================================================== --- trunk/reactos/ntoskrnl/mm/freelist.c (original) +++ trunk/reactos/ntoskrnl/mm/freelist.c Sat Sep 30 07:33:50 2006 @@ -455,7 +455,7 @@ MmStats.NrReservedPages++; } /* Protect the Page Directory. This will be changed in r3 */ - else if (j >= (KeLoaderBlock.PageDirectoryStart / PAGE_SIZE) && j < (KeLoaderBlock.PageDirectoryEnd / PAGE_SIZE)) + else if (j >= (MmFreeLdrPageDirectoryStart / PAGE_SIZE) && j < (MmFreeLdrPageDirectoryEnd / PAGE_SIZE)) { MmPageArray[j].Flags.Type = MM_PHYSICAL_PAGE_BIOS; MmPageArray[j].Flags.Zero = 0; Modified: trunk/reactos/ntoskrnl/mm/mminit.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/mminit.c?rev=2…
============================================================================== --- trunk/reactos/ntoskrnl/mm/mminit.c (original) +++ trunk/reactos/ntoskrnl/mm/mminit.c Sat Sep 30 07:33:50 2006 @@ -317,15 +317,15 @@ last = (BIOSMemoryMap[i].BaseAddrLow + BIOSMemoryMap[i].LengthLow + PAGE_SIZE -1) / PAGE_SIZE; } } - if ((last - 256) * 4 > KeLoaderBlock.MemHigher) + if ((last - 256) * 4 > MmFreeLdrMemHigher) { - KeLoaderBlock.MemHigher = (last - 256) * 4; + MmFreeLdrMemHigher = (last - 256) * 4; } } - if (KeLoaderBlock.MemHigher >= (MaxMem - 1) * 1024) - { - KeLoaderBlock.MemHigher = (MaxMem - 1) * 1024; + if (MmFreeLdrMemHigher >= (MaxMem - 1) * 1024) + { + MmFreeLdrMemHigher = (MaxMem - 1) * 1024; } /* Set memory limits */ @@ -357,7 +357,7 @@ /* * Free physical memory not used by the kernel */ - MmStats.NrTotalPages = KeLoaderBlock.MemHigher/4; + MmStats.NrTotalPages = MmFreeLdrMemHigher/4; if (!MmStats.NrTotalPages) { DbgPrint("Memory not detected, default to 8 MB\n"); Modified: trunk/reactos/ntoskrnl/po/power.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/po/power.c?rev=24…
============================================================================== --- trunk/reactos/ntoskrnl/po/power.c (original) +++ trunk/reactos/ntoskrnl/po/power.c Sat Sep 30 07:33:50 2006 @@ -176,11 +176,12 @@ return STATUS_PENDING; } -VOID -STDCALL -PoSetDeviceBusy( - PULONG IdlePointer) -{ +#undef PoSetDeviceBusy +VOID +NTAPI +PoSetDeviceBusy(IN PULONG IdlePointer) +{ + *IdlePointer = 0; } VOID @@ -305,7 +306,7 @@ VOID INIT_FUNCTION NTAPI -PoInit(PROS_LOADER_PARAMETER_BLOCK LoaderBlock, +PoInit(BOOLEAN HaveAcpiTable, BOOLEAN ForceAcpiDisable) { PVOID NotificationEntry; @@ -318,7 +319,7 @@ else { /* Otherwise check the LoaderBlock's Flag */ - PopAcpiPresent = (LoaderBlock->Flags & MB_FLAGS_ACPI_TABLE) ? TRUE : FALSE; + PopAcpiPresent = HaveAcpiTable; } IoRegisterPlugPlayNotification(
18 years, 2 months
1
0
0
0
[amunger] 24304: Merge 24208, 24236, 24242, and 24259 from trunk. LiveCD fixes.
by amunger@svn.reactos.org
Author: amunger Date: Sat Sep 30 06:54:20 2006 New Revision: 24304 URL:
http://svn.reactos.org/svn/reactos?rev=24304&view=rev
Log: Merge 24208, 24236, 24242, and 24259 from trunk. LiveCD fixes. Modified: branches/ros-branch-0_3_1/reactos/Makefile branches/ros-branch-0_3_1/reactos/config.rbuild branches/ros-branch-0_3_1/reactos/tools/buildno/buildno.cpp branches/ros-branch-0_3_1/reactos/tools/mkhive/cmi.c branches/ros-branch-0_3_1/reactos/tools/mkhive/mkhive.mak branches/ros-branch-0_3_1/reactos/tools/mkhive/registry.c branches/ros-branch-0_3_1/reactos/tools/mkhive/rtl.c branches/ros-branch-0_3_1/reactos/tools/widl/widl.mak Modified: branches/ros-branch-0_3_1/reactos/Makefile URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_1/reactos/Makefi…
============================================================================== --- branches/ros-branch-0_3_1/reactos/Makefile (original) +++ branches/ros-branch-0_3_1/reactos/Makefile Sat Sep 30 06:54:20 2006 @@ -152,11 +152,15 @@ ifeq ($(findstring msys,$(shell sh --version 2>nul)),msys) export OSTYPE = msys HOST=mingw32-linux +CFLAGS+=-fshort-wchar +CPPFLAGS+=-fshort-wchar else HOST=mingw32-windows endif else HOST=mingw32-linux +CFLAGS+=-fshort-wchar +CPPFLAGS+=-fshort-wchar endif endif Modified: branches/ros-branch-0_3_1/reactos/config.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_1/reactos/config…
============================================================================== --- branches/ros-branch-0_3_1/reactos/config.rbuild (original) +++ branches/ros-branch-0_3_1/reactos/config.rbuild Sat Sep 30 06:54:20 2006 @@ -44,14 +44,14 @@ <!-- Whether to compile in the integrated kernel debugger. --> -<property name="KDBG" value="0" /> +<property name="KDBG" value="1" /> <!-- Whether to compile for debugging. No compiler optimizations will be performed. --> -<property name="DBG" value="0" /> +<property name="DBG" value="1" /> <!-- Modified: branches/ros-branch-0_3_1/reactos/tools/buildno/buildno.cpp URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_1/reactos/tools/…
============================================================================== --- branches/ros-branch-0_3_1/reactos/tools/buildno/buildno.cpp (original) +++ branches/ros-branch-0_3_1/reactos/tools/buildno/buildno.cpp Sat Sep 30 06:54:20 2006 @@ -38,6 +38,7 @@ static char * argv0 = ""; static char * filename = ""; +static char * kernel_version_build_type = 0; #ifdef DBG void @@ -54,6 +55,15 @@ printf ("%s->tm_isdst = %d\n\n", tag, t->tm_isdst); } #endif + +int count_wide_string( wchar_t *str ) +{ + int i; + + for( i = 0; str[i]; i++ ); + + return i; +} void write_h (int build, char *buildstr) @@ -80,7 +90,7 @@ { s = s + sprintf (s, ".%d", KERNEL_VERSION_PATCH_LEVEL); } - s = s + sprintf (s, "-%S\\0\"\n", KERNEL_VERSION_BUILD_TYPE); + s = s + sprintf (s, "-%s\\0\"\n", kernel_version_build_type); s = s + sprintf (s, "#define KERNEL_RELEASE_STR\t\"%d.%d", KERNEL_VERSION_MAJOR, KERNEL_VERSION_MINOR); @@ -88,7 +98,7 @@ { s = s + sprintf (s, ".%d", KERNEL_VERSION_PATCH_LEVEL); } - s = s + sprintf (s, "-%S\"\n", KERNEL_VERSION_BUILD_TYPE); + s = s + sprintf (s, "-%s\"\n", kernel_version_build_type); s = s + sprintf (s, "#define KERNEL_VERSION_RC\t\"%d.%d", KERNEL_VERSION_MAJOR, KERNEL_VERSION_MINOR); @@ -96,7 +106,7 @@ { s = s + sprintf (s, ".%d", KERNEL_VERSION_PATCH_LEVEL); } - s = s + sprintf (s, "-%S\\0\"\n", KERNEL_VERSION_BUILD_TYPE); + s = s + sprintf (s, "-%s\\0\"\n", kernel_version_build_type); s = s + sprintf (s, "#define KERNEL_VERSION_STR\t\"%d.%d", KERNEL_VERSION_MAJOR, KERNEL_VERSION_MINOR); @@ -104,7 +114,7 @@ { s = s + sprintf (s, ".%d", KERNEL_VERSION_PATCH_LEVEL); } - s = s + sprintf (s, "-%S\"\n", KERNEL_VERSION_BUILD_TYPE); + s = s + sprintf (s, "-%s\"\n", kernel_version_build_type); s = s + sprintf (s, "#define REACTOS_DLL_VERSION_MAJOR\t%d\n", dllversion); s = s + sprintf (s, "#define REACTOS_DLL_RELEASE_RC\t\"%d.%d", dllversion, KERNEL_VERSION_MINOR); @@ -112,7 +122,7 @@ { s = s + sprintf (s, ".%d", KERNEL_VERSION_PATCH_LEVEL); } - s = s + sprintf (s, "-%S\\0\"\n", KERNEL_VERSION_BUILD_TYPE); + s = s + sprintf (s, "-%s\\0\"\n", kernel_version_build_type); s = s + sprintf (s, "#define REACTOS_DLL_RELEASE_STR\t\"%d.%d", dllversion, KERNEL_VERSION_MINOR); @@ -120,7 +130,7 @@ { s = s + sprintf (s, ".%d", KERNEL_VERSION_PATCH_LEVEL); } - s = s + sprintf (s, "-%S\"\n", KERNEL_VERSION_BUILD_TYPE); + s = s + sprintf (s, "-%s\"\n", kernel_version_build_type); s = s + sprintf (s, "#define REACTOS_DLL_VERSION_RC\t\"%d.%d", dllversion, KERNEL_VERSION_MINOR); @@ -128,7 +138,7 @@ { s = s + sprintf (s, ".%d", KERNEL_VERSION_PATCH_LEVEL); } - s = s + sprintf (s, "-%S\\0\"\n", KERNEL_VERSION_BUILD_TYPE); + s = s + sprintf (s, "-%s\\0\"\n", kernel_version_build_type); s = s + sprintf (s, "#define REACTOS_DLL_VERSION_STR\t\"%d.%d", dllversion, KERNEL_VERSION_MINOR); @@ -136,7 +146,7 @@ { s = s + sprintf (s, ".%d", KERNEL_VERSION_PATCH_LEVEL); } - s = s + sprintf (s, "-%S\"\n", KERNEL_VERSION_BUILD_TYPE); + s = s + sprintf (s, "-%s\"\n", kernel_version_build_type); s = s + sprintf (s, "#endif\n/* EOF */\n"); h = fopen (filename, "wb"); @@ -284,6 +294,7 @@ int main (int argc, char * argv []) { + int i, length; int print_only = FALSE; int quiet = FALSE; @@ -341,6 +352,14 @@ printf ( "\nReactOS Build Number Generator\n\n"); } + /* Convert kernel_version_build_type to a host-friendly string */ + length = count_wide_string(KERNEL_VERSION_BUILD_TYPE); + kernel_version_build_type = (char *)malloc(length+1); + for( i = 0; KERNEL_VERSION_BUILD_TYPE[i]; i++ ) { + kernel_version_build_type[i] = KERNEL_VERSION_BUILD_TYPE[i]; + } + kernel_version_build_type[i] = 0; + time (& t1); /* current build time */ t1_tm = gmtime (& t1); @@ -378,7 +397,7 @@ { printf(".%d", KERNEL_VERSION_PATCH_LEVEL); } - printf("-%S (Build %s)\n\n", KERNEL_VERSION_BUILD_TYPE, buildstr); + printf("-%s (Build %s)\n\n", kernel_version_build_type, buildstr); } /* * (Over)write the include file, unless Modified: branches/ros-branch-0_3_1/reactos/tools/mkhive/cmi.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_1/reactos/tools/…
============================================================================== --- branches/ros-branch-0_3_1/reactos/tools/mkhive/cmi.c (original) +++ branches/ros-branch-0_3_1/reactos/tools/mkhive/cmi.c Sat Sep 30 06:54:20 2006 @@ -31,7 +31,7 @@ IN SIZE_T Size, IN BOOLEAN Paged) { - return malloc(Size); + return (PVOID) malloc(Size); } static VOID Modified: branches/ros-branch-0_3_1/reactos/tools/mkhive/mkhive.mak URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_1/reactos/tools/…
============================================================================== --- branches/ros-branch-0_3_1/reactos/tools/mkhive/mkhive.mak (original) +++ branches/ros-branch-0_3_1/reactos/tools/mkhive/mkhive.mak Sat Sep 30 06:54:20 2006 @@ -30,7 +30,7 @@ MKHIVE_OBJECTS = \ $(addprefix $(INTERMEDIATE_), $(MKHIVE_SOURCES:.c=.o)) -MKHIVE_HOST_CFLAGS = $(xTOOLS_CFLAGS) -I$(INFLIB_BASE) -I$(CMLIB_BASE) \ +MKHIVE_HOST_CFLAGS = -fshort-wchar $(xTOOLS_CFLAGS) -I$(INFLIB_BASE) -I$(CMLIB_BASE) \ -D_NTOSKRNL_ \ -Iinclude/reactos -Iinclude/ddk -Iinclude/ndk -Iinclude/psdk -Iinclude -Iinclude/crt -g3 Modified: branches/ros-branch-0_3_1/reactos/tools/mkhive/registry.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_1/reactos/tools/…
============================================================================== --- branches/ros-branch-0_3_1/reactos/tools/mkhive/registry.c (original) +++ branches/ros-branch-0_3_1/reactos/tools/mkhive/registry.c Sat Sep 30 06:54:20 2006 @@ -122,7 +122,7 @@ LocalKeyName = (PWSTR)KeyName; for (;;) { - End = wcschr(LocalKeyName, '\\'); + End = (PWSTR) xwcschr(LocalKeyName, '\\'); if (End) { KeyString.Buffer = LocalKeyName; @@ -153,7 +153,7 @@ ParentKey->RegistryHive, ParentKey->KeyCell, &KeyString, - 0, + OBJ_CASE_INSENSITIVE, &SubKeyCell, &BlockOffset); if (AllowCreation && Status == STATUS_OBJECT_NAME_NOT_FOUND) Modified: branches/ros-branch-0_3_1/reactos/tools/mkhive/rtl.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_1/reactos/tools/…
============================================================================== --- branches/ros-branch-0_3_1/reactos/tools/mkhive/rtl.c (original) +++ branches/ros-branch-0_3_1/reactos/tools/mkhive/rtl.c Sat Sep 30 06:54:20 2006 @@ -10,6 +10,24 @@ #define WIN32_NO_STATUS #include <ntddk.h> #include <bitmap.c> + +SIZE_T xwcslen( PWSTR String ) { + SIZE_T i; + + for( i = 0; String[i]; i++ ); + + return i; +} + +PWSTR xwcschr( PWSTR String, WCHAR Char ) +{ + SIZE_T i; + + for( i = 0; String[i] && String[i] != Char; i++ ); + + if( String[i] ) return &String[i]; + else return NULL; +} /* * @implemented @@ -54,7 +72,7 @@ if(SourceString) { - DestSize = wcslen(SourceString) * sizeof(WCHAR); + DestSize = xwcslen(SourceString) * sizeof(WCHAR); DestinationString->Length = (USHORT)DestSize; DestinationString->MaximumLength = (USHORT)DestSize + sizeof(WCHAR); } @@ -84,7 +102,7 @@ if (AllocateDestinationString) { UniDest->MaximumLength = (USHORT)Length + sizeof(WCHAR); - UniDest->Buffer = malloc(UniDest->MaximumLength); + UniDest->Buffer = (PWSTR) malloc(UniDest->MaximumLength); if (!UniDest->Buffer) return STATUS_NO_MEMORY; } @@ -131,7 +149,7 @@ IN POOL_TYPE PoolType, IN SIZE_T NumberOfBytes) { - return malloc(NumberOfBytes); + return (PVOID) malloc(NumberOfBytes); } VOID NTAPI Modified: branches/ros-branch-0_3_1/reactos/tools/widl/widl.mak URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_1/reactos/tools/…
============================================================================== --- branches/ros-branch-0_3_1/reactos/tools/widl/widl.mak (original) +++ branches/ros-branch-0_3_1/reactos/tools/widl/widl.mak Sat Sep 30 06:54:20 2006 @@ -55,7 +55,7 @@ $(addprefix $(INTERMEDIATE_), $(WIDL_SOURCES:.c=.o)) WIDL_HOST_CFLAGS = $(TOOLS_CFLAGS) \ - -DINT16=SHORT -D__USE_W32API -DYYDEBUG=1 \ + -DINT16=SHORT -D__USE_W32API -DYYDEBUG=1 -D__REACTOS__=1 \ -I$(WIDL_BASE) -I$(WPP_BASE) \ -Iinclude/reactos/wine -Iinclude/reactos -Iinclude -Iinclude/psdk
18 years, 2 months
1
0
0
0
[gedmurphy] 24303: - update french timedate resource file - patch by Sylvain Petreolle
by gedmurphy@svn.reactos.org
Author: gedmurphy Date: Fri Sep 29 22:04:15 2006 New Revision: 24303 URL:
http://svn.reactos.org/svn/reactos?rev=24303&view=rev
Log: - update french timedate resource file - patch by Sylvain Petreolle Modified: trunk/reactos/dll/cpl/timedate/Fr.rc Modified: trunk/reactos/dll/cpl/timedate/Fr.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/timedate/Fr.rc?rev…
============================================================================== --- trunk/reactos/dll/cpl/timedate/Fr.rc (original) +++ trunk/reactos/dll/cpl/timedate/Fr.rc Fri Sep 29 22:04:15 2006 @@ -39,17 +39,17 @@ IDD_INETTIMEPAGE DIALOGEX 0, 0, 252, 146 STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "Internet Time" +CAPTION "Temps Internet" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN COMBOBOX IDC_SERVERLIST, 65, 22, 117, 136, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - CONTROL "Automatically synchronize with an Internet time server", IDC_AUTODAYLIGHT, + CONTROL "Synchroniser automatiquement avec un serveur d'heure Internet", IDC_AUTODAYLIGHT, "Button", BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,11,7,241,10 - LTEXT "Server:", -1, 34, 22, 28, 13 - PUSHBUTTON "Update Now", IDC_UPDATEBUTTON, 187, 22, 49, 14 + LTEXT "Serveur:", -1, 34, 22, 28, 13 + PUSHBUTTON "Mettre à jour maintenant", IDC_UPDATEBUTTON, 187, 22, 49, 14 LTEXT "", IDC_SUCSYNC, 16, 54, 214, 23 LTEXT "", IDC_NEXTSYNC, 12, 96, 137, 12 - LTEXT "Synchronazation can only occur when your computer is connected to the internet.", -1, 12, 114, 225, 25 + LTEXT "La synchronisation ne peut se faire que si votre ordinateur est connecté à Internet.", -1, 12, 114, 225, 25 END @@ -60,6 +60,6 @@ IDS_TIMEZONETEXT "Fuseau horaire actuel: %s" IDS_TIMEZONEINVALID "Invalide" IDS_TIMEZONEUNKNOWN "Inconnu" - IDS_INETTIMESUCSYNC "The time has been successfully synchronized with %s on %s at %s" - IDS_INETTIMENEXTSYNC "Next synchronization: %s at %s" + IDS_INETTIMESUCSYNC "L'heure a été synchronisée avec %s le %s à %s" + IDS_INETTIMENEXTSYNC "Prochaine synchronisation: %s à %s" END
18 years, 2 months
1
0
0
0
[fireball] 24302: Add devmgmt to the build system, thus fixing make bootcd
by fireball@svn.reactos.org
Author: fireball Date: Fri Sep 29 21:57:20 2006 New Revision: 24302 URL:
http://svn.reactos.org/svn/reactos?rev=24302&view=rev
Log: Add devmgmt to the build system, thus fixing make bootcd Modified: trunk/reactos/base/applications/applications.rbuild Modified: trunk/reactos/base/applications/applications.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/applicat…
============================================================================== --- trunk/reactos/base/applications/applications.rbuild (original) +++ trunk/reactos/base/applications/applications.rbuild Fri Sep 29 21:57:20 2006 @@ -9,6 +9,9 @@ </directory> <directory name="cmdutils"> <xi:include href="cmdutils/cmdutils.rbuild" /> +</directory> +<directory name="devmgmt"> + <xi:include href="devmgmt/devmgmt.rbuild" /> </directory> <directory name="devmgr"> <xi:include href="devmgr/devmgr.rbuild" />
18 years, 2 months
1
0
0
0
[gedmurphy] 24301: add devmgmt.exe as it's usable in ROS now
by gedmurphy@svn.reactos.org
Author: gedmurphy Date: Fri Sep 29 21:34:50 2006 New Revision: 24301 URL:
http://svn.reactos.org/svn/reactos?rev=24301&view=rev
Log: add devmgmt.exe as it's usable in ROS now Modified: trunk/reactos/boot/bootdata/packages/reactos.dff Modified: trunk/reactos/boot/bootdata/packages/reactos.dff URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/packages/rea…
============================================================================== --- trunk/reactos/boot/bootdata/packages/reactos.dff (original) +++ trunk/reactos/boot/bootdata/packages/reactos.dff Fri Sep 29 21:34:50 2006 @@ -36,6 +36,7 @@ base\applications\cmdutils\more\more.exe 1 base\applications\control\control.exe 1 base\applications\devmgr\devmgrapp.exe 1 +base\applications\devmgmt\devmgmt.exe 1 base\applications\games\solitaire\sol.exe 1 base\applications\games\winemine\winemine.exe 1 base\applications\getfirefox\getfirefox.exe 1
18 years, 2 months
1
0
0
0
[fireball] 24300: - Implement device creating, with the specified DeviceExtension - Add stub for processing IRPs sent to the mouse driver TODO (will be done once problem with load-order will be resolved): - Store mouclass's callback address - Actually call it thus making driver working - Cleanup routines
by fireball@svn.reactos.org
Author: fireball Date: Fri Sep 29 21:07:48 2006 New Revision: 24300 URL:
http://svn.reactos.org/svn/reactos?rev=24300&view=rev
Log: - Implement device creating, with the specified DeviceExtension - Add stub for processing IRPs sent to the mouse driver TODO (will be done once problem with load-order will be resolved): - Store mouclass's callback address - Actually call it thus making driver working - Cleanup routines Modified: trunk/reactos/drivers/usb/nt4compat/usbdriver/mouse.c Modified: trunk/reactos/drivers/usb/nt4compat/usbdriver/mouse.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/nt4compat/usbd…
============================================================================== --- trunk/reactos/drivers/usb/nt4compat/usbdriver/mouse.c (original) +++ trunk/reactos/drivers/usb/nt4compat/usbdriver/mouse.c Fri Sep 29 21:07:48 2006 @@ -9,12 +9,21 @@ #include "usbdriver.h" #include "ntddmou.h" +//FIXME: is it needed at all? +typedef struct _USBMP_DEVICE_EXTENSION +{ + BOOLEAN IsFDO; +} USBMP_DEVICE_EXTENSION, *PUSBMP_DEVICE_EXTENSION; + +PDEVICE_OBJECT MouseFdo = NULL; + + BOOLEAN mouse_connect(PCONNECT_DATA dev_mgr, DEV_HANDLE dev_handle); BOOLEAN mouse_disconnect(PUSB_DEV_MANAGER dev_mgr, DEV_HANDLE dev_handle); BOOLEAN mouse_stop(PUSB_DEV_MANAGER dev_mgr, DEV_HANDLE dev_handle); - VOID mouse_irq(PURB purb, PVOID pcontext); -VOID mouse_set_cfg_completion(PURB purb, PVOID pcontext); +static NTSTATUS +MouseCreateDevice(IN PDRIVER_OBJECT DriverObject); BOOLEAN @@ -54,6 +63,9 @@ pdriver->disp_tbl.dev_disconnect = mouse_disconnect; pdriver->disp_tbl.dev_stop = mouse_stop; pdriver->disp_tbl.dev_reserved = NULL; + + // Create the device + MouseCreateDevice(dev_mgr->usb_driver_obj); usb_dbg_print(DBGLVL_MAXIMUM, ("mouse_driver_init(): mouse driver is initialized\n")); return TRUE; @@ -203,48 +215,6 @@ return TRUE; } -// pcontext == device extension -VOID -mouse_set_cfg_completion(PURB purb, PVOID pcontext) -{ - PMOUSE_DRVR_EXTENSION pdev_ext = (PMOUSE_DRVR_EXTENSION)pcontext; - DEV_HANDLE endp_handle; - NTSTATUS status; - - if (purb->status != STATUS_SUCCESS) - { - usb_free_mem(purb); - return; - } - - endp_handle = purb->endp_handle; - - //usb_free_mem(purb); - //purb = NULL; - - usb_dbg_print(DBGLVL_MAXIMUM, ("mouse_set_cfg_completion() endpoint handle=0x%x\n", endp_handle)); - - // Build a URB for our interrupt transfer - UsbBuildInterruptOrBulkTransferRequest(purb, - endp_handle, - /*usb_make_handle((pdev_ext->dev_handle >> 16), pdev_ext->if_idx, - pdev_ext->int_endp_idx),*/ - (PUCHAR)&pdev_ext->mouse_data, - 4, // FIXME: use max packet size! - mouse_irq, - pdev_ext, - 0); - - // Call USB driver stack - status = usb_submit_urb(pdev_ext->dev_mgr, purb); - if (status != STATUS_PENDING) - { - usb_free_mem(purb); - purb = NULL; - } -} - - VOID mouse_irq(PURB purb, PVOID pcontext) { @@ -363,3 +333,298 @@ return TRUE;//umss_delete_device(dev_mgr, pdrvr, dev_obj, FALSE); } + +// Dispatch routine for our IRPs +NTSTATUS +MouseDispatch(PDEVICE_OBJECT DeviceObject, PIRP Irp) +{ + //NTSTATUS Status = STATUS_INVALID_DEVICE_REQUEST; + + usb_dbg_print(DBGLVL_MAXIMUM, ("MouseDispatch(DO %p, code 0x%lx) called\n", + DeviceObject, + IoGetCurrentIrpStackLocation(Irp)->Parameters.DeviceIoControl.IoControlCode)); +#if 0 + if (DeviceObject == KeyboardFdo) + { + // it's keyboard's IOCTL + PIO_STACK_LOCATION Stk; + + Irp->IoStatus.Information = 0; + Stk = IoGetCurrentIrpStackLocation(Irp); + + switch (Stk->Parameters.DeviceIoControl.IoControlCode) + { + case IOCTL_INTERNAL_KEYBOARD_CONNECT: + DPRINT("IOCTL_INTERNAL_KEYBOARD_CONNECT\n"); + if (Stk->Parameters.DeviceIoControl.InputBufferLength < sizeof(CONNECT_DATA)) { + DPRINT1("Keyboard IOCTL_INTERNAL_KEYBOARD_CONNECT " + "invalid buffer size\n"); + Irp->IoStatus.Status = STATUS_INVALID_PARAMETER; + goto intcontfailure; + } + + RtlCopyMemory(&KbdClassInformation, + Stk->Parameters.DeviceIoControl.Type3InputBuffer, + sizeof(CONNECT_DATA)); + + Irp->IoStatus.Status = STATUS_SUCCESS; + break; + + case IOCTL_INTERNAL_I8042_KEYBOARD_WRITE_BUFFER: + DPRINT("IOCTL_INTERNAL_I8042_KEYBOARD_WRITE_BUFFER\n"); + if (Stk->Parameters.DeviceIoControl.InputBufferLength < 1) { + Irp->IoStatus.Status = STATUS_INVALID_PARAMETER; + goto intcontfailure; + } + /* if (!DevExt->KeyboardInterruptObject) { + Irp->IoStatus.Status = STATUS_DEVICE_NOT_READY; + goto intcontfailure; + }*/ + + Irp->IoStatus.Status = STATUS_SUCCESS; + break; + case IOCTL_KEYBOARD_QUERY_ATTRIBUTES: + DPRINT("IOCTL_KEYBOARD_QUERY_ATTRIBUTES\n"); + if (Stk->Parameters.DeviceIoControl.OutputBufferLength < + sizeof(KEYBOARD_ATTRIBUTES)) { + DPRINT("Keyboard IOCTL_KEYBOARD_QUERY_ATTRIBUTES: " + "invalid buffer size\n"); + Irp->IoStatus.Status = STATUS_BUFFER_TOO_SMALL; + goto intcontfailure; + } + /*RtlCopyMemory(Irp->AssociatedIrp.SystemBuffer, + &DevExt->KeyboardAttributes, + sizeof(KEYBOARD_ATTRIBUTES));*/ + + Irp->IoStatus.Status = STATUS_SUCCESS; + break; + case IOCTL_KEYBOARD_QUERY_INDICATORS: + DPRINT("IOCTL_KEYBOARD_QUERY_INDICATORS\n"); + if (Stk->Parameters.DeviceIoControl.OutputBufferLength < + sizeof(KEYBOARD_INDICATOR_PARAMETERS)) { + DPRINT("Keyboard IOCTL_KEYBOARD_QUERY_INDICATORS: " + "invalid buffer size\n"); + Irp->IoStatus.Status = STATUS_BUFFER_TOO_SMALL; + goto intcontfailure; + } + /*RtlCopyMemory(Irp->AssociatedIrp.SystemBuffer, + &DevExt->KeyboardIndicators, + sizeof(KEYBOARD_INDICATOR_PARAMETERS));*/ + + Irp->IoStatus.Status = STATUS_NOT_SUPPORTED; + break; + case IOCTL_KEYBOARD_QUERY_TYPEMATIC: + DPRINT("IOCTL_KEYBOARD_QUERY_TYPEMATIC\n"); + if (Stk->Parameters.DeviceIoControl.OutputBufferLength < + sizeof(KEYBOARD_TYPEMATIC_PARAMETERS)) { + DPRINT("Keyboard IOCTL_KEYBOARD_QUERY_TYPEMATIC: " + "invalid buffer size\n"); + Irp->IoStatus.Status = STATUS_BUFFER_TOO_SMALL; + goto intcontfailure; + } + /*RtlCopyMemory(Irp->AssociatedIrp.SystemBuffer, + &DevExt->KeyboardTypematic, + sizeof(KEYBOARD_TYPEMATIC_PARAMETERS));*/ + + Irp->IoStatus.Status = STATUS_SUCCESS; + break; + case IOCTL_KEYBOARD_SET_INDICATORS: + DPRINT("IOCTL_KEYBOARD_SET_INDICATORS\n"); + if (Stk->Parameters.DeviceIoControl.InputBufferLength < + sizeof(KEYBOARD_INDICATOR_PARAMETERS)) { + DPRINT("Keyboard IOCTL_KEYBOARD_SET_INDICTATORS: " + "invalid buffer size\n"); + Irp->IoStatus.Status = STATUS_BUFFER_TOO_SMALL; + goto intcontfailure; + } + + /*RtlCopyMemory(&DevExt->KeyboardIndicators, + Irp->AssociatedIrp.SystemBuffer, + sizeof(KEYBOARD_INDICATOR_PARAMETERS));*/ + + //DPRINT("%x\n", DevExt->KeyboardIndicators.LedFlags); + + Irp->IoStatus.Status = STATUS_SUCCESS; + break; + case IOCTL_KEYBOARD_SET_TYPEMATIC: + DPRINT("IOCTL_KEYBOARD_SET_TYPEMATIC\n"); + if (Stk->Parameters.DeviceIoControl.InputBufferLength < + sizeof(KEYBOARD_TYPEMATIC_PARAMETERS)) { + DPRINT("Keyboard IOCTL_KEYBOARD_SET_TYPEMATIC " + "invalid buffer size\n"); + Irp->IoStatus.Status = STATUS_BUFFER_TOO_SMALL; + goto intcontfailure; + } + + /*RtlCopyMemory(&DevExt->KeyboardTypematic, + Irp->AssociatedIrp.SystemBuffer, + sizeof(KEYBOARD_TYPEMATIC_PARAMETERS));*/ + + Irp->IoStatus.Status = STATUS_SUCCESS; + break; + case IOCTL_KEYBOARD_QUERY_INDICATOR_TRANSLATION: + /* We should check the UnitID, but it's kind of pointless as + * all keyboards are supposed to have the same one + */ + /*RtlCopyMemory(Irp->AssociatedIrp.SystemBuffer, + &IndicatorTranslation, + sizeof(LOCAL_KEYBOARD_INDICATOR_TRANSLATION));*/ + + Irp->IoStatus.Status = STATUS_NOT_SUPPORTED; + break; + case IOCTL_INTERNAL_I8042_HOOK_KEYBOARD: + /* Nothing to do here */ + Irp->IoStatus.Status = STATUS_SUCCESS; + break; + default: + Irp->IoStatus.Status = STATUS_INVALID_DEVICE_REQUEST; + break; + } + +intcontfailure: + Status = Irp->IoStatus.Status; + } + else if (DeviceObject == MouseFdo) + { + // it's mouse's IOCTL + PIO_STACK_LOCATION Stk; + + Irp->IoStatus.Information = 0; + Stk = IoGetCurrentIrpStackLocation(Irp); + + switch (Stk->Parameters.DeviceIoControl.IoControlCode) + { + case IOCTL_INTERNAL_MOUSE_CONNECT: + DPRINT("IOCTL_INTERNAL_MOUSE_CONNECT\n"); + if (Stk->Parameters.DeviceIoControl.InputBufferLength < sizeof(CONNECT_DATA)) { + DPRINT1("IOCTL_INTERNAL_MOUSE_CONNECT: " + "invalid buffer size\n"); + Irp->IoStatus.Status = STATUS_INVALID_PARAMETER; + goto intcontfailure2; + } + + RtlCopyMemory(&MouseClassInformation, + Stk->Parameters.DeviceIoControl.Type3InputBuffer, + sizeof(CONNECT_DATA)); + + Irp->IoStatus.Status = STATUS_SUCCESS; + break; + + default: + Irp->IoStatus.Status = STATUS_SUCCESS;//STATUS_INVALID_DEVICE_REQUEST; + break; + } +intcontfailure2: + Status = Irp->IoStatus.Status; + } + else + { + return UsbMpPdoInternalDeviceControlCore(DeviceObject, Irp); + } + + + if (Status == STATUS_INVALID_DEVICE_REQUEST) { + DPRINT1("Invalid internal device request!\n"); + } + + if (Status != STATUS_PENDING) + IoCompleteRequest(Irp, IO_NO_INCREMENT); + + return Status; + +#endif + + // Default handler + Irp->IoStatus.Information = 0; + Irp->IoStatus.Status = STATUS_NOT_SUPPORTED; + IoCompleteRequest(Irp, IO_NO_INCREMENT); + return STATUS_NOT_SUPPORTED; +} + +NTSTATUS +AddRegistryEntry( + IN PCWSTR PortTypeName, + IN PUNICODE_STRING DeviceName, + IN PCWSTR RegistryPath) +{ + UNICODE_STRING PathU = RTL_CONSTANT_STRING(L"\\REGISTRY\\MACHINE\\HARDWARE\\DEVICEMAP"); + OBJECT_ATTRIBUTES ObjectAttributes; + HANDLE hDeviceMapKey = (HANDLE)-1; + HANDLE hPortKey = (HANDLE)-1; + UNICODE_STRING PortTypeNameU; + NTSTATUS Status; + + InitializeObjectAttributes(&ObjectAttributes, &PathU, OBJ_KERNEL_HANDLE | OBJ_CASE_INSENSITIVE, NULL, NULL); + Status = ZwOpenKey(&hDeviceMapKey, 0, &ObjectAttributes); + if (!NT_SUCCESS(Status)) + { + usb_dbg_print(DBGLVL_MINIMUM, ("ZwOpenKey() failed with status 0x%08lx\n", Status)); + goto cleanup; + } + + RtlInitUnicodeString(&PortTypeNameU, PortTypeName); + InitializeObjectAttributes(&ObjectAttributes, &PortTypeNameU, OBJ_KERNEL_HANDLE, hDeviceMapKey, NULL); + Status = ZwCreateKey(&hPortKey, KEY_SET_VALUE, &ObjectAttributes, 0, NULL, REG_OPTION_VOLATILE, NULL); + if (!NT_SUCCESS(Status)) + { + usb_dbg_print(DBGLVL_MINIMUM, ("ZwCreateKey() failed with status 0x%08lx\n", Status)); + goto cleanup; + } + + Status = ZwSetValueKey(hPortKey, DeviceName, 0, REG_SZ, (PVOID)RegistryPath, wcslen(RegistryPath) * sizeof(WCHAR) + sizeof(UNICODE_NULL)); + if (!NT_SUCCESS(Status)) + { + usb_dbg_print(DBGLVL_MINIMUM, ("ZwSetValueKey() failed with status 0x%08lx\n", Status)); + goto cleanup; + } + + Status = STATUS_SUCCESS; + +cleanup: + if (hDeviceMapKey != (HANDLE)-1) + ZwClose(hDeviceMapKey); + if (hPortKey != (HANDLE)-1) + ZwClose(hPortKey); + return Status; +} + +static NTSTATUS +MouseCreateDevice(IN PDRIVER_OBJECT DriverObject) +{ + UNICODE_STRING DeviceName = RTL_CONSTANT_STRING(L"\\Device\\PointerPortUSB"); + PDEVEXT_HEADER DeviceExtension; + PDEVICE_OBJECT Fdo; + NTSTATUS Status; + + Status = AddRegistryEntry(L"PointerPort", &DeviceName, L"REGISTRY\\MACHINE\\SYSTEM\\CurrentControlSet\\Services\\usbdriver"); + if (!NT_SUCCESS(Status)) + { + usb_dbg_print(DBGLVL_MINIMUM, ("AddRegistryEntry() for usb mouse driver failed with status 0x%08lx\n", Status)); + return Status; + } + + Status = IoCreateDevice(DriverObject, + sizeof(DEVEXT_HEADER), + &DeviceName, + FILE_DEVICE_MOUSE, + FILE_DEVICE_SECURE_OPEN, + TRUE, + &Fdo); + + if (!NT_SUCCESS(Status)) + { + usb_dbg_print(DBGLVL_MINIMUM, ("IoCreateDevice() for usb mouse driver failed with status 0x%08lx\n", Status)); + return Status; + } + DeviceExtension = (PDEVEXT_HEADER)Fdo->DeviceExtension; + RtlZeroMemory(DeviceExtension, sizeof(DEVEXT_HEADER)); + + DeviceExtension->dispatch = MouseDispatch; + + MouseFdo = Fdo; + Fdo->Flags &= ~DO_DEVICE_INITIALIZING; + usb_dbg_print(DBGLVL_MEDIUM, ("Created mouse Fdo: %p\n", Fdo)); + + return STATUS_SUCCESS; +} +
18 years, 2 months
1
0
0
0
[gedmurphy] 24299: there's always one that gets away ...
by gedmurphy@svn.reactos.org
Author: gedmurphy Date: Fri Sep 29 21:07:17 2006 New Revision: 24299 URL:
http://svn.reactos.org/svn/reactos?rev=24299&view=rev
Log: there's always one that gets away ... Added: trunk/reactos/dll/win32/setupapi/res/icons/icons_res.rc Added: trunk/reactos/dll/win32/setupapi/res/icons/icons_res.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/res/ico…
============================================================================== --- trunk/reactos/dll/win32/setupapi/res/icons/icons_res.rc (added) +++ trunk/reactos/dll/win32/setupapi/res/icons/icons_res.rc Fri Sep 29 21:07:17 2006 @@ -1,0 +1,41 @@ +IDI_SETUPAPI_DISP_ADAPT ICON "res/icons/1.ico" +IDI_SETUPAPI_MOUSE ICON "res/icons/2.ico" +IDI_SETUPAPI_KEYBOARD ICON "res/icons/3.ico" +IDI_SETUPAPI_PRINTER ICON "res/icons/4.ico" +IDI_SETUPAPI_NETCARD ICON "res/icons/5.ico" +IDI_SETUPAPI_NODE ICON "res/icons/6.ico" // what's this? +IDI_SETUPAPI_COMPUTER ICON "res/icons/7.ico" +IDI_SETUPAPI_SHCOMPUTER ICON "res/icons/8.ico" +IDI_SETUPAPI_DRV_CONTROL ICON "res/icons/9.ico" +IDI_SETUPAPI_POWER ICON "res/icons/10.ico" // what's this? +IDI_SETUPAPI_CARD ICON "res/icons/11.ico" // what's this, PCMCIA? + +IDI_SETUPAPI_UNKNOWN ICON "res/icons/18.ico" +IDI_SETUPAPI_LEGACY_DRV ICON "res/icons/19.ico" +IDI_SETUPAPI_USB ICON "res/icons/20.ico" +IDI_SETUPAPI_REM_DRIVE ICON "res/icons/21.ico" +IDI_SETUPAPI_SATELLITE ICON "res/icons/22.ico" // what's this? +IDI_SETUPAPI_PORTS ICON "res/icons/23.ico" +IDI_SETUPAPI_HID ICON "res/icons/24.ico" +IDI_SETUPAPI_NEEDSNAME1 ICON "res/icons/25.ico" // what's this? +IDI_SETUPAPI_NEEDSNAME2 ICON "res/icons/26.ico" // what's this? +IDI_SETUPAPI_MYCOMPUTER ICON "res/icons/27.ico" +IDI_SETUPAPI_PROCESSOR ICON "res/icons/28.ico" + +IDI_SETUPAPI_SIGNED_DRV ICON "res/icons/40.ico" +IDI_SETUPAPI_BLANK ICON "res/icons/41.ico" +IDI_SETUPAPI_WARNING ICON "res/icons/42.ico" +IDI_SETUPAPI_DEVICES ICON "res/icons/43.ico" + +IDI_SETUPAPI_FLOPPY ICON "res/icons/50.ico" +IDI_SETUPAPI_CDROM ICON "res/icons/51.ico" +IDI_SETUPAPI_NETDRIVE ICON "res/icons/52.ico" +IDI_SETUPAPI_HARDDRIVE ICON "res/icons/53.ico" +IDI_SETUPAPI_NEEDSNAME3 ICON "res/icons/54.ico" + +IDI_SETUPAPI_314FLOP ICON "res/icons/105.ico" +IDI_SETUPAPI_CHIP ICON "res/icons/159.ico" +IDI_SETUPAPI_ERROR ICON "res/icons/161.ico" +IDI_SETUPAPI_WARN_OVERLAY ICON "res/icons/500.ico" +IDI_SETUPAPI_ERR_OVERLAY ICON "res/icons/501.ico" +IDI_SETUPAPI_INFO_OVERLAY ICON "res/icons/502.ico"
18 years, 2 months
1
0
0
0
[gedmurphy] 24298: - Add the device imagelist icons to setupapi. - It appears SetupDiGetClassImageListExW will need some work before these are usable though.
by gedmurphy@svn.reactos.org
Author: gedmurphy Date: Fri Sep 29 20:56:24 2006 New Revision: 24298 URL:
http://svn.reactos.org/svn/reactos?rev=24298&view=rev
Log: - Add the device imagelist icons to setupapi. - It appears SetupDiGetClassImageListExW will need some work before these are usable though. Added: trunk/reactos/dll/win32/setupapi/res/ trunk/reactos/dll/win32/setupapi/res/icons/ trunk/reactos/dll/win32/setupapi/res/icons/1.ico (with props) trunk/reactos/dll/win32/setupapi/res/icons/10.ico (with props) trunk/reactos/dll/win32/setupapi/res/icons/105.ico (with props) trunk/reactos/dll/win32/setupapi/res/icons/11.ico (with props) trunk/reactos/dll/win32/setupapi/res/icons/159.ico (with props) trunk/reactos/dll/win32/setupapi/res/icons/161.ico (with props) trunk/reactos/dll/win32/setupapi/res/icons/18.ico (with props) trunk/reactos/dll/win32/setupapi/res/icons/19.ico (with props) trunk/reactos/dll/win32/setupapi/res/icons/2.ico (with props) trunk/reactos/dll/win32/setupapi/res/icons/20.ico (with props) trunk/reactos/dll/win32/setupapi/res/icons/21.ico (with props) trunk/reactos/dll/win32/setupapi/res/icons/22.ico (with props) trunk/reactos/dll/win32/setupapi/res/icons/23.ico (with props) trunk/reactos/dll/win32/setupapi/res/icons/24.ico (with props) trunk/reactos/dll/win32/setupapi/res/icons/25.ico (with props) trunk/reactos/dll/win32/setupapi/res/icons/26.ico (with props) trunk/reactos/dll/win32/setupapi/res/icons/27.ico (with props) trunk/reactos/dll/win32/setupapi/res/icons/28.ico (with props) trunk/reactos/dll/win32/setupapi/res/icons/3.ico (with props) trunk/reactos/dll/win32/setupapi/res/icons/4.ico (with props) trunk/reactos/dll/win32/setupapi/res/icons/40.ico (with props) trunk/reactos/dll/win32/setupapi/res/icons/41.ico (with props) trunk/reactos/dll/win32/setupapi/res/icons/42.ico (with props) trunk/reactos/dll/win32/setupapi/res/icons/43.ico (with props) trunk/reactos/dll/win32/setupapi/res/icons/5.ico (with props) trunk/reactos/dll/win32/setupapi/res/icons/50.ico (with props) trunk/reactos/dll/win32/setupapi/res/icons/500.ico (with props) trunk/reactos/dll/win32/setupapi/res/icons/501.ico (with props) trunk/reactos/dll/win32/setupapi/res/icons/502.ico (with props) trunk/reactos/dll/win32/setupapi/res/icons/51.ico (with props) trunk/reactos/dll/win32/setupapi/res/icons/52.ico (with props) trunk/reactos/dll/win32/setupapi/res/icons/53.ico (with props) trunk/reactos/dll/win32/setupapi/res/icons/54.ico (with props) trunk/reactos/dll/win32/setupapi/res/icons/6.ico (with props) trunk/reactos/dll/win32/setupapi/res/icons/7.ico (with props) trunk/reactos/dll/win32/setupapi/res/icons/8.ico (with props) trunk/reactos/dll/win32/setupapi/res/icons/9.ico (with props) trunk/reactos/dll/win32/setupapi/res/icons/Icon_Licence/ trunk/reactos/dll/win32/setupapi/res/icons/Icon_Licence/COPYING trunk/reactos/dll/win32/setupapi/res/icons/Icon_Licence/Tango.txt trunk/reactos/dll/win32/setupapi/res/lang/ trunk/reactos/dll/win32/setupapi/res/lang/Bg.rc trunk/reactos/dll/win32/setupapi/res/lang/Cs.rc trunk/reactos/dll/win32/setupapi/res/lang/Da.rc trunk/reactos/dll/win32/setupapi/res/lang/De.rc trunk/reactos/dll/win32/setupapi/res/lang/En.rc trunk/reactos/dll/win32/setupapi/res/lang/Eo.rc trunk/reactos/dll/win32/setupapi/res/lang/Es.rc trunk/reactos/dll/win32/setupapi/res/lang/Fi.rc trunk/reactos/dll/win32/setupapi/res/lang/Fr.rc trunk/reactos/dll/win32/setupapi/res/lang/Hu.rc trunk/reactos/dll/win32/setupapi/res/lang/It.rc trunk/reactos/dll/win32/setupapi/res/lang/Ja.rc trunk/reactos/dll/win32/setupapi/res/lang/Ko.rc trunk/reactos/dll/win32/setupapi/res/lang/Nl.rc trunk/reactos/dll/win32/setupapi/res/lang/No.rc trunk/reactos/dll/win32/setupapi/res/lang/Pl.rc trunk/reactos/dll/win32/setupapi/res/lang/Pt.rc trunk/reactos/dll/win32/setupapi/res/lang/Ru.rc trunk/reactos/dll/win32/setupapi/res/lang/Sv.rc trunk/reactos/dll/win32/setupapi/res/lang/Tr.rc Removed: trunk/reactos/dll/win32/setupapi/Bg.rc trunk/reactos/dll/win32/setupapi/Cs.rc trunk/reactos/dll/win32/setupapi/Da.rc trunk/reactos/dll/win32/setupapi/De.rc trunk/reactos/dll/win32/setupapi/En.rc trunk/reactos/dll/win32/setupapi/Eo.rc trunk/reactos/dll/win32/setupapi/Es.rc trunk/reactos/dll/win32/setupapi/Fi.rc trunk/reactos/dll/win32/setupapi/Fr.rc trunk/reactos/dll/win32/setupapi/Hu.rc trunk/reactos/dll/win32/setupapi/It.rc trunk/reactos/dll/win32/setupapi/Ja.rc trunk/reactos/dll/win32/setupapi/Ko.rc trunk/reactos/dll/win32/setupapi/Nl.rc trunk/reactos/dll/win32/setupapi/No.rc trunk/reactos/dll/win32/setupapi/Pl.rc trunk/reactos/dll/win32/setupapi/Pt.rc trunk/reactos/dll/win32/setupapi/Ru.rc trunk/reactos/dll/win32/setupapi/Sv.rc trunk/reactos/dll/win32/setupapi/Tr.rc Modified: trunk/reactos/dll/win32/setupapi/resource.h trunk/reactos/dll/win32/setupapi/setupapi.rc [This mail would be too long, it was shortened to contain the URLs only.] Removed: trunk/reactos/dll/win32/setupapi/Bg.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/Bg.rc?r…
Removed: trunk/reactos/dll/win32/setupapi/Cs.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/Cs.rc?r…
Removed: trunk/reactos/dll/win32/setupapi/Da.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/Da.rc?r…
Removed: trunk/reactos/dll/win32/setupapi/De.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/De.rc?r…
Removed: trunk/reactos/dll/win32/setupapi/En.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/En.rc?r…
Removed: trunk/reactos/dll/win32/setupapi/Eo.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/Eo.rc?r…
Removed: trunk/reactos/dll/win32/setupapi/Es.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/Es.rc?r…
Removed: trunk/reactos/dll/win32/setupapi/Fi.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/Fi.rc?r…
Removed: trunk/reactos/dll/win32/setupapi/Fr.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/Fr.rc?r…
Removed: trunk/reactos/dll/win32/setupapi/Hu.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/Hu.rc?r…
Removed: trunk/reactos/dll/win32/setupapi/It.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/It.rc?r…
Removed: trunk/reactos/dll/win32/setupapi/Ja.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/Ja.rc?r…
Removed: trunk/reactos/dll/win32/setupapi/Ko.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/Ko.rc?r…
Removed: trunk/reactos/dll/win32/setupapi/Nl.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/Nl.rc?r…
Removed: trunk/reactos/dll/win32/setupapi/No.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/No.rc?r…
Removed: trunk/reactos/dll/win32/setupapi/Pl.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/Pl.rc?r…
Removed: trunk/reactos/dll/win32/setupapi/Pt.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/Pt.rc?r…
Removed: trunk/reactos/dll/win32/setupapi/Ru.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/Ru.rc?r…
Removed: trunk/reactos/dll/win32/setupapi/Sv.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/Sv.rc?r…
Removed: trunk/reactos/dll/win32/setupapi/Tr.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/Tr.rc?r…
Added: trunk/reactos/dll/win32/setupapi/res/icons/1.ico URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/res/ico…
Added: trunk/reactos/dll/win32/setupapi/res/icons/10.ico URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/res/ico…
Added: trunk/reactos/dll/win32/setupapi/res/icons/105.ico URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/res/ico…
Added: trunk/reactos/dll/win32/setupapi/res/icons/11.ico URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/res/ico…
Added: trunk/reactos/dll/win32/setupapi/res/icons/159.ico URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/res/ico…
Added: trunk/reactos/dll/win32/setupapi/res/icons/161.ico URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/res/ico…
Added: trunk/reactos/dll/win32/setupapi/res/icons/18.ico URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/res/ico…
Added: trunk/reactos/dll/win32/setupapi/res/icons/19.ico URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/res/ico…
Added: trunk/reactos/dll/win32/setupapi/res/icons/2.ico URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/res/ico…
Added: trunk/reactos/dll/win32/setupapi/res/icons/20.ico URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/res/ico…
Added: trunk/reactos/dll/win32/setupapi/res/icons/21.ico URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/res/ico…
Added: trunk/reactos/dll/win32/setupapi/res/icons/22.ico URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/res/ico…
Added: trunk/reactos/dll/win32/setupapi/res/icons/23.ico URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/res/ico…
Added: trunk/reactos/dll/win32/setupapi/res/icons/24.ico URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/res/ico…
Added: trunk/reactos/dll/win32/setupapi/res/icons/25.ico URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/res/ico…
Added: trunk/reactos/dll/win32/setupapi/res/icons/26.ico URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/res/ico…
Added: trunk/reactos/dll/win32/setupapi/res/icons/27.ico URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/res/ico…
Added: trunk/reactos/dll/win32/setupapi/res/icons/28.ico URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/res/ico…
Added: trunk/reactos/dll/win32/setupapi/res/icons/3.ico URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/res/ico…
Added: trunk/reactos/dll/win32/setupapi/res/icons/4.ico URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/res/ico…
Added: trunk/reactos/dll/win32/setupapi/res/icons/40.ico URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/res/ico…
Added: trunk/reactos/dll/win32/setupapi/res/icons/41.ico URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/res/ico…
Added: trunk/reactos/dll/win32/setupapi/res/icons/42.ico URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/res/ico…
Added: trunk/reactos/dll/win32/setupapi/res/icons/43.ico URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/res/ico…
Added: trunk/reactos/dll/win32/setupapi/res/icons/5.ico URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/res/ico…
Added: trunk/reactos/dll/win32/setupapi/res/icons/50.ico URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/res/ico…
Added: trunk/reactos/dll/win32/setupapi/res/icons/500.ico URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/res/ico…
Added: trunk/reactos/dll/win32/setupapi/res/icons/501.ico URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/res/ico…
Added: trunk/reactos/dll/win32/setupapi/res/icons/502.ico URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/res/ico…
Added: trunk/reactos/dll/win32/setupapi/res/icons/51.ico URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/res/ico…
Added: trunk/reactos/dll/win32/setupapi/res/icons/52.ico URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/res/ico…
Added: trunk/reactos/dll/win32/setupapi/res/icons/53.ico URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/res/ico…
Added: trunk/reactos/dll/win32/setupapi/res/icons/54.ico URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/res/ico…
Added: trunk/reactos/dll/win32/setupapi/res/icons/6.ico URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/res/ico…
Added: trunk/reactos/dll/win32/setupapi/res/icons/7.ico URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/res/ico…
Added: trunk/reactos/dll/win32/setupapi/res/icons/8.ico URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/res/ico…
Added: trunk/reactos/dll/win32/setupapi/res/icons/9.ico URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/res/ico…
Added: trunk/reactos/dll/win32/setupapi/res/icons/Icon_Licence/COPYING URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/res/ico…
Added: trunk/reactos/dll/win32/setupapi/res/icons/Icon_Licence/Tango.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/res/ico…
Added: trunk/reactos/dll/win32/setupapi/res/lang/Bg.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/res/lan…
Added: trunk/reactos/dll/win32/setupapi/res/lang/Cs.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/res/lan…
Added: trunk/reactos/dll/win32/setupapi/res/lang/Da.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/res/lan…
Added: trunk/reactos/dll/win32/setupapi/res/lang/De.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/res/lan…
Added: trunk/reactos/dll/win32/setupapi/res/lang/En.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/res/lan…
Added: trunk/reactos/dll/win32/setupapi/res/lang/Eo.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/res/lan…
Added: trunk/reactos/dll/win32/setupapi/res/lang/Es.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/res/lan…
Added: trunk/reactos/dll/win32/setupapi/res/lang/Fi.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/res/lan…
Added: trunk/reactos/dll/win32/setupapi/res/lang/Fr.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/res/lan…
Added: trunk/reactos/dll/win32/setupapi/res/lang/Hu.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/res/lan…
Added: trunk/reactos/dll/win32/setupapi/res/lang/It.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/res/lan…
Added: trunk/reactos/dll/win32/setupapi/res/lang/Ja.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/res/lan…
Added: trunk/reactos/dll/win32/setupapi/res/lang/Ko.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/res/lan…
Added: trunk/reactos/dll/win32/setupapi/res/lang/Nl.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/res/lan…
Added: trunk/reactos/dll/win32/setupapi/res/lang/No.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/res/lan…
Added: trunk/reactos/dll/win32/setupapi/res/lang/Pl.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/res/lan…
Added: trunk/reactos/dll/win32/setupapi/res/lang/Pt.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/res/lan…
Added: trunk/reactos/dll/win32/setupapi/res/lang/Ru.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/res/lan…
Added: trunk/reactos/dll/win32/setupapi/res/lang/Sv.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/res/lan…
Added: trunk/reactos/dll/win32/setupapi/res/lang/Tr.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/res/lan…
Modified: trunk/reactos/dll/win32/setupapi/resource.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/resourc…
Modified: trunk/reactos/dll/win32/setupapi/setupapi.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/setupap…
18 years, 2 months
1
0
0
0
[gedmurphy] 24297: - fix the treeview so it displays parent and child devices - display the device icons for each item - other bits and bats I'm too lazy to list - it still load slowly due to multiple calls to SetupDiGetClassDevs. Need to think of a better way of gathering the info. For now though, it works.
by gedmurphy@svn.reactos.org
Author: gedmurphy Date: Fri Sep 29 20:38:38 2006 New Revision: 24297 URL:
http://svn.reactos.org/svn/reactos?rev=24297&view=rev
Log: - fix the treeview so it displays parent and child devices - display the device icons for each item - other bits and bats I'm too lazy to list - it still load slowly due to multiple calls to SetupDiGetClassDevs. Need to think of a better way of gathering the info. For now though, it works. Modified: trunk/reactos/base/applications/devmgmt/En.rc trunk/reactos/base/applications/devmgmt/devmgmt.c trunk/reactos/base/applications/devmgmt/enumdevices.c trunk/reactos/base/applications/devmgmt/mainwnd.c trunk/reactos/base/applications/devmgmt/manifest.xml trunk/reactos/base/applications/devmgmt/misc.c trunk/reactos/base/applications/devmgmt/precomp.h trunk/reactos/base/applications/devmgmt/resource.h Modified: trunk/reactos/base/applications/devmgmt/En.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/devmgmt/…
============================================================================== --- trunk/reactos/base/applications/devmgmt/En.rc (original) +++ trunk/reactos/base/applications/devmgmt/En.rc Fri Sep 29 20:38:38 2006 @@ -2,20 +2,27 @@ BEGIN POPUP "&File" BEGIN - MENUITEM "E&xit", IDC_EXIT + MENUITEM "E&xit", IDC_EXIT END POPUP "Action" BEGIN - MENUITEM "Print", IDC_PRINT, GRAYED + MENUITEM "Print", IDC_PRINT, GRAYED MENUITEM SEPARATOR - MENUITEM "Properties...", IDC_PROP + MENUITEM "Properties...", IDC_PROP MENUITEM SEPARATOR - MENUITEM "Help", IDC_PROGHELP, GRAYED + MENUITEM "Help", IDC_PROGHELP, GRAYED + END + POPUP "View" + BEGIN + MENUITEM "Devices by type", IDC_STATIC + MENUITEM "Devices by connection", IDC_STATIC, GRAYED + MENUITEM "Resources by type", IDC_STATIC, GRAYED + MENUITEM "Resources by connection", IDC_STATIC, GRAYED END POPUP "Help" BEGIN - MENUITEM "Help", IDC_PROGHELP - MENUITEM "About", IDC_ABOUT + MENUITEM "Help", IDC_PROGHELP + MENUITEM "About", IDC_ABOUT END END @@ -23,9 +30,9 @@ BEGIN POPUP "popup" BEGIN - MENUITEM "Properties...", IDC_PROP, GRAYED + MENUITEM "Properties...", IDC_PROP, GRAYED MENUITEM SEPARATOR - MENUITEM "Help", IDC_PROGHELP + MENUITEM "Help", IDC_PROGHELP END END Modified: trunk/reactos/base/applications/devmgmt/devmgmt.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/devmgmt/…
============================================================================== --- trunk/reactos/base/applications/devmgmt/devmgmt.c (original) +++ trunk/reactos/base/applications/devmgmt/devmgmt.c Fri Sep 29 20:38:38 2006 @@ -38,6 +38,9 @@ return 1; } +// FreeConsole(); +// AllocConsole(); + if (InitMainWindowImpl()) { hMainWnd = CreateMainWindow(lpAppName, Modified: trunk/reactos/base/applications/devmgmt/enumdevices.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/devmgmt/…
============================================================================== --- trunk/reactos/base/applications/devmgmt/enumdevices.c (original) +++ trunk/reactos/base/applications/devmgmt/enumdevices.c Fri Sep 29 20:38:38 2006 @@ -31,7 +31,7 @@ tvi.iSelectedImage = DevImage; tvins.item = tvi; - tvins.hInsertAfter = hRoot; + tvins.hParent = hRoot; return TreeView_InsertItem(hTV, &tvins); } @@ -39,23 +39,23 @@ static INT EnumDeviceClasses(INT ClassIndex, - TCHAR *DeviceClassName, - TCHAR *DeviceClassDesc, - BOOL *DevicePresent, + LPTSTR DevClassName, + LPTSTR DevClassDesc, + BOOL *DevPresent, INT *ClassImage) { GUID ClassGuid; HKEY KeyClass; - HDEVINFO hDevInfo; TCHAR ClassName[MAX_CLASS_NAME_LEN]; DWORD RequiredSize = MAX_CLASS_NAME_LEN; UINT Ret; - *DevicePresent = FALSE; + *DevPresent = FALSE; Ret = CM_Enumerate_Classes(ClassIndex, &ClassGuid, 0); + if (Ret != CR_SUCCESS) { /* all classes enumerated */ @@ -73,11 +73,11 @@ RequiredSize, &RequiredSize)) { - lstrcpy(DeviceClassName, ClassName); + lstrcpy(DevClassName, ClassName); } else { - *DeviceClassName = _T('\0'); + *DevClassName = _T('\0'); } if (!SetupDiGetClassImageIndex(&ImageListData, @@ -88,13 +88,14 @@ *ClassImage = 41; } - /* FIXME: why are we calling this here? */ + /* FIXME: do we need this? hDevInfo = SetupDiGetClassDevs(&ClassGuid, 0, NULL, DIGCF_PRESENT); if (hDevInfo == INVALID_HANDLE_VALUE) - return -2; + return 0; + */ KeyClass = SetupDiOpenClassRegKeyEx(&ClassGuid, MAXIMUM_ALLOWED, @@ -103,14 +104,15 @@ 0); if (KeyClass != INVALID_HANDLE_VALUE) { + DWORD dwSize = MAX_CLASS_NAME_LEN; if (RegQueryValue(KeyClass, NULL, - DeviceClassDesc, + DevClassDesc, &dwSize) != ERROR_SUCCESS) { - *DeviceClassDesc = _T('\0'); + *DevClassDesc = _T('\0'); } } else @@ -118,10 +120,10 @@ return -3; } - /* FIXME: Can we call this earlier, or see above? */ - SetupDiDestroyDeviceInfoList(hDevInfo); - - *DevicePresent = TRUE; + /* FIXME: see above? + SetupDiDestroyDeviceInfoList(hDevInfo); */ + + *DevPresent = TRUE; RegCloseKey(KeyClass); @@ -143,16 +145,16 @@ *DeviceName = _T('\0'); bRet = SetupDiClassGuidsFromName(DeviceClassName, - NULL, - RequiredSize, - &RequiredSize); + NULL, + RequiredSize, + &RequiredSize); if (RequiredSize == 0) return -2; if (!bRet) { - guids = HeapAlloc(GetProcessHeap(), - 0, + guids = HeapAlloc(GetProcessHeap(), + 0, RequiredSize * sizeof(GUID)); if (guids == NULL) return -1; @@ -170,12 +172,13 @@ } } +//TimerInfo(_T("IN")); /* get device info set for our device class */ hDevInfo = SetupDiGetClassDevs(guids, 0, NULL, DIGCF_PRESENT); - +//TimerInfo(_T("OUT")); HeapFree(GetProcessHeap(), 0, guids); if(hDevInfo == INVALID_HANDLE_VALUE) { @@ -322,7 +325,6 @@ TCHAR ComputerName[MAX_PATH]; DWORD dwSize = MAX_PATH; INT RootImage; - //COLORREF Mask = RGB(255, 0, 128); TreeView_DeleteAllItems(Info->hTreeView); @@ -337,8 +339,10 @@ hComp, NULL); + DeleteObject(hComp); + TreeView_SetImageList(Info->hTreeView, - &ImageListData.ImageList, + ImageListData.ImageList, TVSIL_NORMAL); if (!GetComputerName(ComputerName, @@ -349,6 +353,7 @@ RootImage = ImageList_GetImageCount(ImageListData.ImageList) - 1; + /* insert the root item into the tree */ hRoot = InsertIntoTreeView(Info->hTreeView, NULL, ComputerName, Modified: trunk/reactos/base/applications/devmgmt/mainwnd.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/devmgmt/…
============================================================================== --- trunk/reactos/base/applications/devmgmt/mainwnd.c (original) +++ trunk/reactos/base/applications/devmgmt/mainwnd.c Fri Sep 29 20:38:38 2006 @@ -248,23 +248,30 @@ break; case IDC_PROGHELP: + { DisplayString(_T("Help is not yet implemented\n")); SetFocus(Info->hTreeView); + } break; case IDC_EXIT: + { PostMessage(Info->hMainWnd, WM_CLOSE, 0, 0); + } break; case IDC_ABOUT: + { DialogBox(hInstance, MAKEINTRESOURCE(IDD_ABOUTBOX), Info->hMainWnd, (DLGPROC)AboutDialogProc); + SetFocus(Info->hTreeView); + } break; } Modified: trunk/reactos/base/applications/devmgmt/manifest.xml URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/devmgmt/…
============================================================================== --- trunk/reactos/base/applications/devmgmt/manifest.xml (original) +++ trunk/reactos/base/applications/devmgmt/manifest.xml Fri Sep 29 20:38:38 2006 @@ -7,7 +7,7 @@ processorArchitecture="x86" version="1.0.0.0" type="win32"/> -<description>ReactOS Service Manager</description> +<description>ReactOS Device Manager</description> <dependency> <dependentAssembly> <assemblyIdentity Modified: trunk/reactos/base/applications/devmgmt/misc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/devmgmt/…
============================================================================== --- trunk/reactos/base/applications/devmgmt/misc.c (original) +++ trunk/reactos/base/applications/devmgmt/misc.c Fri Sep 29 20:38:38 2006 @@ -259,3 +259,20 @@ MessageBox(NULL, Msg, _T("Note!"), MB_ICONEXCLAMATION|MB_OK); } + +VOID TimerInfo(LPTSTR text) +{ + static HANDLE hOut = NULL; + DWORD Count; + TCHAR buf[256]; + static DWORD start = 0; + + if (!start) start = GetTickCount(); + + if (!hOut) hOut = GetStdHandle(STD_ERROR_HANDLE); + + if (text) _sntprintf(buf, 256, _T("%s\ttime : %d\n"), text, GetTickCount() - start); + else _sntprintf(buf, 256, _T("time : %d\n"), GetTickCount() - start); + + WriteConsole(hOut, buf, lstrlen(buf)+1, &Count, NULL); +} Modified: trunk/reactos/base/applications/devmgmt/precomp.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/devmgmt/…
============================================================================== --- trunk/reactos/base/applications/devmgmt/precomp.h (original) +++ trunk/reactos/base/applications/devmgmt/precomp.h Fri Sep 29 20:38:38 2006 @@ -1,9 +1,9 @@ #ifndef __DEVMGMT_PRECOMP_H #define __DEVMGMT_PRECOMP_H -//#define WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN #include <windows.h> -#include <windowsx.h> /* GET_X/Y_LPARAM */ +#include <windowsx.h> #include <stdio.h> #include <tchar.h> #include <setupapi.h> @@ -15,14 +15,7 @@ #pragma warning(disable : 4100) #endif -#ifndef SB_SIMPLEID -#define SB_SIMPLEID 0xFF -#endif - -#define NO_ITEM_SELECTED -1 -#define MAX_KEY_LENGTH 256 #define MAX_DEV_LEN 1000 - typedef struct _MAIN_WND_INFO { @@ -89,14 +82,16 @@ IN HWND hDlg, IN UINT Res); -VOID GetError(VOID); - -VOID DisplayString(PTCHAR); - HIMAGELIST InitImageList(UINT NumButtons, UINT StartResource, UINT Width, UINT Height); +VOID GetError(VOID); + +VOID DisplayString(PTCHAR); + +VOID TimerInfo(LPTSTR); + #endif /* __DEVMGMT_PRECOMP_H */ Modified: trunk/reactos/base/applications/devmgmt/resource.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/devmgmt/…
============================================================================== --- trunk/reactos/base/applications/devmgmt/resource.h (original) +++ trunk/reactos/base/applications/devmgmt/resource.h Fri Sep 29 20:38:38 2006 @@ -1,5 +1,4 @@ -#define IDC_STATIC -1 - +#define IDC_STATIC -1 #define IDI_MAIN_ICON 50 #define IDB_ROOT_IMAGE 51
18 years, 2 months
1
0
0
0
← Newer
1
2
3
4
5
6
...
15
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Results per page:
10
25
50
100
200