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
2025
January
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
October 2014
----- 2025 -----
January 2025
----- 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
19 participants
730 discussions
Start a n
N
ew thread
[spetreolle] 64520: [EVENTVWR] -Fix use of unitialized handle for the waiting dialog. -Allocate the size of one event for each event, not the amount of all events.
by spetreolle@svn.reactos.org
Author: spetreolle Date: Sat Oct 4 13:34:19 2014 New Revision: 64520 URL:
http://svn.reactos.org/svn/reactos?rev=64520&view=rev
Log: [EVENTVWR] -Fix use of unitialized handle for the waiting dialog. -Allocate the size of one event for each event, not the amount of all events. Modified: trunk/reactos/base/applications/mscutils/eventvwr/eventvwr.c Modified: trunk/reactos/base/applications/mscutils/eventvwr/eventvwr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
============================================================================== --- trunk/reactos/base/applications/mscutils/eventvwr/eventvwr.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/mscutils/eventvwr/eventvwr.c [iso-8859-1] Sat Oct 4 13:34:19 2014 @@ -520,7 +520,7 @@ QueryEventMessages(LPWSTR lpMachineName, LPWSTR lpLogName) { - HWND hwndDlg; + HWND hwndDlg=0; HANDLE hEventLog; EVENTLOGRECORD *pevlr; DWORD dwRead, dwNeeded, dwThisRecord, dwTotalRecords = 0, dwCurrentRecord = 0, dwRecordsToRead = 0, dwFlags, dwMaxLength; @@ -599,7 +599,7 @@ while (dwCurrentRecord < dwTotalRecords) { - pevlr = HeapAlloc(GetProcessHeap(), 0, sizeof(EVENTLOGRECORD) * dwTotalRecords); + pevlr = HeapAlloc(GetProcessHeap(), 0, sizeof(EVENTLOGRECORD)); g_RecordPtrs[dwCurrentRecord] = pevlr; bResult = ReadEventLog(hEventLog, // Event log handle @@ -713,7 +713,8 @@ } // All events loaded - EndDialog(hwndDlg, 0); + if(hwndDlg) + EndDialog(hwndDlg, 0); StringCchPrintfExW(szWindowTitle, sizeof(szWindowTitle) / sizeof(WCHAR),
10 years, 3 months
1
0
0
0
[tfaber] 64519: [CRT] - Add __fastfail intrinsic implementation for GCC and MSVC <= 2010. Patch by Timo Kreuzer. CORE-8419
by tfaber@svn.reactos.org
Author: tfaber Date: Sat Oct 4 12:03:37 2014 New Revision: 64519 URL:
http://svn.reactos.org/svn/reactos?rev=64519&view=rev
Log: [CRT] - Add __fastfail intrinsic implementation for GCC and MSVC <= 2010. Patch by Timo Kreuzer. CORE-8419 Modified: trunk/reactos/include/crt/mingw32/intrin_x86.h trunk/reactos/include/crt/msc/intrin.h Modified: trunk/reactos/include/crt/mingw32/intrin_x86.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/mingw32/intrin…
============================================================================== --- trunk/reactos/include/crt/mingw32/intrin_x86.h [iso-8859-1] (original) +++ trunk/reactos/include/crt/mingw32/intrin_x86.h [iso-8859-1] Sat Oct 4 12:03:37 2014 @@ -1504,6 +1504,7 @@ __INTRIN_INLINE void _disable(void); __INTRIN_INLINE void _enable(void); __INTRIN_INLINE void __halt(void); +__declspec(noreturn) __INTRIN_INLINE void __fastfail(unsigned int Code); #ifdef __clang__ #define __debugbreak() __asm__("int $3") @@ -1532,7 +1533,13 @@ __INTRIN_INLINE void __halt(void) { - __asm__("hlt\n\t" : : : "memory"); + __asm__("hlt" : : : "memory"); +} + +__declspec(noreturn) +__INTRIN_INLINE void __fastfail(unsigned int Code) +{ + __asm__("int $0x29" : : "c"(Code) : "memory"); } /*** Protected memory management ***/ Modified: trunk/reactos/include/crt/msc/intrin.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/msc/intrin.h?r…
============================================================================== --- trunk/reactos/include/crt/msc/intrin.h [iso-8859-1] (original) +++ trunk/reactos/include/crt/msc/intrin.h [iso-8859-1] Sat Oct 4 12:03:37 2014 @@ -587,6 +587,16 @@ #if (_MSC_VER >= 1700) __declspec(noreturn) void __fastfail(unsigned int Code); #pragma intrinsic(__fastfail) +#else +__declspec(noreturn) __forceinline +void __fastfail(unsigned int Code) +{ + __asm + { + mov ecx, Code + int 29h + } +} #endif #endif #if defined(_M_ARM)
10 years, 3 months
1
0
0
0
[tfaber] 64518: [NTOS:FORMATTING] - Remove some trailing whitespace
by tfaber@svn.reactos.org
Author: tfaber Date: Sat Oct 4 08:43:15 2014 New Revision: 64518 URL:
http://svn.reactos.org/svn/reactos?rev=64518&view=rev
Log: [NTOS:FORMATTING] - Remove some trailing whitespace Modified: trunk/reactos/ntoskrnl/ke/i386/context.c trunk/reactos/ntoskrnl/ke/i386/ctxswitch.S trunk/reactos/ntoskrnl/ke/i386/irqobj.c trunk/reactos/ntoskrnl/ke/i386/traphdlr.c Modified: trunk/reactos/ntoskrnl/ke/i386/context.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/context.c…
============================================================================== --- trunk/reactos/ntoskrnl/ke/i386/context.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ke/i386/context.c [iso-8859-1] Sat Oct 4 08:43:15 2014 @@ -24,7 +24,7 @@ PKIPCR Pcr = (PKIPCR)KeGetPcr(); #ifdef CONFIG_SMP LONG SetMember; - + /* Update active processor mask */ SetMember = (LONG)Pcr->SetMember; InterlockedXor((PLONG)&NewProcess->ActiveProcessors, SetMember); @@ -38,13 +38,13 @@ UNIMPLEMENTED_DBGBREAK(); return; } - + /* Update CR3 */ __writecr3(NewProcess->DirectoryTableBase[0]); - + /* Clear GS */ Ke386SetGs(0); - + /* Update IOPM offset */ Pcr->TSS->IoMapBase = NewProcess->IopmOffset; } Modified: trunk/reactos/ntoskrnl/ke/i386/ctxswitch.S URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/ctxswitch…
============================================================================== --- trunk/reactos/ntoskrnl/ke/i386/ctxswitch.S [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ke/i386/ctxswitch.S [iso-8859-1] Sat Oct 4 08:43:15 2014 @@ -3,7 +3,7 @@ * PROJECT: ReactOS kernel * FILE: ntoskrnl/ke/i386/ctxswitch.S * PURPOSE: Thread Context Switching - * + * * PROGRAMMERS: Alex Ionescu (alex(a)relsoft.net) * Gregor Anich (FPU Code) */ @@ -63,7 +63,7 @@ /* Load the new kernel stack and switch OS to new thread */ mov esp, edx call @KiSwapContextExit@8 - + /* Now we're on the new thread. Return to the caller to restore registers */ add esp, 2 * 4 ret Modified: trunk/reactos/ntoskrnl/ke/i386/irqobj.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/irqobj.c?…
============================================================================== --- trunk/reactos/ntoskrnl/ke/i386/irqobj.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ke/i386/irqobj.c [iso-8859-1] Sat Oct 4 08:43:15 2014 @@ -143,7 +143,7 @@ _disable(); HalEndSystemInterrupt(OldIrql, TrapFrame); } - + /* Now exit the trap */ KiEoiHelper(TrapFrame); } @@ -154,25 +154,25 @@ /* Crash the machine */ KeBugCheck(TRAP_CAUSE_UNKNOWN); } - + VOID FASTCALL KiUnexpectedInterruptTailHandler(IN PKTRAP_FRAME TrapFrame) { KIRQL OldIrql; - + /* Enter trap */ KiEnterInterruptTrap(TrapFrame); - + /* Increase interrupt count */ KeGetCurrentPrcb()->InterruptCount++; - + /* Start the interrupt */ if (HalBeginSystemInterrupt(HIGH_LEVEL, TrapFrame->ErrCode, &OldIrql)) { /* Warn user */ DPRINT1("\n\x7\x7!!! Unexpected Interrupt 0x%02lx !!!\n", TrapFrame->ErrCode); - + /* Now call the epilogue code */ KiExitInterrupt(TrapFrame, OldIrql, FALSE); } @@ -194,12 +194,12 @@ FASTCALL KiInterruptDispatch(IN PKTRAP_FRAME TrapFrame, IN PKINTERRUPT Interrupt) -{ +{ KIRQL OldIrql; /* Increase interrupt count */ KeGetCurrentPrcb()->InterruptCount++; - + /* Begin the interrupt, making sure it's not spurious */ if (HalBeginSystemInterrupt(Interrupt->SynchronizeIrql, Interrupt->Vector, @@ -207,13 +207,13 @@ { /* Acquire interrupt lock */ KxAcquireSpinLock(Interrupt->ActualLock); - + /* Call the ISR */ Interrupt->ServiceRoutine(Interrupt, Interrupt->ServiceContext); - + /* Release interrupt lock */ KxReleaseSpinLock(Interrupt->ActualLock); - + /* Now call the epilogue code */ KiExitInterrupt(TrapFrame, OldIrql, FALSE); } @@ -252,7 +252,7 @@ /* Raise to higher IRQL */ OldInterruptIrql = KfRaiseIrql(Interrupt->SynchronizeIrql); } - + /* Acquire interrupt lock */ KxAcquireSpinLock(Interrupt->ActualLock); @@ -262,7 +262,7 @@ /* Release interrupt lock */ KxReleaseSpinLock(Interrupt->ActualLock); - + /* Check if this interrupt's IRQL is higher than the current one */ if (Interrupt->SynchronizeIrql > Interrupt->Irql) { @@ -270,23 +270,23 @@ ASSERT(OldInterruptIrql == Interrupt->Irql); KfLowerIrql(OldInterruptIrql); } - + /* Check if the interrupt got handled and it's level */ if ((Handled) && (Interrupt->Mode == LevelSensitive)) break; - + /* What's next? */ NextEntry = NextEntry->Flink; - + /* Is this the last one? */ if (NextEntry == ListHead) { /* Level should not have gotten here */ if (Interrupt->Mode == LevelSensitive) break; - + /* As for edge, we can only exit once nobody can handle the interrupt */ if (!Handled) break; } - + /* Get the interrupt object for the next pass */ Interrupt = CONTAINING_RECORD(NextEntry, KINTERRUPT, InterruptListEntry); } @@ -575,22 +575,22 @@ { BOOLEAN Success; KIRQL OldIrql; - + /* Raise IRQL */ OldIrql = KfRaiseIrql(Interrupt->SynchronizeIrql); - + /* Acquire interrupt spinlock */ KeAcquireSpinLockAtDpcLevel(Interrupt->ActualLock); - + /* Call the routine */ Success = SynchronizeRoutine(SynchronizeContext); - + /* Release lock */ KeReleaseSpinLockFromDpcLevel(Interrupt->ActualLock); - + /* Lower IRQL */ KfLowerIrql(OldIrql); - + /* Return status */ return Success; } Modified: trunk/reactos/ntoskrnl/ke/i386/traphdlr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/traphdlr.…
============================================================================== --- trunk/reactos/ntoskrnl/ke/i386/traphdlr.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ke/i386/traphdlr.c [iso-8859-1] Sat Oct 4 08:43:15 2014 @@ -147,13 +147,13 @@ { ASSERT((TrapFrame->EFlags & EFLAGS_V86_MASK) == 0); ASSERT(!KiIsFrameEdited(TrapFrame)); - + /* Copy the status into EAX */ TrapFrame->Eax = Status; - + /* Common trap exit code */ KiCommonExit(TrapFrame, FALSE); - + /* Restore previous mode */ KeGetCurrentThread()->PreviousMode = (CCHAR)TrapFrame->PreviousPreviousMode; @@ -184,10 +184,10 @@ { /* Common trap exit code */ KiCommonExit(TrapFrame, FALSE); - + /* Restore previous mode */ KeGetCurrentThread()->PreviousMode = (CCHAR)TrapFrame->PreviousPreviousMode; - + /* Check if this was a V8086 trap */ if (TrapFrame->EFlags & EFLAGS_V86_MASK) KiTrapReturnNoSegments(TrapFrame); @@ -282,14 +282,14 @@ /* Clear the TS bit and re-enable interrupts */ SaveArea->Cr0NpxState &= ~CR0_TS; _enable(); - + /* Check if we should get the FN or FX error */ if (KeI386FxsrPresent) { /* Get it from FX */ Mask = SaveArea->U.FxArea.ControlWord; Error = SaveArea->U.FxArea.StatusWord; - + /* Get the FPU exception address too */ ErrorOffset = SaveArea->U.FxArea.ErrorOffset; DataOffset = SaveArea->U.FxArea.DataOffset; @@ -299,7 +299,7 @@ /* Get it from FN */ Mask = SaveArea->U.FnArea.ControlWord; Error = SaveArea->U.FnArea.StatusWord; - + /* Get the FPU exception address too */ ErrorOffset = SaveArea->U.FnArea.ErrorOffset; DataOffset = SaveArea->U.FnArea.DataOffset; @@ -338,7 +338,7 @@ 0, TrapFrame); } - + /* Check for divide by zero */ if (Error & FSW_ZERO_DIVIDE) { @@ -348,7 +348,7 @@ 0, TrapFrame); } - + /* Check for denormal */ if (Error & FSW_DENORMAL) { @@ -358,7 +358,7 @@ 0, TrapFrame); } - + /* Check for overflow */ if (Error & FSW_OVERFLOW) { @@ -368,7 +368,7 @@ 0, TrapFrame); } - + /* Check for underflow */ if (Error & FSW_UNDERFLOW) { @@ -388,7 +388,7 @@ 0, TrapFrame); } - + /* Unknown FPU fault */ KeBugCheckWithTf(TRAP_CAUSE_UNKNOWN, 1, Error, 0, 0, TrapFrame); } @@ -400,13 +400,13 @@ { /* Save trap frame */ KiEnterTrap(TrapFrame); - + /* Check for VDM trap */ ASSERT((KiVdmTrap(TrapFrame)) == FALSE); /* Enable interrupts */ _enable(); - + /* Dispatch the exception */ KiDispatchException0Args(STATUS_INTEGER_DIVIDE_BY_ZERO, TrapFrame->Eip, @@ -458,7 +458,7 @@ PKGDTENTRY TssGdt; KTRAP_FRAME TrapFrame; KIRQL OldIrql; - + // // In some sort of strange recursion case, we might end up here with the IF // flag incorrectly on the interrupt frame -- during a normal NMI this would @@ -475,14 +475,14 @@ Tss = PCR->TSS; Thread = ((PKIPCR)PCR)->PrcbData.CurrentThread; Process = Thread->ApcState.Process; - + // // Save data usually not in the TSS // Tss->CR3 = Process->DirectoryTableBase[0]; Tss->IoMapBase = Process->IopmOffset; Tss->LDT = Process->LdtDescriptor.LimitLow ? KGDT_LDT : 0; - + // // Now get the base address of the NMI TSS // @@ -490,7 +490,7 @@ NmiTss = (PKTSS)(ULONG_PTR)(TssGdt->BaseLow | TssGdt->HighWord.Bytes.BaseMid << 16 | TssGdt->HighWord.Bytes.BaseHi << 24); - + // // Switch to it and activate it, masking off the nested flag // @@ -502,7 +502,7 @@ TssGdt->HighWord.Bits.Dpl = 0; TssGdt->HighWord.Bits.Pres = 1; TssGdt->HighWord.Bits.Type = I386_TSS; - + // // Now build the trap frame based on the original TSS // @@ -532,12 +532,12 @@ TrapFrame.SegGs = Tss->Gs; TrapFrame.DbgEip = Tss->Eip; TrapFrame.DbgEbp = Tss->Ebp; - + // // Store the trap frame in the KPRCB // KiSaveProcessorState(&TrapFrame, NULL); - + // // Call any registered NMI handlers and see if they handled it or not // @@ -569,25 +569,25 @@ // Restore original TSS // PCR->TSS = Tss; - + // // Set it back to busy // TssGdt->HighWord.Bits.Dpl = 0; TssGdt->HighWord.Bits.Pres = 1; TssGdt->HighWord.Bits.Type = I386_ACTIVE_TSS; - + // // Restore nested flag // __writeeflags(__readeflags() | EFLAGS_NESTED_TASK); - + // // Handled, return from interrupt // KiIret(); } - + // // Unhandled: crash the system // @@ -601,7 +601,7 @@ { /* Save trap frame */ KiEnterTrap(TrapFrame); - + /* Continue with the common handler */ KiDebugHandler(TrapFrame, BREAKPOINT_BREAK, 0, 0); } @@ -613,13 +613,13 @@ { /* Save trap frame */ KiEnterTrap(TrapFrame); - + /* Check for VDM trap */ ASSERT((KiVdmTrap(TrapFrame)) == FALSE); /* Enable interrupts */ _enable(); - + /* Dispatch the exception */ KiDispatchException0Args(STATUS_INTEGER_OVERFLOW, TrapFrame->Eip - 1, @@ -633,16 +633,16 @@ { /* Save trap frame */ KiEnterTrap(TrapFrame); - + /* Check for VDM trap */ ASSERT((KiVdmTrap(TrapFrame)) == FALSE); - + /* Check for kernel-mode fault */ if (!KiUserTrap(TrapFrame)) KiSystemFatalException(EXCEPTION_BOUND_CHECK, TrapFrame); /* Enable interrupts */ _enable(); - + /* Dispatch the exception */ KiDispatchException0Args(STATUS_ARRAY_BOUNDS_EXCEEDED, TrapFrame->Eip, @@ -657,56 +657,56 @@ PUCHAR Instruction; ULONG i; KIRQL OldIrql; - + /* Check for V86 GPF */ if (__builtin_expect(KiV86Trap(TrapFrame), 1)) { /* Enter V86 trap */ KiEnterV86Trap(TrapFrame); - + /* Must be a VDM process */ if (__builtin_expect(!PsGetCurrentProcess()->VdmObjects, 0)) { /* Enable interrupts */ _enable(); - + /* Setup illegal instruction fault */ KiDispatchException0Args(STATUS_ILLEGAL_INSTRUCTION, TrapFrame->Eip, TrapFrame); } - + /* Go to APC level */ OldIrql = KfRaiseIrql(APC_LEVEL); _enable(); - + /* Check for BOP */ if (!VdmDispatchBop(TrapFrame)) { /* Should only happen in VDM mode */ UNIMPLEMENTED_FATAL(); } - + /* Bring IRQL back */ KfLowerIrql(OldIrql); _disable(); - + /* Do a quick V86 exit if possible */ KiExitV86Trap(TrapFrame); } /* Save trap frame */ KiEnterTrap(TrapFrame); - + /* Enable interrupts */ Instruction = (PUCHAR)TrapFrame->Eip; _enable(); - + /* Check for user trap */ if (KiUserTrap(TrapFrame)) { /* FIXME: Use SEH */ - + /* Scan next 4 opcodes */ for (i = 0; i < 4; i++) { @@ -719,15 +719,15 @@ TrapFrame); } } - + /* FIXME: SEH ends here */ } - + /* Kernel-mode or user-mode fault (but not LOCK) */ KiDispatchException0Args(STATUS_ILLEGAL_INSTRUCTION, TrapFrame->Eip, TrapFrame); - + } DECLSPEC_NORETURN @@ -738,7 +738,7 @@ PKTHREAD Thread, NpxThread; PFX_SAVE_AREA SaveArea, NpxSaveArea; ULONG Cr0; - + /* Save trap frame */ KiEnterTrap(TrapFrame); @@ -757,7 +757,7 @@ /* Not implemented */ UNIMPLEMENTED_FATAL(); } - + /* Save CR0 and check NPX state */ Cr0 = __readcr0(); if (Thread->NpxState != NPX_STATE_LOADED) @@ -765,14 +765,14 @@ /* Update CR0 */ Cr0 &= ~(CR0_MP | CR0_EM | CR0_TS); __writecr0(Cr0); - + /* Get the NPX thread */ NpxThread = KeGetCurrentPrcb()->NpxThread; if (NpxThread) { /* Get the NPX frame */ NpxSaveArea = KiGetThreadNpxArea(NpxThread); - + /* Save FPU state */ DPRINT("FIXME: Save FPU state: %p\n", NpxSaveArea); //Ke386SaveFpuState(NpxSaveArea); @@ -780,32 +780,32 @@ /* Update NPX state */ NpxThread->NpxState = NPX_STATE_NOT_LOADED; } - + /* Load FPU state */ //Ke386LoadFpuState(SaveArea); - + /* Update NPX state */ Thread->NpxState = NPX_STATE_LOADED; KeGetCurrentPrcb()->NpxThread = Thread; - + /* Enable interrupts */ _enable(); - + /* Check if CR0 needs to be reloaded due to context switch */ if (!SaveArea->Cr0NpxState) KiEoiHelper(TrapFrame); - + /* Otherwise, we need to reload CR0, disable interrupts */ _disable(); - + /* Reload CR0 */ Cr0 = __readcr0(); Cr0 |= SaveArea->Cr0NpxState; __writecr0(Cr0); - + /* Now restore interrupts and check for TS */ _enable(); if (Cr0 & CR0_TS) KiEoiHelper(TrapFrame); - + /* We're still here -- clear TS and try again */ __writecr0(__readcr0() &~ CR0_TS); _disable(); @@ -816,7 +816,7 @@ break; } } - + /* TS should not be set */ if (Cr0 & CR0_TS) { @@ -831,11 +831,11 @@ __writecr0(__readcr0() &~ CR0_TS); KiEoiHelper(TrapFrame); } - + /* Otherwise, something strange is going on */ KeBugCheckWithTf(TRAP_CAUSE_UNKNOWN, 2, Cr0, 0, 0, TrapFrame); } - + /* It's not a delayed load, so process this trap as an NPX fault */ KiNpxHandler(TrapFrame, Thread, SaveArea); } @@ -913,44 +913,44 @@ PUCHAR Instructions; UCHAR Instruction = 0; KIRQL OldIrql; - + /* Check for V86 GPF */ if (__builtin_expect(KiV86Trap(TrapFrame), 1)) { /* Enter V86 trap */ KiEnterV86Trap(TrapFrame); - + /* Must be a VDM process */ if (__builtin_expect(!PsGetCurrentProcess()->VdmObjects, 0)) { /* Enable interrupts */ _enable(); - + /* Setup illegal instruction fault */ KiDispatchException0Args(STATUS_ILLEGAL_INSTRUCTION, TrapFrame->Eip, TrapFrame); } - + /* Go to APC level */ OldIrql = KfRaiseIrql(APC_LEVEL); _enable(); - + /* Handle the V86 opcode */ if (__builtin_expect(Ki386HandleOpcodeV86(TrapFrame) == 0xFF, 0)) { /* Should only happen in VDM mode */ UNIMPLEMENTED_FATAL(); } - + /* Bring IRQL back */ KfLowerIrql(OldIrql); _disable(); - + /* Do a quick V86 exit if possible */ KiExitV86Trap(TrapFrame); } - + /* Save trap frame */ KiEnterTrap(TrapFrame); @@ -959,14 +959,14 @@ { /* Should not be VDM */ ASSERT(KiVdmTrap(TrapFrame) == FALSE); - + /* Enable interrupts and check error code */ _enable(); if (!TrapFrame->ErrCode) { /* FIXME: Use SEH */ Instructions = (PUCHAR)TrapFrame->Eip; - + /* Scan next 15 bytes */ for (i = 0; i < 15; i++) { @@ -980,7 +980,7 @@ break; } } - + /* Is this NOT any prefix instruction? */ if (j == sizeof(KiTrapPrefixTable)) { @@ -989,7 +989,7 @@ break; } } - + /* If all we found was prefixes, then this instruction is too long */ if (i == 15) { @@ -998,7 +998,7 @@ TrapFrame->Eip, TrapFrame); } - + /* Check for privileged instructions */ DPRINT("Instruction (%lu) at fault: %lx %lx %lx %lx\n", i, @@ -1065,7 +1065,7 @@ } } } - + /* So now... was the instruction privileged or not? */ if (Privileged) { @@ -1075,7 +1075,7 @@ TrapFrame); } } - + /* If we got here, send an access violation */ KiDispatchException2Args(STATUS_ACCESS_VIOLATION, TrapFrame->Eip, @@ -1123,7 +1123,7 @@ * when the user is purposedly trying to create one from kernel-mode, so * we should probably table this for now since it's not a "real" issue. */ - + /* * NOTE2: Another scenario is the IRET during a V8086 restore (BIOS Call) * which will cause a GPF since the trap frame is a total mess (on purpose) @@ -1153,7 +1153,7 @@ UNIMPLEMENTED_FATAL(); } } - + /* So since we're not dealing with the above case, check for RDMSR/WRMSR */ if ((Instructions[0] == 0xF) && // 2-byte opcode ((Instructions[1] == 0x32) || // RDMSR @@ -1181,7 +1181,7 @@ /* Whatever it is, we can't handle it */ KiSystemFatalException(EXCEPTION_GP_FAULT, TrapFrame); } - + /* Return to where we came from */ KiTrapReturn(TrapFrame); } @@ -1287,7 +1287,7 @@ #endif /* Check for VDM trap */ ASSERT((KiVdmTrap(TrapFrame)) == FALSE); - + /* Either kernel or user trap (non VDM) so dispatch exception */ if (Status == STATUS_ACCESS_VIOLATION) { @@ -1308,7 +1308,7 @@ Cr2, TrapFrame); } - + /* Only other choice is an in-page error, with 3 parameters */ KiDispatchExceptionFromTrapFrame(STATUS_IN_PAGE_ERROR, TrapFrame->Eip, @@ -1339,7 +1339,7 @@ { PKTHREAD Thread; PFX_SAVE_AREA SaveArea; - + /* Save trap frame */ KiEnterTrap(TrapFrame); @@ -1351,11 +1351,11 @@ /* It isn't, enable interrupts and set delayed error */ _enable(); SaveArea->Cr0NpxState |= CR0_TS; - + /* End trap */ KiEoiHelper(TrapFrame); } - + /* Otherwise, proceed with NPX fault handling */ KiNpxHandler(TrapFrame, Thread, SaveArea); } @@ -1381,7 +1381,7 @@ PKTHREAD Thread; PFX_SAVE_AREA SaveArea; ULONG Cr0, MxCsrMask, Error; - + /* Save trap frame */ KiEnterTrap(TrapFrame); @@ -1405,31 +1405,31 @@ /* Kernel should not fault on XMMI */ KeBugCheckWithTf(TRAP_CAUSE_UNKNOWN, 13, 0, 0, 2, TrapFrame); } - + /* Update CR0 */ Cr0 = __readcr0(); Cr0 &= ~(CR0_MP | CR0_EM | CR0_TS); __writecr0(Cr0); - + /* Save FPU state */ Ke386SaveFpuState(SaveArea); - + /* Mark CR0 state dirty */ Cr0 |= NPX_STATE_NOT_LOADED; Cr0 |= SaveArea->Cr0NpxState; __writecr0(Cr0); - + /* Update NPX state */ Thread->NpxState = NPX_STATE_NOT_LOADED; KeGetCurrentPrcb()->NpxThread = NULL; - + /* Clear the TS bit and re-enable interrupts */ SaveArea->Cr0NpxState &= ~CR0_TS; _enable(); /* Now look at MxCsr to get the mask of errors we should care about */ MxCsrMask = ~((USHORT)SaveArea->U.FxArea.MXCsr >> 7); - + /* Get legal exceptions that software should handle */ Error = (USHORT)SaveArea->U.FxArea.MXCsr & (FSW_INVALID_OPERATION | FSW_DENORMAL | @@ -1453,7 +1453,7 @@ 0, TrapFrame); } - + /* Unknown XMMI fault */ KeBugCheckWithTf(TRAP_CAUSE_UNKNOWN, 13, 0, 0, 1, TrapFrame); } @@ -1507,10 +1507,10 @@ { /* Save trap frame */ KiEnterTrap(TrapFrame); - + /* Increment EIP to skip the INT3 instruction */ TrapFrame->Eip++; - + /* Continue with the common handler */ KiDebugHandler(TrapFrame, TrapFrame->Eax, TrapFrame->Ecx, TrapFrame->Edx); } @@ -1548,7 +1548,7 @@ ULONG Id, Offset, StackBytes, Result; PVOID Handler; ULONG SystemCallNumber = TrapFrame->Eax; - + /* Get the current thread */ Thread = KeGetCurrentThread(); @@ -1629,43 +1629,43 @@ goto ExitCall; } } - + /* Check if this is a GUI call */ if (__builtin_expect(Offset & SERVICE_TABLE_TEST, 0)) { /* Get the batch count and flush if necessary */ if (NtCurrentTeb()->GdiBatchCount) KeGdiFlushUserBatch(); } - + /* Increase system call count */ KeGetCurrentPrcb()->KeSystemCalls++; - + /* FIXME: Increase individual counts on debug systems */ //KiIncreaseSystemCallCount(DescriptorTable, Id); - + /* Get stack bytes */ StackBytes = DescriptorTable->Number[Id]; - + /* Probe caller stack */ if (__builtin_expect((Arguments < (PVOID)MmUserProbeAddress) && !(KiUserTrap(TrapFrame)), 0)) { /* Access violation */ UNIMPLEMENTED_FATAL(); } - + /* Call pre-service debug hook */ KiDbgPreServiceHook(SystemCallNumber, Arguments); /* Get the handler and make the system call */ Handler = (PVOID)DescriptorTable->Base[Id]; Result = KiSystemCallTrampoline(Handler, Arguments, StackBytes); - + /* Call post-service debug hook */ Result = KiDbgPostServiceHook(SystemCallNumber, Result); /* Make sure we're exiting correctly */ KiExitSystemCallDebugChecks(Id, TrapFrame); - + /* Restore the old trap frame */ ExitCall: Thread->TrapFrame = (PKTRAP_FRAME)TrapFrame->Edx;
10 years, 3 months
1
0
0
0
[hbelusca] 64517: [NTVDM]: DPRINT the CPU level for diagnostics purposes.
by hbelusca@svn.reactos.org
Author: hbelusca Date: Sat Oct 4 00:18:39 2014 New Revision: 64517 URL:
http://svn.reactos.org/svn/reactos?rev=64517&view=rev
Log: [NTVDM]: DPRINT the CPU level for diagnostics purposes. Modified: trunk/reactos/subsystems/ntvdm/cpu/cpu.c Modified: trunk/reactos/subsystems/ntvdm/cpu/cpu.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/ntvdm/cpu/cpu.c…
============================================================================== --- trunk/reactos/subsystems/ntvdm/cpu/cpu.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/ntvdm/cpu/cpu.c [iso-8859-1] Sat Oct 4 00:18:39 2014 @@ -124,10 +124,12 @@ return; } CpuCallLevel++; + DPRINT1("CpuSimulate --> Level %d\n", CpuCallLevel); CpuRunning = TRUE; while (VdmRunning && CpuRunning) ClockUpdate(); + DPRINT1("CpuSimulate <-- Level %d\n", CpuCallLevel); CpuCallLevel--; if (CpuCallLevel < 0) CpuCallLevel = 0;
10 years, 3 months
1
0
0
0
[jgardou] 64516: [MKHIVE] - Perform a case insensitive comparison to find existing subkeys in the tree. Dedicated to Hervé ;-)
by jgardou@svn.reactos.org
Author: jgardou Date: Fri Oct 3 22:19:07 2014 New Revision: 64516 URL:
http://svn.reactos.org/svn/reactos?rev=64516&view=rev
Log: [MKHIVE] - Perform a case insensitive comparison to find existing subkeys in the tree. Dedicated to Hervé ;-) Modified: trunk/reactos/tools/mkhive/registry.c Modified: trunk/reactos/tools/mkhive/registry.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/mkhive/registry.c?re…
============================================================================== --- trunk/reactos/tools/mkhive/registry.c [iso-8859-1] (original) +++ trunk/reactos/tools/mkhive/registry.c [iso-8859-1] Fri Oct 3 22:19:07 2014 @@ -20,7 +20,7 @@ * PROJECT: ReactOS hive maker * FILE: tools/mkhive/registry.c * PURPOSE: Registry code - * PROGRAMMER: Hervé Poussineau + * PROGRAMMER: Hervé Poussineau */ /* @@ -159,7 +159,7 @@ { CurrentKey = CONTAINING_RECORD(Ptr, KEY, KeyList); if (CurrentKey->NameSize == KeyString.Length - && memcmp(CurrentKey->Name, KeyString.Buffer, KeyString.Length) == 0) + && strncmpiW(CurrentKey->Name, KeyString.Buffer, KeyString.Length / sizeof(WCHAR)) == 0) { goto nextsubkey; }
10 years, 3 months
1
0
0
0
[jgardou] 64515: [ADVAPI32] - Add parameter checks to RegEnumValueW/A - Implement RegEnumValueW for HKCR subkeys CORE-8582
by jgardou@svn.reactos.org
Author: jgardou Date: Fri Oct 3 22:18:49 2014 New Revision: 64515 URL:
http://svn.reactos.org/svn/reactos?rev=64515&view=rev
Log: [ADVAPI32] - Add parameter checks to RegEnumValueW/A - Implement RegEnumValueW for HKCR subkeys CORE-8582 Modified: trunk/reactos/dll/win32/advapi32/reg/hkcr.c trunk/reactos/dll/win32/advapi32/reg/reg.c trunk/reactos/dll/win32/advapi32/reg/reg.h Modified: trunk/reactos/dll/win32/advapi32/reg/hkcr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/reg/hkc…
============================================================================== --- trunk/reactos/dll/win32/advapi32/reg/hkcr.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/advapi32/reg/hkcr.c [iso-8859-1] Fri Oct 3 22:18:49 2014 @@ -799,3 +799,216 @@ return ErrorCode; } + +/* HKCR version of RegEnumValueW */ +LONG +WINAPI +EnumHKCRValue( + _In_ HKEY hKey, + _In_ DWORD dwIndex, + _Out_ LPWSTR lpName, + _Inout_ PDWORD lpcbName, + _Reserved_ PDWORD lpReserved, + _Out_opt_ PDWORD lpdwType, + _Out_opt_ LPBYTE lpData, + _Inout_opt_ PDWORD lpcbData) +{ + HKEY PreferredKey, FallbackKey; + DWORD NumPreferredValues; + DWORD MaxFallbackValueNameLen; + DWORD FallbackIndex; + WCHAR* FallbackValueName = NULL; + LONG ErrorCode; + + ASSERT(IsHKCRKey(hKey)); + + /* Remove the HKCR flag while we're working */ + hKey = (HKEY)(((ULONG_PTR)hKey) & ~0x2); + + /* Get the preferred key */ + ErrorCode = GetPreferredHKCRKey(hKey, &PreferredKey); + if (ErrorCode != ERROR_SUCCESS) + { + if (ErrorCode == ERROR_FILE_NOT_FOUND) + { + /* Only the HKLM key exists */ + return RegEnumValueW( + hKey, + dwIndex, + lpName, + lpcbName, + lpReserved, + lpdwType, + lpData, + lpcbData); + } + return ErrorCode; + } + + /* Get the fallback key */ + ErrorCode = GetFallbackHKCRKey(hKey, &FallbackKey, FALSE); + if (ErrorCode != ERROR_SUCCESS) + { + if (PreferredKey != hKey) + RegCloseKey(PreferredKey); + if (ErrorCode == ERROR_FILE_NOT_FOUND) + { + /* Only the HKCU key exists */ + return RegEnumValueW( + hKey, + dwIndex, + lpName, + lpcbName, + lpReserved, + lpdwType, + lpData, + lpcbData); + } + return ErrorCode; + } + + /* Get some info on the HKCU side */ + ErrorCode = RegQueryInfoKeyW( + PreferredKey, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + &NumPreferredValues, + NULL, + NULL, + NULL, + NULL); + if (ErrorCode != ERROR_SUCCESS) + goto Exit; + + if (dwIndex < NumPreferredValues) + { + /* HKCU side takes precedence */ + return RegEnumValueW( + PreferredKey, + dwIndex, + lpName, + lpcbName, + lpReserved, + lpdwType, + lpData, + lpcbData); + goto Exit; + } + + /* Here it gets tricky. We must enumerate the values from the HKLM side, + * without reporting those which are present on the HKCU side */ + + /* Squash out the indices from HKCU */ + dwIndex -= NumPreferredValues; + + /* Get some info */ + ErrorCode = RegQueryInfoKeyW( + FallbackKey, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + &MaxFallbackValueNameLen, + NULL, + NULL, + NULL); + if (ErrorCode != ERROR_SUCCESS) + { + ERR("Could not query info of key %p (Err: %d)\n", FallbackKey, ErrorCode); + goto Exit; + } + + ERR("Maxfallbacksubkeylen: %d\n", MaxFallbackValueNameLen); + + /* Allocate our buffer */ + FallbackValueName = RtlAllocateHeap( + RtlGetProcessHeap(), 0, (MaxFallbackValueNameLen + 1) * sizeof(WCHAR)); + if (!FallbackValueName) + { + ErrorCode = ERROR_NOT_ENOUGH_MEMORY; + goto Exit; + } + + /* We must begin at the very first subkey of the fallback key, + * and then see if we meet keys that already are in the preferred key. + * In that case, we must bump dwIndex, as otherwise we would enumerate a key we already + * saw in a previous call. + */ + FallbackIndex = 0; + while (TRUE) + { + DWORD FallbackValueNameLen = MaxFallbackValueNameLen; + + /* Try enumerating */ + ErrorCode = RegEnumValueW( + FallbackKey, + FallbackIndex, + FallbackValueName, + &FallbackValueNameLen, + NULL, + NULL, + NULL, + NULL); + if (ErrorCode != ERROR_SUCCESS) + { + /* Most likely ERROR_NO_MORE_ITEMS */ + ERR("Returning %d.\n", ErrorCode); + goto Exit; + } + FallbackValueName[FallbackValueNameLen] = L'\0'; + + /* See if there is such a value on HKCU side */ + ErrorCode = RegQueryValueExW( + PreferredKey, + FallbackValueName, + NULL, + NULL, + NULL, + NULL); + + if (ErrorCode == ERROR_SUCCESS) + { + /* So we already enumerated it on HKCU side. */ + dwIndex++; + } + else if (ErrorCode != ERROR_FILE_NOT_FOUND) + { + ERR("Got error %d while querying for %s on HKCU side.\n", ErrorCode, FallbackValueName); + goto Exit; + } + + /* See if we caught up */ + if (FallbackIndex == dwIndex) + break; + + FallbackIndex++; + } + + /* We can finally enumerate on the fallback side */ + ErrorCode = RegEnumValueW( + FallbackKey, + dwIndex, + lpName, + lpcbName, + lpReserved, + lpdwType, + lpData, + lpcbData); + +Exit: + if (PreferredKey != hKey) + RegCloseKey(PreferredKey); + if (FallbackKey != hKey) + RegCloseKey(FallbackKey); + if (FallbackValueName) + RtlFreeHeap(RtlGetProcessHeap(), 0, FallbackValueName); + + return ErrorCode; +} Modified: trunk/reactos/dll/win32/advapi32/reg/reg.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/reg/reg…
============================================================================== --- trunk/reactos/dll/win32/advapi32/reg/reg.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/advapi32/reg/reg.c [iso-8859-1] Fri Oct 3 22:18:49 2014 @@ -2705,7 +2705,7 @@ _Reserved_ LPDWORD lpdwReserved, _Out_opt_ LPDWORD lpdwType, _Out_opt_ LPBYTE lpData, - _Out_opt_ LPDWORD lpcbData) + _Inout_opt_ LPDWORD lpcbData) { WCHAR* NameBuffer; DWORD NameBufferSize, NameLength; @@ -2714,6 +2714,9 @@ BOOL NameOverflow = FALSE; /* Do parameter checks now, once and for all. */ + if (!lpName || !lpcbName) + return ERROR_INVALID_PARAMETER; + if ((lpData && !lpcbData) || lpdwReserved) return ERROR_INVALID_PARAMETER; @@ -2851,15 +2854,17 @@ * Success: ERROR_SUCCESS * Failure: nonzero error code from Winerror.h */ -LONG WINAPI -RegEnumValueW(HKEY hKey, - DWORD index, - LPWSTR value, - PDWORD val_count, - PDWORD reserved, - PDWORD type, - LPBYTE data, - PDWORD count) +LONG +WINAPI +RegEnumValueW( + _In_ HKEY hKey, + _In_ DWORD index, + _Out_ LPWSTR value, + _Inout_ PDWORD val_count, + _Reserved_ PDWORD reserved, + _Out_opt_ PDWORD type, + _Out_opt_ LPBYTE data, + _Inout_opt_ PDWORD count) { HANDLE KeyHandle; NTSTATUS status; @@ -2868,16 +2873,34 @@ KEY_VALUE_FULL_INFORMATION *info = (KEY_VALUE_FULL_INFORMATION *)buffer; static const int info_size = FIELD_OFFSET( KEY_VALUE_FULL_INFORMATION, Name ); - //TRACE("(%p,%ld,%p,%p,%p,%p,%p,%p)\n", - // hkey, index, value, val_count, reserved, type, data, count ); - - /* NT only checks count, not val_count */ - if ((data && !count) || reserved) return ERROR_INVALID_PARAMETER; + TRACE("(%p,%ld,%p,%p,%p,%p,%p,%p)\n", + hKey, index, value, val_count, reserved, type, data, count ); + + if (!value || !val_count) + return ERROR_INVALID_PARAMETER; + + if ((data && !count) || reserved) + return ERROR_INVALID_PARAMETER; status = MapDefaultKey(&KeyHandle, hKey); if (!NT_SUCCESS(status)) { return RtlNtStatusToDosError(status); + } + + if (IsHKCRKey(KeyHandle)) + { + LONG ErrorCode = EnumHKCRValue( + KeyHandle, + index, + value, + val_count, + reserved, + type, + data, + count); + ClosePredefKey(KeyHandle); + return ErrorCode; } total_size = info_size + (MAX_PATH + 1) * sizeof(WCHAR); Modified: trunk/reactos/dll/win32/advapi32/reg/reg.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/reg/reg…
============================================================================== --- trunk/reactos/dll/win32/advapi32/reg/reg.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/advapi32/reg/reg.h [iso-8859-1] Fri Oct 3 22:18:49 2014 @@ -84,3 +84,15 @@ _Inout_opt_ LPDWORD lpcbClass, _Out_opt_ PFILETIME lpftLastWriteTime); +LONG +WINAPI +EnumHKCRValue( + _In_ HKEY hKey, + _In_ DWORD index, + _Out_ LPWSTR value, + _Inout_ PDWORD val_count, + _Reserved_ PDWORD reserved, + _Out_opt_ PDWORD type, + _Out_opt_ LPBYTE data, + _Inout_opt_ PDWORD count); +
10 years, 3 months
1
0
0
0
[tkreuzer] 64514: [HPP] Fix problem with inconsistent EOLs
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Fri Oct 3 20:11:37 2014 New Revision: 64514 URL:
http://svn.reactos.org/svn/reactos?rev=64514&view=rev
Log: [HPP] Fix problem with inconsistent EOLs Modified: trunk/reactos/tools/hpp/hpp.c Modified: trunk/reactos/tools/hpp/hpp.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/hpp/hpp.c?rev=64514&…
============================================================================== --- trunk/reactos/tools/hpp/hpp.c [iso-8859-1] (original) +++ trunk/reactos/tools/hpp/hpp.c [iso-8859-1] Fri Oct 3 20:11:37 2014 @@ -210,11 +210,14 @@ pchVariable = strchr(pch, '$'); if (pchVariable && (pchVariable < pchLineEnd)) { + /* Write all characters up to the $ */ fwrite(pch, 1, pchVariable - pch, fileOut); + /* Try to find the define */ pDefine = FindDefine(pchVariable + 1, &pch); if (pDefine != 0) { + /* We have a define, write the value */ fwrite(pDefine->pszValue, 1, pDefine->cchValue, fileOut); } else @@ -224,7 +227,7 @@ fwrite(pchVariable, 1, pch - pchVariable, fileOut); } - len = pchLineEnd - pch; + len = pchLineEnd - pch + 1; } else {
10 years, 3 months
1
0
0
0
[tkreuzer] 64513: [XDK/DDK/PSDK] - Move FsRtl functions to fsrtlfuncs.h - Improve formatting of a few macros - Add missing NTKERNELAPI - Add a "special" kind of "ASSERT" to ListEntry64To32
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Fri Oct 3 19:36:22 2014 New Revision: 64513 URL:
http://svn.reactos.org/svn/reactos?rev=64513&view=rev
Log: [XDK/DDK/PSDK] - Move FsRtl functions to fsrtlfuncs.h - Improve formatting of a few macros - Add missing NTKERNELAPI - Add a "special" kind of "ASSERT" to ListEntry64To32 Modified: trunk/reactos/include/ddk/ntifs.h trunk/reactos/include/ddk/wdm.h trunk/reactos/include/psdk/ntdef.h trunk/reactos/include/xdk/fsrtlfuncs.h trunk/reactos/include/xdk/iotypes.h trunk/reactos/include/xdk/ntdef.template.h trunk/reactos/include/xdk/rtltypes.h Modified: trunk/reactos/include/ddk/ntifs.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/ntifs.h?rev=64…
============================================================================== --- trunk/reactos/include/ddk/ntifs.h [iso-8859-1] (original) +++ trunk/reactos/include/ddk/ntifs.h [iso-8859-1] Fri Oct 3 19:36:22 2014 @@ -870,11 +870,11 @@ (NTAPI *PRTL_FREE_STRING_ROUTINE)( _In_ __drv_freesMem(Mem) _Post_invalid_ PVOID Buffer); -extern const PRTL_ALLOCATE_STRING_ROUTINE RtlAllocateStringRoutine; -extern const PRTL_FREE_STRING_ROUTINE RtlFreeStringRoutine; +extern NTKERNELAPI const PRTL_ALLOCATE_STRING_ROUTINE RtlAllocateStringRoutine; +extern NTKERNELAPI const PRTL_FREE_STRING_ROUTINE RtlFreeStringRoutine; #if _WIN32_WINNT >= 0x0600 -extern const PRTL_REALLOCATE_STRING_ROUTINE RtlReallocateStringRoutine; +extern NTKERNELAPI const PRTL_REALLOCATE_STRING_ROUTINE RtlReallocateStringRoutine; #endif _Function_class_(RTL_HEAP_COMMIT_ROUTINE) @@ -4917,26 +4917,6 @@ PFS_FILTER_COMPLETION_CALLBACK PostReleaseForModifiedPageWriter; } FS_FILTER_CALLBACKS, *PFS_FILTER_CALLBACKS; -#if (NTDDI_VERSION >= NTDDI_WINXP) -NTKERNELAPI -NTSTATUS -NTAPI -FsRtlRegisterFileSystemFilterCallbacks( - _In_ struct _DRIVER_OBJECT *FilterDriverObject, - _In_ PFS_FILTER_CALLBACKS Callbacks); -#endif /* (NTDDI_VERSION >= NTDDI_WINXP) */ - -#if (NTDDI_VERSION >= NTDDI_VISTA) -NTKERNELAPI -NTSTATUS -NTAPI -FsRtlNotifyStreamFileObject( - _In_ struct _FILE_OBJECT * StreamFileObject, - _In_opt_ struct _DEVICE_OBJECT *DeviceObjectHint, - _In_ FS_FILTER_STREAM_FO_NOTIFICATION_TYPE NotificationType, - _In_ BOOLEAN SafeToRecurse); -#endif /* (NTDDI_VERSION >= NTDDI_VISTA) */ - extern NTKERNELAPI KSPIN_LOCK IoStatisticsLock; extern NTKERNELAPI ULONG IoReadOperationCount; extern NTKERNELAPI ULONG IoWriteOperationCount; @@ -8372,24 +8352,40 @@ _In_opt_ PVOID OwnerId, _In_opt_ PVOID InstanceId); -#define FsRtlFastLock(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11) ( \ - FsRtlPrivateLock(A1, A2, A3, A4, A5, A6, A7, A8, A9, NULL, A10, A11) \ -) - -#define FsRtlAreThereCurrentFileLocks(FL) ( \ - ((FL)->FastIoIsQuestionable) \ -) - -#define FsRtlIncrementLockRequestsInProgress(FL) { \ - ASSERT( (FL)->LockRequestsInProgress >= 0 ); \ - (void) \ - (InterlockedIncrement((LONG volatile *)&((FL)->LockRequestsInProgress)));\ +NTKERNELAPI +NTSTATUS +NTAPI +FsRtlRegisterFileSystemFilterCallbacks( + _In_ struct _DRIVER_OBJECT *FilterDriverObject, + _In_ PFS_FILTER_CALLBACKS Callbacks); + +#if (NTDDI_VERSION >= NTDDI_VISTA) +NTKERNELAPI +NTSTATUS +NTAPI +FsRtlNotifyStreamFileObject( + _In_ struct _FILE_OBJECT * StreamFileObject, + _In_opt_ struct _DEVICE_OBJECT *DeviceObjectHint, + _In_ FS_FILTER_STREAM_FO_NOTIFICATION_TYPE NotificationType, + _In_ BOOLEAN SafeToRecurse); +#endif /* (NTDDI_VERSION >= NTDDI_VISTA) */ + +#define FsRtlFastLock(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11) \ + FsRtlPrivateLock(A1, A2, A3, A4, A5, A6, A7, A8, A9, NULL, A10, A11) + +#define FsRtlAreThereCurrentFileLocks(FL) \ + ((FL)->FastIoIsQuestionable) + +#define FsRtlIncrementLockRequestsInProgress(FL) { \ + ASSERT((FL)->LockRequestsInProgress >= 0); \ + (void) \ + (InterlockedIncrement((LONG volatile *)&((FL)->LockRequestsInProgress))); \ } -#define FsRtlDecrementLockRequestsInProgress(FL) { \ - ASSERT( (FL)->LockRequestsInProgress > 0 ); \ - (void) \ - (InterlockedDecrement((LONG volatile *)&((FL)->LockRequestsInProgress)));\ +#define FsRtlDecrementLockRequestsInProgress(FL) { \ + ASSERT((FL)->LockRequestsInProgress > 0); \ + (void) \ + (InterlockedDecrement((LONG volatile *)&((FL)->LockRequestsInProgress))); \ } #ifdef _NTSYSTEM_ @@ -8401,97 +8397,81 @@ #define LEGAL_ANSI_CHARACTER_ARRAY (*FsRtlLegalAnsiCharacterArray) #endif -#define FsRtlIsAnsiCharacterWild(C) ( \ - FlagOn(LEGAL_ANSI_CHARACTER_ARRAY[(UCHAR)(C)], FSRTL_WILD_CHARACTER ) \ -) - -#define FsRtlIsAnsiCharacterLegalFat(C, WILD) ( \ - FlagOn(LEGAL_ANSI_CHARACTER_ARRAY[(UCHAR)(C)], (FSRTL_FAT_LEGAL) | \ - ((WILD) ? FSRTL_WILD_CHARACTER : 0 )) \ -) - -#define FsRtlIsAnsiCharacterLegalHpfs(C, WILD) ( \ - FlagOn(LEGAL_ANSI_CHARACTER_ARRAY[(UCHAR)(C)], (FSRTL_HPFS_LEGAL) | \ - ((WILD) ? FSRTL_WILD_CHARACTER : 0 )) \ -) - -#define FsRtlIsAnsiCharacterLegalNtfs(C, WILD) ( \ - FlagOn(LEGAL_ANSI_CHARACTER_ARRAY[(UCHAR)(C)], (FSRTL_NTFS_LEGAL) | \ - ((WILD) ? FSRTL_WILD_CHARACTER : 0 )) \ -) - -#define FsRtlIsAnsiCharacterLegalNtfsStream(C,WILD_OK) ( \ - FsRtlTestAnsiCharacter((C), TRUE, (WILD_OK), FSRTL_NTFS_STREAM_LEGAL) \ -) - -#define FsRtlIsAnsiCharacterLegal(C,FLAGS) ( \ - FsRtlTestAnsiCharacter((C), TRUE, FALSE, (FLAGS)) \ -) - -#define FsRtlTestAnsiCharacter(C, DEFAULT_RET, WILD_OK, FLAGS) ( \ - ((SCHAR)(C) < 0) ? DEFAULT_RET : \ - FlagOn( LEGAL_ANSI_CHARACTER_ARRAY[(C)], \ - (FLAGS) | \ - ((WILD_OK) ? FSRTL_WILD_CHARACTER : 0) ) \ -) - -#define FsRtlIsLeadDbcsCharacter(DBCS_CHAR) ( \ - (BOOLEAN)((UCHAR)(DBCS_CHAR) < 0x80 ? FALSE : \ - (NLS_MB_CODE_PAGE_TAG && \ - (NLS_OEM_LEAD_BYTE_INFO[(UCHAR)(DBCS_CHAR)] != 0))) \ -) - -#define FsRtlIsUnicodeCharacterWild(C) ( \ - (((C) >= 0x40) ? \ - FALSE : \ - FlagOn(LEGAL_ANSI_CHARACTER_ARRAY[(C)], FSRTL_WILD_CHARACTER )) \ -) - -#define FsRtlInitPerFileContext( _fc, _owner, _inst, _cb) \ - ((_fc)->OwnerId = (_owner), \ - (_fc)->InstanceId = (_inst), \ +#define FsRtlIsAnsiCharacterWild(C) \ + FlagOn(LEGAL_ANSI_CHARACTER_ARRAY[(UCHAR)(C)], FSRTL_WILD_CHARACTER) + +#define FsRtlIsAnsiCharacterLegalFat(C, WILD) \ + FlagOn(LEGAL_ANSI_CHARACTER_ARRAY[(UCHAR)(C)], (FSRTL_FAT_LEGAL) | \ + ((WILD) ? FSRTL_WILD_CHARACTER : 0 )) + +#define FsRtlIsAnsiCharacterLegalHpfs(C, WILD) \ + FlagOn(LEGAL_ANSI_CHARACTER_ARRAY[(UCHAR)(C)], (FSRTL_HPFS_LEGAL) | \ + ((WILD) ? FSRTL_WILD_CHARACTER : 0 )) + +#define FsRtlIsAnsiCharacterLegalNtfs(C, WILD) \ + FlagOn(LEGAL_ANSI_CHARACTER_ARRAY[(UCHAR)(C)], (FSRTL_NTFS_LEGAL) | \ + ((WILD) ? FSRTL_WILD_CHARACTER : 0 )) + +#define FsRtlIsAnsiCharacterLegalNtfsStream(C,WILD_OK) \ + FsRtlTestAnsiCharacter((C), TRUE, (WILD_OK), FSRTL_NTFS_STREAM_LEGAL) + +#define FsRtlIsAnsiCharacterLegal(C,FLAGS) \ + FsRtlTestAnsiCharacter((C), TRUE, FALSE, (FLAGS)) + +#define FsRtlTestAnsiCharacter(C, DEFAULT_RET, WILD_OK, FLAGS) \ + (((SCHAR)(C) < 0) ? DEFAULT_RET : \ + FlagOn(LEGAL_ANSI_CHARACTER_ARRAY[(C)], \ + (FLAGS) | ((WILD_OK) ? FSRTL_WILD_CHARACTER : 0))) + +#define FsRtlIsLeadDbcsCharacter(DBCS_CHAR) \ + ((BOOLEAN)((UCHAR)(DBCS_CHAR) < 0x80 ? FALSE : \ + (NLS_MB_CODE_PAGE_TAG && \ + (NLS_OEM_LEAD_BYTE_INFO[(UCHAR)(DBCS_CHAR)] != 0)))) + +#define FsRtlIsUnicodeCharacterWild(C) \ + ((((C) >= 0x40) ? FALSE : \ + FlagOn(LEGAL_ANSI_CHARACTER_ARRAY[(C)], FSRTL_WILD_CHARACTER ))) + +#define FsRtlInitPerFileContext(_fc, _owner, _inst, _cb) \ + ((_fc)->OwnerId = (_owner), \ + (_fc)->InstanceId = (_inst), \ (_fc)->FreeCallback = (_cb)) -#define FsRtlGetPerFileContextPointer(_fo) \ - (FsRtlSupportsPerFileContexts(_fo) ? \ - FsRtlGetPerStreamContextPointer(_fo)->FileContextSupportPointer : \ - NULL) - -#define FsRtlSupportsPerFileContexts(_fo) \ - ((FsRtlGetPerStreamContextPointer(_fo) != NULL) && \ - (FsRtlGetPerStreamContextPointer(_fo)->Version >= FSRTL_FCB_HEADER_V1) && \ +#define FsRtlGetPerFileContextPointer(_fo) \ + (FsRtlSupportsPerFileContexts(_fo) ? \ + FsRtlGetPerStreamContextPointer(_fo)->FileContextSupportPointer : NULL) + +#define FsRtlSupportsPerFileContexts(_fo) \ + ((FsRtlGetPerStreamContextPointer(_fo) != NULL) && \ + (FsRtlGetPerStreamContextPointer(_fo)->Version >= FSRTL_FCB_HEADER_V1) && \ (FsRtlGetPerStreamContextPointer(_fo)->FileContextSupportPointer != NULL)) -#define FsRtlSetupAdvancedHeaderEx( _advhdr, _fmutx, _fctxptr ) \ -{ \ - FsRtlSetupAdvancedHeader( _advhdr, _fmutx ); \ - if ((_fctxptr) != NULL) { \ - (_advhdr)->FileContextSupportPointer = (_fctxptr); \ - } \ +#define FsRtlSetupAdvancedHeaderEx(_advhdr, _fmutx, _fctxptr) \ +{ \ + FsRtlSetupAdvancedHeader( _advhdr, _fmutx ); \ + if ((_fctxptr) != NULL) { \ + (_advhdr)->FileContextSupportPointer = (_fctxptr); \ + } \ } -#define FsRtlGetPerStreamContextPointer(FO) ( \ - (PFSRTL_ADVANCED_FCB_HEADER)(FO)->FsContext \ -) - -#define FsRtlInitPerStreamContext(PSC, O, I, FC) ( \ - (PSC)->OwnerId = (O), \ - (PSC)->InstanceId = (I), \ - (PSC)->FreeCallback = (FC) \ -) - -#define FsRtlSupportsPerStreamContexts(FO) ( \ - (BOOLEAN)((NULL != FsRtlGetPerStreamContextPointer(FO) && \ - FlagOn(FsRtlGetPerStreamContextPointer(FO)->Flags2, \ - FSRTL_FLAG2_SUPPORTS_FILTER_CONTEXTS)) \ -) - -#define FsRtlLookupPerStreamContext(_sc, _oid, _iid) \ - (((NULL != (_sc)) && \ - FlagOn((_sc)->Flags2,FSRTL_FLAG2_SUPPORTS_FILTER_CONTEXTS) && \ - !IsListEmpty(&(_sc)->FilterContexts)) ? \ - FsRtlLookupPerStreamContextInternal((_sc), (_oid), (_iid)) : \ - NULL) +#define FsRtlGetPerStreamContextPointer(FO) \ + ((PFSRTL_ADVANCED_FCB_HEADER)(FO)->FsContext) + +#define FsRtlInitPerStreamContext(PSC, O, I, FC) \ + ((PSC)->OwnerId = (O), \ + (PSC)->InstanceId = (I), \ + (PSC)->FreeCallback = (FC)) + +#define FsRtlSupportsPerStreamContexts(FO) \ + ((BOOLEAN)((NULL != FsRtlGetPerStreamContextPointer(FO) && \ + FlagOn(FsRtlGetPerStreamContextPointer(FO)->Flags2, \ + FSRTL_FLAG2_SUPPORTS_FILTER_CONTEXTS))) + +#define FsRtlLookupPerStreamContext(_sc, _oid, _iid) \ + (((NULL != (_sc)) && \ + FlagOn((_sc)->Flags2,FSRTL_FLAG2_SUPPORTS_FILTER_CONTEXTS) && \ + !IsListEmpty(&(_sc)->FilterContexts)) ? \ + FsRtlLookupPerStreamContextInternal((_sc), (_oid), (_iid)) : NULL) _IRQL_requires_max_(APC_LEVEL) FORCEINLINE @@ -8520,12 +8500,12 @@ #endif } -#define FsRtlInitPerFileObjectContext(_fc, _owner, _inst) \ +#define FsRtlInitPerFileObjectContext(_fc, _owner, _inst) \ ((_fc)->OwnerId = (_owner), (_fc)->InstanceId = (_inst)) -#define FsRtlCompleteRequest(IRP,STATUS) { \ - (IRP)->IoStatus.Status = (STATUS); \ - IoCompleteRequest( (IRP), IO_DISK_INCREMENT ); \ +#define FsRtlCompleteRequest(IRP, STATUS) { \ + (IRP)->IoStatus.Status = (STATUS); \ + IoCompleteRequest( (IRP), IO_DISK_INCREMENT ); \ } /* Common Cache Types */ Modified: trunk/reactos/include/ddk/wdm.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/wdm.h?rev=6451…
============================================================================== --- trunk/reactos/include/ddk/wdm.h [iso-8859-1] (original) +++ trunk/reactos/include/ddk/wdm.h [iso-8859-1] Fri Oct 3 19:36:22 2014 @@ -16091,7 +16091,6 @@ ULONGLONG LastRecoveredLsn; } TRANSACTIONMANAGER_RECOVERY_INFORMATION, *PTRANSACTIONMANAGER_RECOVERY_INFORMATION; - typedef struct _TRANSACTION_PROPERTIES_INFORMATION { ULONG IsolationLevel; ULONG IsolationFlags; @@ -16140,7 +16139,7 @@ typedef struct _KTMOBJECT_CURSOR { GUID LastQuery; - unsigned long ObjectIdCount; + ULONG ObjectIdCount; GUID ObjectIds[1]; } KTMOBJECT_CURSOR, *PKTMOBJECT_CURSOR; @@ -16148,14 +16147,14 @@ TransactionBasicInformation, TransactionPropertiesInformation, TransactionEnlistmentInformation, - TransactionSuperiorEnlistmentInformation, + TransactionSuperiorEnlistmentInformation } TRANSACTION_INFORMATION_CLASS; typedef enum _TRANSACTIONMANAGER_INFORMATION_CLASS { TransactionManagerBasicInformation, TransactionManagerLogInformation, TransactionManagerLogPathInformation, - TransactionManagerRecoveryInformation = 4, + TransactionManagerRecoveryInformation = 4 } TRANSACTIONMANAGER_INFORMATION_CLASS; typedef enum _RESOURCEMANAGER_INFORMATION_CLASS { Modified: trunk/reactos/include/psdk/ntdef.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/ntdef.h?rev=6…
============================================================================== --- trunk/reactos/include/psdk/ntdef.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/ntdef.h [iso-8859-1] Fri Oct 3 19:36:22 2014 @@ -1664,8 +1664,8 @@ _In_ PLIST_ENTRY32 ListEntry32, _Out_ PLIST_ENTRY64 ListEntry64) { - ListEntry64->Flink = (ULONG)ListEntry32->Flink; - ListEntry64->Blink = (ULONG)ListEntry32->Blink; + ListEntry64->Flink = ListEntry32->Flink; + ListEntry64->Blink = ListEntry32->Blink; } FORCEINLINE @@ -1674,6 +1674,12 @@ _In_ PLIST_ENTRY64 ListEntry64, _Out_ PLIST_ENTRY32 ListEntry32) { + /* ASSERT without ASSERT or intrinsics ... */ + if (((ListEntry64->Flink >> 32) != 0) || + ((ListEntry64->Blink >> 32) != 0)) + { + (VOID)*(volatile LONG*)(LONG_PTR)-1; + } ListEntry32->Flink = ListEntry64->Flink & 0xFFFFFFFF; ListEntry32->Blink = ListEntry64->Blink & 0xFFFFFFFF; } Modified: trunk/reactos/include/xdk/fsrtlfuncs.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/xdk/fsrtlfuncs.h?r…
============================================================================== --- trunk/reactos/include/xdk/fsrtlfuncs.h [iso-8859-1] (original) +++ trunk/reactos/include/xdk/fsrtlfuncs.h [iso-8859-1] Fri Oct 3 19:36:22 2014 @@ -1560,24 +1560,40 @@ _In_opt_ PVOID OwnerId, _In_opt_ PVOID InstanceId); -#define FsRtlFastLock(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11) ( \ - FsRtlPrivateLock(A1, A2, A3, A4, A5, A6, A7, A8, A9, NULL, A10, A11) \ -) - -#define FsRtlAreThereCurrentFileLocks(FL) ( \ - ((FL)->FastIoIsQuestionable) \ -) - -#define FsRtlIncrementLockRequestsInProgress(FL) { \ - ASSERT( (FL)->LockRequestsInProgress >= 0 ); \ - (void) \ - (InterlockedIncrement((LONG volatile *)&((FL)->LockRequestsInProgress)));\ +NTKERNELAPI +NTSTATUS +NTAPI +FsRtlRegisterFileSystemFilterCallbacks( + _In_ struct _DRIVER_OBJECT *FilterDriverObject, + _In_ PFS_FILTER_CALLBACKS Callbacks); + +#if (NTDDI_VERSION >= NTDDI_VISTA) +NTKERNELAPI +NTSTATUS +NTAPI +FsRtlNotifyStreamFileObject( + _In_ struct _FILE_OBJECT * StreamFileObject, + _In_opt_ struct _DEVICE_OBJECT *DeviceObjectHint, + _In_ FS_FILTER_STREAM_FO_NOTIFICATION_TYPE NotificationType, + _In_ BOOLEAN SafeToRecurse); +#endif /* (NTDDI_VERSION >= NTDDI_VISTA) */ + +#define FsRtlFastLock(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11) \ + FsRtlPrivateLock(A1, A2, A3, A4, A5, A6, A7, A8, A9, NULL, A10, A11) + +#define FsRtlAreThereCurrentFileLocks(FL) \ + ((FL)->FastIoIsQuestionable) + +#define FsRtlIncrementLockRequestsInProgress(FL) { \ + ASSERT((FL)->LockRequestsInProgress >= 0); \ + (void) \ + (InterlockedIncrement((LONG volatile *)&((FL)->LockRequestsInProgress))); \ } -#define FsRtlDecrementLockRequestsInProgress(FL) { \ - ASSERT( (FL)->LockRequestsInProgress > 0 ); \ - (void) \ - (InterlockedDecrement((LONG volatile *)&((FL)->LockRequestsInProgress)));\ +#define FsRtlDecrementLockRequestsInProgress(FL) { \ + ASSERT((FL)->LockRequestsInProgress > 0); \ + (void) \ + (InterlockedDecrement((LONG volatile *)&((FL)->LockRequestsInProgress))); \ } #ifdef _NTSYSTEM_ @@ -1589,97 +1605,81 @@ #define LEGAL_ANSI_CHARACTER_ARRAY (*FsRtlLegalAnsiCharacterArray) #endif -#define FsRtlIsAnsiCharacterWild(C) ( \ - FlagOn(LEGAL_ANSI_CHARACTER_ARRAY[(UCHAR)(C)], FSRTL_WILD_CHARACTER ) \ -) - -#define FsRtlIsAnsiCharacterLegalFat(C, WILD) ( \ - FlagOn(LEGAL_ANSI_CHARACTER_ARRAY[(UCHAR)(C)], (FSRTL_FAT_LEGAL) | \ - ((WILD) ? FSRTL_WILD_CHARACTER : 0 )) \ -) - -#define FsRtlIsAnsiCharacterLegalHpfs(C, WILD) ( \ - FlagOn(LEGAL_ANSI_CHARACTER_ARRAY[(UCHAR)(C)], (FSRTL_HPFS_LEGAL) | \ - ((WILD) ? FSRTL_WILD_CHARACTER : 0 )) \ -) - -#define FsRtlIsAnsiCharacterLegalNtfs(C, WILD) ( \ - FlagOn(LEGAL_ANSI_CHARACTER_ARRAY[(UCHAR)(C)], (FSRTL_NTFS_LEGAL) | \ - ((WILD) ? FSRTL_WILD_CHARACTER : 0 )) \ -) - -#define FsRtlIsAnsiCharacterLegalNtfsStream(C,WILD_OK) ( \ - FsRtlTestAnsiCharacter((C), TRUE, (WILD_OK), FSRTL_NTFS_STREAM_LEGAL) \ -) - -#define FsRtlIsAnsiCharacterLegal(C,FLAGS) ( \ - FsRtlTestAnsiCharacter((C), TRUE, FALSE, (FLAGS)) \ -) - -#define FsRtlTestAnsiCharacter(C, DEFAULT_RET, WILD_OK, FLAGS) ( \ - ((SCHAR)(C) < 0) ? DEFAULT_RET : \ - FlagOn( LEGAL_ANSI_CHARACTER_ARRAY[(C)], \ - (FLAGS) | \ - ((WILD_OK) ? FSRTL_WILD_CHARACTER : 0) ) \ -) - -#define FsRtlIsLeadDbcsCharacter(DBCS_CHAR) ( \ - (BOOLEAN)((UCHAR)(DBCS_CHAR) < 0x80 ? FALSE : \ - (NLS_MB_CODE_PAGE_TAG && \ - (NLS_OEM_LEAD_BYTE_INFO[(UCHAR)(DBCS_CHAR)] != 0))) \ -) - -#define FsRtlIsUnicodeCharacterWild(C) ( \ - (((C) >= 0x40) ? \ - FALSE : \ - FlagOn(LEGAL_ANSI_CHARACTER_ARRAY[(C)], FSRTL_WILD_CHARACTER )) \ -) - -#define FsRtlInitPerFileContext( _fc, _owner, _inst, _cb) \ - ((_fc)->OwnerId = (_owner), \ - (_fc)->InstanceId = (_inst), \ +#define FsRtlIsAnsiCharacterWild(C) \ + FlagOn(LEGAL_ANSI_CHARACTER_ARRAY[(UCHAR)(C)], FSRTL_WILD_CHARACTER) + +#define FsRtlIsAnsiCharacterLegalFat(C, WILD) \ + FlagOn(LEGAL_ANSI_CHARACTER_ARRAY[(UCHAR)(C)], (FSRTL_FAT_LEGAL) | \ + ((WILD) ? FSRTL_WILD_CHARACTER : 0 )) + +#define FsRtlIsAnsiCharacterLegalHpfs(C, WILD) \ + FlagOn(LEGAL_ANSI_CHARACTER_ARRAY[(UCHAR)(C)], (FSRTL_HPFS_LEGAL) | \ + ((WILD) ? FSRTL_WILD_CHARACTER : 0 )) + +#define FsRtlIsAnsiCharacterLegalNtfs(C, WILD) \ + FlagOn(LEGAL_ANSI_CHARACTER_ARRAY[(UCHAR)(C)], (FSRTL_NTFS_LEGAL) | \ + ((WILD) ? FSRTL_WILD_CHARACTER : 0 )) + +#define FsRtlIsAnsiCharacterLegalNtfsStream(C,WILD_OK) \ + FsRtlTestAnsiCharacter((C), TRUE, (WILD_OK), FSRTL_NTFS_STREAM_LEGAL) + +#define FsRtlIsAnsiCharacterLegal(C,FLAGS) \ + FsRtlTestAnsiCharacter((C), TRUE, FALSE, (FLAGS)) + +#define FsRtlTestAnsiCharacter(C, DEFAULT_RET, WILD_OK, FLAGS) \ + (((SCHAR)(C) < 0) ? DEFAULT_RET : \ + FlagOn(LEGAL_ANSI_CHARACTER_ARRAY[(C)], \ + (FLAGS) | ((WILD_OK) ? FSRTL_WILD_CHARACTER : 0))) + +#define FsRtlIsLeadDbcsCharacter(DBCS_CHAR) \ + ((BOOLEAN)((UCHAR)(DBCS_CHAR) < 0x80 ? FALSE : \ + (NLS_MB_CODE_PAGE_TAG && \ + (NLS_OEM_LEAD_BYTE_INFO[(UCHAR)(DBCS_CHAR)] != 0)))) + +#define FsRtlIsUnicodeCharacterWild(C) \ + ((((C) >= 0x40) ? FALSE : \ + FlagOn(LEGAL_ANSI_CHARACTER_ARRAY[(C)], FSRTL_WILD_CHARACTER ))) + +#define FsRtlInitPerFileContext(_fc, _owner, _inst, _cb) \ + ((_fc)->OwnerId = (_owner), \ + (_fc)->InstanceId = (_inst), \ (_fc)->FreeCallback = (_cb)) -#define FsRtlGetPerFileContextPointer(_fo) \ - (FsRtlSupportsPerFileContexts(_fo) ? \ - FsRtlGetPerStreamContextPointer(_fo)->FileContextSupportPointer : \ - NULL) - -#define FsRtlSupportsPerFileContexts(_fo) \ - ((FsRtlGetPerStreamContextPointer(_fo) != NULL) && \ - (FsRtlGetPerStreamContextPointer(_fo)->Version >= FSRTL_FCB_HEADER_V1) && \ +#define FsRtlGetPerFileContextPointer(_fo) \ + (FsRtlSupportsPerFileContexts(_fo) ? \ + FsRtlGetPerStreamContextPointer(_fo)->FileContextSupportPointer : NULL) + +#define FsRtlSupportsPerFileContexts(_fo) \ + ((FsRtlGetPerStreamContextPointer(_fo) != NULL) && \ + (FsRtlGetPerStreamContextPointer(_fo)->Version >= FSRTL_FCB_HEADER_V1) && \ (FsRtlGetPerStreamContextPointer(_fo)->FileContextSupportPointer != NULL)) -#define FsRtlSetupAdvancedHeaderEx( _advhdr, _fmutx, _fctxptr ) \ -{ \ - FsRtlSetupAdvancedHeader( _advhdr, _fmutx ); \ - if ((_fctxptr) != NULL) { \ - (_advhdr)->FileContextSupportPointer = (_fctxptr); \ - } \ +#define FsRtlSetupAdvancedHeaderEx(_advhdr, _fmutx, _fctxptr) \ +{ \ + FsRtlSetupAdvancedHeader( _advhdr, _fmutx ); \ + if ((_fctxptr) != NULL) { \ + (_advhdr)->FileContextSupportPointer = (_fctxptr); \ + } \ } -#define FsRtlGetPerStreamContextPointer(FO) ( \ - (PFSRTL_ADVANCED_FCB_HEADER)(FO)->FsContext \ -) - -#define FsRtlInitPerStreamContext(PSC, O, I, FC) ( \ - (PSC)->OwnerId = (O), \ - (PSC)->InstanceId = (I), \ - (PSC)->FreeCallback = (FC) \ -) - -#define FsRtlSupportsPerStreamContexts(FO) ( \ - (BOOLEAN)((NULL != FsRtlGetPerStreamContextPointer(FO) && \ - FlagOn(FsRtlGetPerStreamContextPointer(FO)->Flags2, \ - FSRTL_FLAG2_SUPPORTS_FILTER_CONTEXTS)) \ -) - -#define FsRtlLookupPerStreamContext(_sc, _oid, _iid) \ - (((NULL != (_sc)) && \ - FlagOn((_sc)->Flags2,FSRTL_FLAG2_SUPPORTS_FILTER_CONTEXTS) && \ - !IsListEmpty(&(_sc)->FilterContexts)) ? \ - FsRtlLookupPerStreamContextInternal((_sc), (_oid), (_iid)) : \ - NULL) +#define FsRtlGetPerStreamContextPointer(FO) \ + ((PFSRTL_ADVANCED_FCB_HEADER)(FO)->FsContext) + +#define FsRtlInitPerStreamContext(PSC, O, I, FC) \ + ((PSC)->OwnerId = (O), \ + (PSC)->InstanceId = (I), \ + (PSC)->FreeCallback = (FC)) + +#define FsRtlSupportsPerStreamContexts(FO) \ + ((BOOLEAN)((NULL != FsRtlGetPerStreamContextPointer(FO) && \ + FlagOn(FsRtlGetPerStreamContextPointer(FO)->Flags2, \ + FSRTL_FLAG2_SUPPORTS_FILTER_CONTEXTS))) + +#define FsRtlLookupPerStreamContext(_sc, _oid, _iid) \ + (((NULL != (_sc)) && \ + FlagOn((_sc)->Flags2,FSRTL_FLAG2_SUPPORTS_FILTER_CONTEXTS) && \ + !IsListEmpty(&(_sc)->FilterContexts)) ? \ + FsRtlLookupPerStreamContextInternal((_sc), (_oid), (_iid)) : NULL) _IRQL_requires_max_(APC_LEVEL) FORCEINLINE @@ -1708,11 +1708,11 @@ #endif } -#define FsRtlInitPerFileObjectContext(_fc, _owner, _inst) \ +#define FsRtlInitPerFileObjectContext(_fc, _owner, _inst) \ ((_fc)->OwnerId = (_owner), (_fc)->InstanceId = (_inst)) -#define FsRtlCompleteRequest(IRP,STATUS) { \ - (IRP)->IoStatus.Status = (STATUS); \ - IoCompleteRequest( (IRP), IO_DISK_INCREMENT ); \ +#define FsRtlCompleteRequest(IRP, STATUS) { \ + (IRP)->IoStatus.Status = (STATUS); \ + IoCompleteRequest( (IRP), IO_DISK_INCREMENT ); \ } $endif (_NTIFS_) Modified: trunk/reactos/include/xdk/iotypes.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/xdk/iotypes.h?rev=…
============================================================================== --- trunk/reactos/include/xdk/iotypes.h [iso-8859-1] (original) +++ trunk/reactos/include/xdk/iotypes.h [iso-8859-1] Fri Oct 3 19:36:22 2014 @@ -7017,26 +7017,6 @@ PFS_FILTER_COMPLETION_CALLBACK PostReleaseForModifiedPageWriter; } FS_FILTER_CALLBACKS, *PFS_FILTER_CALLBACKS; -#if (NTDDI_VERSION >= NTDDI_WINXP) -NTKERNELAPI -NTSTATUS -NTAPI -FsRtlRegisterFileSystemFilterCallbacks( - _In_ struct _DRIVER_OBJECT *FilterDriverObject, - _In_ PFS_FILTER_CALLBACKS Callbacks); -#endif /* (NTDDI_VERSION >= NTDDI_WINXP) */ - -#if (NTDDI_VERSION >= NTDDI_VISTA) -NTKERNELAPI -NTSTATUS -NTAPI -FsRtlNotifyStreamFileObject( - _In_ struct _FILE_OBJECT * StreamFileObject, - _In_opt_ struct _DEVICE_OBJECT *DeviceObjectHint, - _In_ FS_FILTER_STREAM_FO_NOTIFICATION_TYPE NotificationType, - _In_ BOOLEAN SafeToRecurse); -#endif /* (NTDDI_VERSION >= NTDDI_VISTA) */ - extern NTKERNELAPI KSPIN_LOCK IoStatisticsLock; extern NTKERNELAPI ULONG IoReadOperationCount; extern NTKERNELAPI ULONG IoWriteOperationCount; Modified: trunk/reactos/include/xdk/ntdef.template.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/xdk/ntdef.template…
============================================================================== --- trunk/reactos/include/xdk/ntdef.template.h [iso-8859-1] (original) +++ trunk/reactos/include/xdk/ntdef.template.h [iso-8859-1] Fri Oct 3 19:36:22 2014 @@ -364,8 +364,8 @@ _In_ PLIST_ENTRY32 ListEntry32, _Out_ PLIST_ENTRY64 ListEntry64) { - ListEntry64->Flink = (ULONG)ListEntry32->Flink; - ListEntry64->Blink = (ULONG)ListEntry32->Blink; + ListEntry64->Flink = ListEntry32->Flink; + ListEntry64->Blink = ListEntry32->Blink; } FORCEINLINE @@ -374,6 +374,12 @@ _In_ PLIST_ENTRY64 ListEntry64, _Out_ PLIST_ENTRY32 ListEntry32) { + /* ASSERT without ASSERT or intrinsics ... */ + if (((ListEntry64->Flink >> 32) != 0) || + ((ListEntry64->Blink >> 32) != 0)) + { + (VOID)*(volatile LONG*)(LONG_PTR)-1; + } ListEntry32->Flink = ListEntry64->Flink & 0xFFFFFFFF; ListEntry32->Blink = ListEntry64->Blink & 0xFFFFFFFF; } Modified: trunk/reactos/include/xdk/rtltypes.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/xdk/rtltypes.h?rev…
============================================================================== --- trunk/reactos/include/xdk/rtltypes.h [iso-8859-1] (original) +++ trunk/reactos/include/xdk/rtltypes.h [iso-8859-1] Fri Oct 3 19:36:22 2014 @@ -559,11 +559,11 @@ (NTAPI *PRTL_FREE_STRING_ROUTINE)( _In_ __drv_freesMem(Mem) _Post_invalid_ PVOID Buffer); -extern const PRTL_ALLOCATE_STRING_ROUTINE RtlAllocateStringRoutine; -extern const PRTL_FREE_STRING_ROUTINE RtlFreeStringRoutine; +extern NTKERNELAPI const PRTL_ALLOCATE_STRING_ROUTINE RtlAllocateStringRoutine; +extern NTKERNELAPI const PRTL_FREE_STRING_ROUTINE RtlFreeStringRoutine; #if _WIN32_WINNT >= 0x0600 -extern const PRTL_REALLOCATE_STRING_ROUTINE RtlReallocateStringRoutine; +extern NTKERNELAPI const PRTL_REALLOCATE_STRING_ROUTINE RtlReallocateStringRoutine; #endif _Function_class_(RTL_HEAP_COMMIT_ROUTINE)
10 years, 3 months
1
0
0
0
[tkreuzer] 64512: [FRAMEDYN] Only create framedynex on GCC builds
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Fri Oct 3 19:29:57 2014 New Revision: 64512 URL:
http://svn.reactos.org/svn/reactos?rev=64512&view=rev
Log: [FRAMEDYN] Only create framedynex on GCC builds Modified: trunk/reactos/dll/win32/framedyn/CMakeLists.txt Modified: trunk/reactos/dll/win32/framedyn/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/framedyn/CMakeLi…
============================================================================== --- trunk/reactos/dll/win32/framedyn/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/win32/framedyn/CMakeLists.txt [iso-8859-1] Fri Oct 3 19:29:57 2014 @@ -20,6 +20,6 @@ if(NOT MSVC) add_asm_files(framedynex_asm alias_gcc.s) + add_library(framedynex ${framedynex_asm}) + set_target_properties(framedynex PROPERTIES LINKER_LANGUAGE ASM) endif() -add_library(framedynex ${framedynex_asm}) -set_target_properties(framedynex PROPERTIES LINKER_LANGUAGE ASM)
10 years, 3 months
1
0
0
0
[tkreuzer] 64511: [DLLIMPORT_TEST] - Only link to framedynex on GCC builds
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Fri Oct 3 19:29:05 2014 New Revision: 64511 URL:
http://svn.reactos.org/svn/reactos?rev=64511&view=rev
Log: [DLLIMPORT_TEST] - Only link to framedynex on GCC builds Modified: trunk/rostests/tests/dllexport/CMakeLists.txt Modified: trunk/rostests/tests/dllexport/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/tests/dllexport/CMakeList…
============================================================================== --- trunk/rostests/tests/dllexport/CMakeLists.txt [iso-8859-1] (original) +++ trunk/rostests/tests/dllexport/CMakeLists.txt [iso-8859-1] Fri Oct 3 19:29:05 2014 @@ -29,4 +29,6 @@ dllimport_framedyn.cpp) set_module_type(dllimport_test win32dll ENTRYPOINT 0) add_importlibs(dllimport_test framedyn) -target_link_libraries(dllimport_test framedynex) +if(NOT MSVC) + target_link_libraries(dllimport_test framedynex) +endif()
10 years, 3 months
1
0
0
0
← Newer
1
...
62
63
64
65
66
67
68
...
73
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
Results per page:
10
25
50
100
200