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
April 2013
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
14 participants
265 discussions
Start a n
N
ew thread
[pschweitzer] 58826: [KMTEST:FSRTL] Add a test that matches rosautotest.exe behavior
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Mon Apr 22 06:49:01 2013 New Revision: 58826 URL:
http://svn.reactos.org/svn/reactos?rev=58826&view=rev
Log: [KMTEST:FSRTL] Add a test that matches rosautotest.exe behavior Modified: trunk/rostests/kmtests/ntos_fsrtl/FsRtlExpression.c Modified: trunk/rostests/kmtests/ntos_fsrtl/FsRtlExpression.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/kmtests/ntos_fsrtl/FsRtlE…
============================================================================== --- trunk/rostests/kmtests/ntos_fsrtl/FsRtlExpression.c [iso-8859-1] (original) +++ trunk/rostests/kmtests/ntos_fsrtl/FsRtlExpression.c [iso-8859-1] Mon Apr 22 06:49:01 2013 @@ -359,6 +359,10 @@ ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == FALSE, "expected FALSE, got TRUE\n"); RtlInitUnicodeString(&Name, L"ac.exe"); ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == FALSE, "expected FALSE, got TRUE\n"); + + RtlInitUnicodeString(&Expression, L"<.exe"); + RtlInitUnicodeString(&Name, L"test.exe"); + ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == TRUE, "expected TRUE, got FALSE\n"); } static VOID FsRtlIsDbcsInExpressionTest() @@ -674,6 +678,10 @@ ok(FsRtlIsDbcsInExpression(&Expression, &Name) == FALSE, "expected FALSE, got TRUE\n"); RtlInitAnsiString(&Name, "ac.exe"); ok(FsRtlIsDbcsInExpression(&Expression, &Name) == FALSE, "expected FALSE, got TRUE\n"); + + RtlInitAnsiString(&Expression, "<.exe"); + RtlInitAnsiString(&Name, "test.exe"); + ok(FsRtlIsDbcsInExpression(&Expression, &Name) == TRUE, "expected TRUE, got FALSE\n"); } START_TEST(FsRtlExpression)
11 years, 8 months
1
0
0
0
[hbelusca] 58825: [KDCOM] - Code reorganization: put all the port control functions together. - Little simplifications of some functions (from CORE-7106).
by hbelusca@svn.reactos.org
Author: hbelusca Date: Mon Apr 22 00:28:16 2013 New Revision: 58825 URL:
http://svn.reactos.org/svn/reactos?rev=58825&view=rev
Log: [KDCOM] - Code reorganization: put all the port control functions together. - Little simplifications of some functions (from CORE-7106). Modified: trunk/reactos/drivers/base/kddll/kdcom.c trunk/reactos/drivers/base/kddll/kddll.c trunk/reactos/drivers/base/kddll/kdserial.c Modified: trunk/reactos/drivers/base/kddll/kdcom.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/base/kddll/kdcom.c…
============================================================================== --- trunk/reactos/drivers/base/kddll/kdcom.c [iso-8859-1] (original) +++ trunk/reactos/drivers/base/kddll/kdcom.c [iso-8859-1] Mon Apr 22 00:28:16 2013 @@ -43,6 +43,36 @@ NTSTATUS NTAPI +KdD0Transition(VOID) +{ + return STATUS_SUCCESS; +} + +NTSTATUS +NTAPI +KdD3Transition(VOID) +{ + return STATUS_SUCCESS; +} + +NTSTATUS +NTAPI +KdSave(IN BOOLEAN SleepTransition) +{ + /* Nothing to do on COM ports */ + return STATUS_SUCCESS; +} + +NTSTATUS +NTAPI +KdRestore(IN BOOLEAN SleepTransition) +{ + /* Nothing to do on COM ports */ + return STATUS_SUCCESS; +} + +NTSTATUS +NTAPI KdpPortInitialize(IN ULONG ComPortNumber, IN ULONG ComPortBaudRate) { @@ -167,6 +197,20 @@ return KdpPortInitialize(ComPortNumber, ComPortBaudRate); } +/****************************************************************************** + * \name KdDebuggerInitialize1 + * \brief Phase 1 initialization. + * \param [opt] LoaderBlock Pointer to the Loader parameter block. Can be NULL. + * \return Status + */ +NTSTATUS +NTAPI +KdDebuggerInitialize1(IN PLOADER_PARAMETER_BLOCK LoaderBlock OPTIONAL) +{ + return STATUS_SUCCESS; +} + + VOID NTAPI KdpSendByte(IN UCHAR Byte) @@ -210,20 +254,4 @@ return KDP_PACKET_TIMEOUT; } -NTSTATUS -NTAPI -KdSave(IN BOOLEAN SleepTransition) -{ - /* Nothing to do on COM ports */ - return STATUS_SUCCESS; -} - -NTSTATUS -NTAPI -KdRestore(IN BOOLEAN SleepTransition) -{ - /* Nothing to do on COM ports */ - return STATUS_SUCCESS; -} - /* EOF */ Modified: trunk/reactos/drivers/base/kddll/kddll.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/base/kddll/kddll.c…
============================================================================== --- trunk/reactos/drivers/base/kddll/kddll.c [iso-8859-1] (original) +++ trunk/reactos/drivers/base/kddll/kddll.c [iso-8859-1] Mon Apr 22 00:28:16 2013 @@ -31,13 +31,10 @@ IN PVOID Buffer, IN ULONG Length) { - ULONG i, Checksum = 0; - - for (i = 0; i < Length; i++) - { - Checksum += ((PUCHAR)Buffer)[i]; - } - + PUCHAR ByteBuffer = Buffer; + ULONG Checksum = 0; + + while (Length-- > 0) Checksum += (ULONG)*ByteBuffer++; return Checksum; } @@ -60,36 +57,6 @@ /* PUBLIC FUNCTIONS ***********************************************************/ - -NTSTATUS -NTAPI -KdD0Transition(VOID) -{ - return STATUS_SUCCESS; -} - -NTSTATUS -NTAPI -KdD3Transition(VOID) -{ - return STATUS_SUCCESS; -} - - -/****************************************************************************** - * \name KdDebuggerInitialize1 - * \brief Phase 1 initialization. - * \param [opt] LoaderBlock Pointer to the Loader parameter block. Can be NULL. - * \return Status - */ -NTSTATUS -NTAPI -KdDebuggerInitialize1( - IN PLOADER_PARAMETER_BLOCK LoaderBlock OPTIONAL) -{ - return STATUS_SUCCESS; -} - /****************************************************************************** * \name KdReceivePacket @@ -339,7 +306,6 @@ return KDP_PACKET_RECEIVED; } - VOID NTAPI KdSendPacket( Modified: trunk/reactos/drivers/base/kddll/kdserial.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/base/kddll/kdseria…
============================================================================== --- trunk/reactos/drivers/base/kddll/kdserial.c [iso-8859-1] (original) +++ trunk/reactos/drivers/base/kddll/kdserial.c [iso-8859-1] Mon Apr 22 00:28:16 2013 @@ -8,7 +8,7 @@ #include "kddll.h" - +/* FUNCTIONS ******************************************************************/ /****************************************************************************** * \name KdpSendBuffer @@ -22,11 +22,9 @@ IN PVOID Buffer, IN ULONG Size) { - ULONG i; - for (i = 0; i < Size; i++) - { - KdpSendByte(((PUCHAR)Buffer)[i]); - } + PUCHAR ByteBuffer = Buffer; + + while (Size-- > 0) KdpSendByte(*ByteBuffer++); } /****************************************************************************** @@ -43,15 +41,16 @@ OUT PVOID Buffer, IN ULONG Size) { - ULONG i; PUCHAR ByteBuffer = Buffer; + UCHAR Byte; KDP_STATUS Status; - for (i = 0; i < Size; i++) + while (Size-- > 0) { /* Try to get a byte from the port */ - Status = KdpReceiveByte(&ByteBuffer[i]); + Status = KdpReceiveByte(&Byte); if (Status != KDP_PACKET_RECEIVED) return Status; + *ByteBuffer++ = Byte; } return KDP_PACKET_RECEIVED;
11 years, 8 months
1
0
0
0
[hbelusca] 58824: [KDCOM] - Use the UCHAR type directly instead of using a typedef for defining BYTE. - A little bit of header reorganization.
by hbelusca@svn.reactos.org
Author: hbelusca Date: Sun Apr 21 23:56:15 2013 New Revision: 58824 URL:
http://svn.reactos.org/svn/reactos?rev=58824&view=rev
Log: [KDCOM] - Use the UCHAR type directly instead of using a typedef for defining BYTE. - A little bit of header reorganization. Modified: trunk/reactos/drivers/base/kddll/kdcom.c trunk/reactos/drivers/base/kddll/kddll.c trunk/reactos/drivers/base/kddll/kddll.h trunk/reactos/drivers/base/kddll/kdserial.c Modified: trunk/reactos/drivers/base/kddll/kdcom.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/base/kddll/kdcom.c…
============================================================================== --- trunk/reactos/drivers/base/kddll/kdcom.c [iso-8859-1] (original) +++ trunk/reactos/drivers/base/kddll/kdcom.c [iso-8859-1] Sun Apr 21 23:56:15 2013 @@ -8,6 +8,9 @@ #include "kddll.h" #include <cportlib/cportlib.h> + +long atol(const char *str); + /* Serial debug connection */ #define DEFAULT_DEBUG_PORT 2 /* COM2 */ @@ -166,7 +169,7 @@ VOID NTAPI -KdpSendByte(IN BYTE Byte) +KdpSendByte(IN UCHAR Byte) { /* Send the byte */ CpPutByte(&KdDebugComPort, Byte); @@ -174,7 +177,7 @@ KDP_STATUS NTAPI -KdpPollByte(OUT PBYTE OutByte) +KdpPollByte(OUT PUCHAR OutByte) { /* Poll the byte */ return (CpGetByte(&KdDebugComPort, OutByte, FALSE) == CP_GET_SUCCESS @@ -184,7 +187,7 @@ KDP_STATUS NTAPI -KdpReceiveByte(OUT PBYTE OutByte) +KdpReceiveByte(OUT PUCHAR OutByte) { /* Get the byte */ return (CpGetByte(&KdDebugComPort, OutByte, TRUE) == CP_GET_SUCCESS Modified: trunk/reactos/drivers/base/kddll/kddll.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/base/kddll/kddll.c…
============================================================================== --- trunk/reactos/drivers/base/kddll/kddll.c [iso-8859-1] (original) +++ trunk/reactos/drivers/base/kddll/kddll.c [iso-8859-1] Sun Apr 21 23:56:15 2013 @@ -415,3 +415,4 @@ CurrentPacketId &= ~SYNC_PACKET_ID; } +/* EOF */ Modified: trunk/reactos/drivers/base/kddll/kddll.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/base/kddll/kddll.h…
============================================================================== --- trunk/reactos/drivers/base/kddll/kddll.h [iso-8859-1] (original) +++ trunk/reactos/drivers/base/kddll/kddll.h [iso-8859-1] Sun Apr 21 23:56:15 2013 @@ -8,26 +8,27 @@ #pragma once -//#define KDDEBUG /* uncomment to enable debugging this dll */ - #define NOEXTAPI #include <ntifs.h> +#include <arc/arc.h> #include <halfuncs.h> -#include "arc/arc.h" -#include "windbgkd.h" - +#include <windbgkd.h> #include <wdbgexts.h> #include <ioaccess.h> /* port intrinsics */ #define NDEBUG #include <debug.h> -long atol(const char *str); - -typedef UCHAR BYTE, *PBYTE; +//#define KDDEBUG /* uncomment to enable debugging this dll */ typedef ULONG (*PFNDBGPRNT)(const char *Format, ...); extern PFNDBGPRNT KdpDbgPrint; + +#ifndef KDDEBUG +#define KDDBGPRINT(...) +#else +#define KDDBGPRINT KdpDbgPrint +#endif typedef enum { @@ -35,12 +36,6 @@ KDP_PACKET_TIMEOUT = 1, KDP_PACKET_RESEND = 2 } KDP_STATUS; - -#ifndef KDDEBUG -#define KDDBGPRINT(...) -#else -#define KDDBGPRINT KdpDbgPrint -#endif VOID NTAPI @@ -61,24 +56,18 @@ VOID NTAPI -KdpSendByte(IN BYTE Byte); +KdpSendByte(IN UCHAR Byte); KDP_STATUS NTAPI -KdpPollByte(OUT PBYTE OutByte); +KdpPollByte(OUT PUCHAR OutByte); KDP_STATUS NTAPI -KdpReceiveByte(OUT PBYTE OutByte); +KdpReceiveByte(OUT PUCHAR OutByte); KDP_STATUS NTAPI KdpPollBreakIn(VOID); - -#if 0 -NTSTATUS -NTAPI -KdDebuggerInitialize0( - IN PLOADER_PARAMETER_BLOCK LoaderBlock OPTIONAL); -#endif +/* EOF */ Modified: trunk/reactos/drivers/base/kddll/kdserial.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/base/kddll/kdseria…
============================================================================== --- trunk/reactos/drivers/base/kddll/kdserial.c [iso-8859-1] (original) +++ trunk/reactos/drivers/base/kddll/kdserial.c [iso-8859-1] Sun Apr 21 23:56:15 2013 @@ -143,3 +143,4 @@ return KDP_PACKET_RECEIVED; } +/* EOF */
11 years, 8 months
1
0
0
0
[hbelusca] 58823: [KDCOM] Seems to fix reconnection issues, in two lines.
by hbelusca@svn.reactos.org
Author: hbelusca Date: Sun Apr 21 23:39:05 2013 New Revision: 58823 URL:
http://svn.reactos.org/svn/reactos?rev=58823&view=rev
Log: [KDCOM] Seems to fix reconnection issues, in two lines. Modified: trunk/reactos/drivers/base/kddll/kddll.c Modified: trunk/reactos/drivers/base/kddll/kddll.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/base/kddll/kddll.c…
============================================================================== --- trunk/reactos/drivers/base/kddll/kddll.c [iso-8859-1] (original) +++ trunk/reactos/drivers/base/kddll/kddll.c [iso-8859-1] Sun Apr 21 23:39:05 2013 @@ -371,6 +371,16 @@ do { + if (Retries == 0) + { + /* PACKET_TYPE_KD_DEBUG_IO is allowed to instantly timeout */ + if (PacketType == PACKET_TYPE_KD_DEBUG_IO) + { + /* No response, silently fail. */ + return; + } + } + /* Set the packet id */ Packet.PacketId = CurrentPacketId; @@ -381,10 +391,7 @@ KdpSendBuffer(MessageHeader->Buffer, MessageHeader->Length); /* If we have meesage data, also send it */ - if (MessageData) - { - KdpSendBuffer(MessageData->Buffer, MessageData->Length); - } + if (MessageData) KdpSendBuffer(MessageData->Buffer, MessageData->Length); /* Finalize with a trailing byte */ KdpSendByte(PACKET_TRAILING_BYTE); @@ -393,31 +400,18 @@ KdStatus = KdReceivePacket(PACKET_TYPE_KD_ACKNOWLEDGE, NULL, NULL, - 0, + NULL, KdContext); - - /* Did we succeed? */ - if (KdStatus == KDP_PACKET_RECEIVED) - { - CurrentPacketId &= ~SYNC_PACKET_ID; - break; - } - - /* PACKET_TYPE_KD_DEBUG_IO is allowed to instantly timeout */ - if (PacketType == PACKET_TYPE_KD_DEBUG_IO) - { - /* No response, silently fail. */ - return; - } - if (KdStatus == KDP_PACKET_TIMEOUT) { - Retries--; + if (Retries > 0) Retries--; } /* Packet timed out, send it again */ KDDBGPRINT("KdSendPacket got KdStatus 0x%x\n", KdStatus); - } - while (Retries > 0); -} - + + } while (KdStatus != KDP_PACKET_RECEIVED); + + CurrentPacketId &= ~SYNC_PACKET_ID; +} +
11 years, 8 months
1
0
0
0
[hbelusca] 58822: [KDCOM] - Directly use CpGetByte and Co. functions from the CPortLib since they are working ok. - Remove unusued variables.
by hbelusca@svn.reactos.org
Author: hbelusca Date: Sun Apr 21 23:23:30 2013 New Revision: 58822 URL:
http://svn.reactos.org/svn/reactos?rev=58822&view=rev
Log: [KDCOM] - Directly use CpGetByte and Co. functions from the CPortLib since they are working ok. - Remove unusued variables. Modified: trunk/reactos/drivers/base/kddll/kdcom.c trunk/reactos/drivers/base/kddll/kddll.c trunk/reactos/drivers/base/kddll/kddll.h trunk/reactos/drivers/base/kddll/kdserial.c Modified: trunk/reactos/drivers/base/kddll/kdcom.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/base/kddll/kdcom.c…
============================================================================== --- trunk/reactos/drivers/base/kddll/kdcom.c [iso-8859-1] (original) +++ trunk/reactos/drivers/base/kddll/kdcom.c [iso-8859-1] Sun Apr 21 23:23:30 2013 @@ -176,52 +176,33 @@ NTAPI KdpPollByte(OUT PBYTE OutByte) { + /* Poll the byte */ + return (CpGetByte(&KdDebugComPort, OutByte, FALSE) == CP_GET_SUCCESS + ? KDP_PACKET_RECEIVED + : KDP_PACKET_TIMEOUT); +} + +KDP_STATUS +NTAPI +KdpReceiveByte(OUT PBYTE OutByte) +{ /* Get the byte */ - if (CpGetByte(&KdDebugComPort, OutByte, FALSE) == CP_GET_SUCCESS) - { - /* Yes, return the byte */ + return (CpGetByte(&KdDebugComPort, OutByte, TRUE) == CP_GET_SUCCESS + ? KDP_PACKET_RECEIVED + : KDP_PACKET_TIMEOUT); +} + +KDP_STATUS +NTAPI +KdpPollBreakIn(VOID) +{ + KDP_STATUS KdStatus; + UCHAR Byte; + + KdStatus = KdpPollByte(&Byte); + if ((KdStatus == KDP_PACKET_RECEIVED) && (Byte == BREAKIN_PACKET_BYTE)) + { return KDP_PACKET_RECEIVED; - } - else - { - /* Timed out */ - return KDP_PACKET_TIMEOUT; - } -} - -KDP_STATUS -NTAPI -KdpReceiveByte(OUT PBYTE OutByte) -{ - // TODO: Use CpGetByte(&KdDebugComPort, OutByte, TRUE); - - ULONG Repeats = KdpStallScaleFactor * 100; - - while (Repeats--) - { - /* Check if data is available */ - if (KdpPollByte(OutByte) == KDP_PACKET_RECEIVED) - { - /* We successfully got a byte */ - return KDP_PACKET_RECEIVED; - } - } - - /* Timed out */ - return KDP_PACKET_TIMEOUT; -} - -KDP_STATUS -NTAPI -KdpPollBreakIn(VOID) -{ - UCHAR Byte; - if (KdpPollByte(&Byte) == KDP_PACKET_RECEIVED) - { - if (Byte == BREAKIN_PACKET_BYTE) - { - return KDP_PACKET_RECEIVED; - } } return KDP_PACKET_TIMEOUT; } Modified: trunk/reactos/drivers/base/kddll/kddll.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/base/kddll/kddll.c…
============================================================================== --- trunk/reactos/drivers/base/kddll/kddll.c [iso-8859-1] (original) +++ trunk/reactos/drivers/base/kddll/kddll.c [iso-8859-1] Sun Apr 21 23:23:30 2013 @@ -12,9 +12,7 @@ PFNDBGPRNT KdpDbgPrint = NULL; ULONG CurrentPacketId = INITIAL_PACKET_ID | SYNC_PACKET_ID; -ULONG RemotePacketId = 0; -BOOLEAN KdpPhase1Complete = FALSE; -ULONG KdpStallScaleFactor = 10000; +ULONG RemotePacketId = INITIAL_PACKET_ID; /* PRIVATE FUNCTIONS **********************************************************/ @@ -89,9 +87,6 @@ KdDebuggerInitialize1( IN PLOADER_PARAMETER_BLOCK LoaderBlock OPTIONAL) { - KdpStallScaleFactor = KeGetPcr()->StallScaleFactor * 100; - KdpPhase1Complete = TRUE; - return STATUS_SUCCESS; } Modified: trunk/reactos/drivers/base/kddll/kddll.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/base/kddll/kddll.h…
============================================================================== --- trunk/reactos/drivers/base/kddll/kddll.h [iso-8859-1] (original) +++ trunk/reactos/drivers/base/kddll/kddll.h [iso-8859-1] Sun Apr 21 23:23:30 2013 @@ -28,8 +28,6 @@ typedef ULONG (*PFNDBGPRNT)(const char *Format, ...); extern PFNDBGPRNT KdpDbgPrint; -extern BOOLEAN KdpPhase1Complete; -extern ULONG KdpStallScaleFactor; typedef enum { Modified: trunk/reactos/drivers/base/kddll/kdserial.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/base/kddll/kdseria…
============================================================================== --- trunk/reactos/drivers/base/kddll/kdserial.c [iso-8859-1] (original) +++ trunk/reactos/drivers/base/kddll/kdserial.c [iso-8859-1] Sun Apr 21 23:23:30 2013 @@ -22,7 +22,7 @@ IN PVOID Buffer, IN ULONG Size) { - INT i; + ULONG i; for (i = 0; i < Size; i++) { KdpSendByte(((PUCHAR)Buffer)[i]); @@ -51,11 +51,7 @@ { /* Try to get a byte from the port */ Status = KdpReceiveByte(&ByteBuffer[i]); - - if (Status != KDP_PACKET_RECEIVED) - { - return Status; - } + if (Status != KDP_PACKET_RECEIVED) return Status; } return KDP_PACKET_RECEIVED;
11 years, 8 months
1
0
0
0
[tfaber] 58821: [SHELL32] - Style improvements by Katayama Hirofumi MZ and Edijs Kolesnikovičs
by tfaber@svn.reactos.org
Author: tfaber Date: Sun Apr 21 22:10:36 2013 New Revision: 58821 URL:
http://svn.reactos.org/svn/reactos?rev=58821&view=rev
Log: [SHELL32] - Style improvements by Katayama Hirofumi MZ and Edijs Kolesnikovičs Modified: trunk/reactos/dll/win32/shell32/dialogs.cpp trunk/reactos/dll/win32/shell32/shell32_main.cpp trunk/reactos/dll/win32/shell32/shellitem.cpp trunk/reactos/dll/win32/shell32/shellitem.h trunk/reactos/dll/win32/shell32/startmenu.cpp trunk/reactos/dll/win32/shell32/startmenu.h Modified: trunk/reactos/dll/win32/shell32/dialogs.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/dialogs.…
============================================================================== --- trunk/reactos/dll/win32/shell32/dialogs.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/dialogs.cpp [iso-8859-1] Sun Apr 21 22:10:36 2013 @@ -353,8 +353,8 @@ RUNFILEDLGPARAMS *prfdp = (RUNFILEDLGPARAMS *)GetWindowLongPtrW(hwnd, DWLP_USER); switch (message) - { - case WM_INITDIALOG : + { + case WM_INITDIALOG: prfdp = (RUNFILEDLGPARAMS *)lParam ; SetWindowLongPtrW(hwnd, DWLP_USER, (LONG_PTR)prfdp); @@ -379,29 +379,29 @@ SendMessageW(hwnd, WM_SETICON, ICON_SMALL, (LPARAM)prfdp->hIcon); SendMessageW(GetDlgItem(hwnd, IDC_RUNDLG_ICON), STM_SETICON, (WPARAM)prfdp->hIcon, 0); - FillList (GetDlgItem (hwnd, IDC_RUNDLG_EDITPATH), NULL, (prfdp->uFlags & RFF_NODEFAULT) == 0) ; - SetFocus (GetDlgItem (hwnd, IDC_RUNDLG_EDITPATH)) ; - return TRUE ; - - case WM_COMMAND : + FillList (GetDlgItem (hwnd, IDC_RUNDLG_EDITPATH), NULL, (prfdp->uFlags & RFF_NODEFAULT) == 0); + SetFocus (GetDlgItem (hwnd, IDC_RUNDLG_EDITPATH)); + return TRUE; + + case WM_COMMAND: switch (LOWORD (wParam)) { - case IDOK : + case IDOK: { - int ic ; + int ic; HWND htxt = GetDlgItem (hwnd, IDC_RUNDLG_EDITPATH); if ((ic = GetWindowTextLengthW (htxt))) { - WCHAR *psz, *parent=NULL ; - SHELLEXECUTEINFOW sei ; - - ZeroMemory (&sei, sizeof(sei)) ; - sei.cbSize = sizeof(sei) ; - psz = (WCHAR *)HeapAlloc( GetProcessHeap(), 0, (ic + 1)*sizeof(WCHAR) ); + WCHAR *psz, *parent = NULL; + SHELLEXECUTEINFOW sei; + + ZeroMemory (&sei, sizeof(sei)); + sei.cbSize = sizeof(sei); + psz = (WCHAR *)HeapAlloc(GetProcessHeap(), 0, (ic + 1)*sizeof(WCHAR)); if (psz) { - GetWindowTextW (htxt, psz, ic + 1) ; + GetWindowTextW(htxt, psz, ic + 1); /* according to
http://www.codeproject.com/KB/shell/runfiledlg.aspx
we should send a * WM_NOTIFY before execution */ @@ -415,17 +415,17 @@ else sei.lpDirectory = parent = RunDlg_GetParentDir(sei.lpFile); - if (!ShellExecuteExW( &sei )) + if (!ShellExecuteExW(&sei)) { HeapFree(GetProcessHeap(), 0, psz); HeapFree(GetProcessHeap(), 0, parent); - SendMessageA (htxt, CB_SETEDITSEL, 0, MAKELPARAM (0, -1)) ; - return TRUE ; + SendMessageA (htxt, CB_SETEDITSEL, 0, MAKELPARAM (0, -1)); + return TRUE; } /* FillList is still ANSI */ - GetWindowTextA (htxt, (LPSTR)psz, ic + 1) ; - FillList (htxt, (LPSTR)psz, FALSE) ; + GetWindowTextA (htxt, (LPSTR)psz, ic + 1); + FillList (htxt, (LPSTR)psz, FALSE); HeapFree(GetProcessHeap(), 0, psz); HeapFree(GetProcessHeap(), 0, parent); @@ -434,14 +434,14 @@ } } - case IDCANCEL : - EndDialog (hwnd, 0) ; - return TRUE ; - - case IDC_RUNDLG_BROWSE : - { - HMODULE hComdlg = NULL ; - LPFNOFN ofnProc = NULL ; + case IDCANCEL: + EndDialog (hwnd, 0); + return TRUE; + + case IDC_RUNDLG_BROWSE: + { + HMODULE hComdlg = NULL; + LPFNOFN ofnProc = NULL; static const WCHAR comdlg32W[] = L"comdlg32"; WCHAR szFName[1024] = {0}; WCHAR filter[MAX_PATH], szCaption[MAX_PATH]; @@ -465,26 +465,26 @@ { ERR("Couldn't get GetOpenFileName function entry (lib=%p, proc=%p)\n", hComdlg, ofnProc); ShellMessageBoxW(shell32_hInstance, hwnd, MAKEINTRESOURCEW(IDS_RUNDLG_BROWSE_ERROR), NULL, MB_OK | MB_ICONERROR); - return TRUE ; + return TRUE; } if (ofnProc(&ofn)) { - SetFocus (GetDlgItem (hwnd, IDOK)) ; - SetWindowTextW (GetDlgItem (hwnd, IDC_RUNDLG_EDITPATH), szFName) ; - SendMessageW (GetDlgItem (hwnd, IDC_RUNDLG_EDITPATH), CB_SETEDITSEL, 0, MAKELPARAM (0, -1)) ; - SetFocus (GetDlgItem (hwnd, IDOK)) ; + SetFocus (GetDlgItem (hwnd, IDOK)); + SetWindowTextW (GetDlgItem (hwnd, IDC_RUNDLG_EDITPATH), szFName); + SendMessageW (GetDlgItem (hwnd, IDC_RUNDLG_EDITPATH), CB_SETEDITSEL, 0, MAKELPARAM (0, -1)); + SetFocus (GetDlgItem (hwnd, IDOK)); } - FreeLibrary (hComdlg) ; - - return TRUE ; - } + FreeLibrary (hComdlg); + + return TRUE; } - return TRUE ; - } - return FALSE ; - } + } + return TRUE; + } + return FALSE; +} /* This grabs the MRU list from the registry and fills the combo for the "Run" dialog above */ /* fShowDefault ignored if pszLatest != NULL */ Modified: trunk/reactos/dll/win32/shell32/shell32_main.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shell32_…
============================================================================== --- trunk/reactos/dll/win32/shell32/shell32_main.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/shell32_main.cpp [iso-8859-1] Sun Apr 21 22:10:36 2013 @@ -1278,24 +1278,24 @@ BEGIN_OBJECT_MAP(ObjectMap) -OBJECT_ENTRY(CLSID_ShellFSFolder, CFSFolder) -OBJECT_ENTRY(CLSID_MyComputer, CDrivesFolder) -OBJECT_ENTRY(CLSID_ShellDesktop, CDesktopFolder) -OBJECT_ENTRY(CLSID_ShellItem, CShellItem) -OBJECT_ENTRY(CLSID_ShellLink, CShellLink) -OBJECT_ENTRY(CLSID_DragDropHelper, CDropTargetHelper) -OBJECT_ENTRY(CLSID_ControlPanel, CControlPanelFolder) -OBJECT_ENTRY(CLSID_AutoComplete, CAutoComplete) -OBJECT_ENTRY(CLSID_MyDocuments, CMyDocsFolder) -OBJECT_ENTRY(CLSID_NetworkPlaces, CNetFolder) -OBJECT_ENTRY(CLSID_FontsFolderShortcut, CFontsFolder) -OBJECT_ENTRY(CLSID_Printers, CPrinterFolder) -OBJECT_ENTRY(CLSID_AdminFolderShortcut, CAdminToolsFolder) -OBJECT_ENTRY(CLSID_RecycleBin, CRecycleBin) -OBJECT_ENTRY(CLSID_OpenWithMenu, COpenWithMenu) -OBJECT_ENTRY(CLSID_NewMenu, CNewMenu) -OBJECT_ENTRY(CLSID_StartMenu, CStartMenu) -OBJECT_ENTRY(CLSID_MenuBandSite, CMenuBandSite) + OBJECT_ENTRY(CLSID_ShellFSFolder, CFSFolder) + OBJECT_ENTRY(CLSID_MyComputer, CDrivesFolder) + OBJECT_ENTRY(CLSID_ShellDesktop, CDesktopFolder) + OBJECT_ENTRY(CLSID_ShellItem, CShellItem) + OBJECT_ENTRY(CLSID_ShellLink, CShellLink) + OBJECT_ENTRY(CLSID_DragDropHelper, CDropTargetHelper) + OBJECT_ENTRY(CLSID_ControlPanel, CControlPanelFolder) + OBJECT_ENTRY(CLSID_AutoComplete, CAutoComplete) + OBJECT_ENTRY(CLSID_MyDocuments, CMyDocsFolder) + OBJECT_ENTRY(CLSID_NetworkPlaces, CNetFolder) + OBJECT_ENTRY(CLSID_FontsFolderShortcut, CFontsFolder) + OBJECT_ENTRY(CLSID_Printers, CPrinterFolder) + OBJECT_ENTRY(CLSID_AdminFolderShortcut, CAdminToolsFolder) + OBJECT_ENTRY(CLSID_RecycleBin, CRecycleBin) + OBJECT_ENTRY(CLSID_OpenWithMenu, COpenWithMenu) + OBJECT_ENTRY(CLSID_NewMenu, CNewMenu) + OBJECT_ENTRY(CLSID_StartMenu, CStartMenu) + OBJECT_ENTRY(CLSID_MenuBandSite, CMenuBandSite) END_OBJECT_MAP() CShell32Module gModule; Modified: trunk/reactos/dll/win32/shell32/shellitem.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shellite…
============================================================================== --- trunk/reactos/dll/win32/shell32/shellitem.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/shellitem.cpp [iso-8859-1] Sun Apr 21 22:10:36 2013 @@ -27,9 +27,9 @@ EXTERN_C HRESULT WINAPI SHCreateShellItem(LPCITEMIDLIST pidlParent, IShellFolder *psfParent, LPCITEMIDLIST pidl, IShellItem **ppsi); -CShellItem::CShellItem() -{ - m_pidl = NULL; +CShellItem::CShellItem() : + m_pidl(NULL) +{ } CShellItem::~CShellItem() @@ -60,16 +60,16 @@ HRESULT CShellItem::get_parent_shellfolder(IShellFolder **ppsf) { + HRESULT hr; LPITEMIDLIST parent_pidl; CComPtr<IShellFolder> desktop; - HRESULT hr; hr = get_parent_pidl(&parent_pidl); if (SUCCEEDED(hr)) { hr = SHGetDesktopFolder(&desktop); if (SUCCEEDED(hr)) - hr = desktop->BindToObject(parent_pidl, NULL, IID_IShellFolder, (void**)ppsf); + hr = desktop->BindToObject(parent_pidl, NULL, IID_IShellFolder, reinterpret_cast<void **>(ppsf)); ILFree(parent_pidl); } @@ -87,8 +87,8 @@ HRESULT WINAPI CShellItem::GetParent(IShellItem **ppsi) { + HRESULT hr; LPITEMIDLIST parent_pidl; - HRESULT hr; TRACE("(%p,%p)\n", this, ppsi); @@ -104,8 +104,8 @@ HRESULT WINAPI CShellItem::GetDisplayName(SIGDN sigdnName, LPWSTR *ppszName) { + HRESULT hr; CComPtr<IShellFolder> parent_folder; - HRESULT hr; STRRET name; DWORD uFlags; @@ -151,7 +151,7 @@ HRESULT WINAPI CShellItem::GetAttributes(SFGAOF sfgaoMask, SFGAOF *psfgaoAttribs) { CComPtr<IShellFolder> parent_folder; - LPITEMIDLIST child_pidl; + LPCITEMIDLIST child_pidl; HRESULT hr; TRACE("(%p,%x,%p)\n", this, sfgaoMask, psfgaoAttribs); @@ -161,7 +161,7 @@ { child_pidl = ILFindLastID(m_pidl); *psfgaoAttribs = sfgaoMask; - hr = parent_folder->GetAttributesOf(1, (LPCITEMIDLIST*)&child_pidl, psfgaoAttribs); + hr = parent_folder->GetAttributesOf(1, &child_pidl, psfgaoAttribs); } return hr; @@ -169,9 +169,9 @@ HRESULT WINAPI CShellItem::Compare(IShellItem *oth, SICHINTF hint, int *piOrder) { + HRESULT hr; + CComPtr<IPersistIDList> pIDList; CComPtr<IShellFolder> parent_folder; - CComPtr<IPersistIDList> pIDList; - HRESULT hr; LPITEMIDLIST pidl; TRACE("(%p,%p,%x,%p)\n", this, oth, hint, piOrder); @@ -179,7 +179,7 @@ if (piOrder == NULL || oth == NULL) return E_POINTER; - hr = oth->QueryInterface(IID_IPersistIDList, (void **)&pIDList); + hr = oth->QueryInterface(IID_IPersistIDList, reinterpret_cast<void **>(&pIDList)); if (SUCCEEDED(hr)) { hr = pIDList->GetIDList(&pidl); @@ -189,7 +189,7 @@ if (SUCCEEDED(hr)) { hr = parent_folder->CompareIDs(hint, m_pidl, pidl); - *piOrder = (int)SCODE_CODE(hr); + *piOrder = static_cast<int>(SCODE_CODE(hr)); } ILFree(pidl); } @@ -239,20 +239,19 @@ HRESULT WINAPI SHCreateShellItem(LPCITEMIDLIST pidlParent, IShellFolder *psfParent, LPCITEMIDLIST pidl, IShellItem **ppsi) { + HRESULT hr; IShellItem *newShellItem; LPITEMIDLIST new_pidl; CComPtr<IPersistIDList> newPersistIDList; - HRESULT hr; TRACE("(%p,%p,%p,%p)\n", pidlParent, psfParent, pidl, ppsi); if (!pidl) - { return E_INVALIDARG; - } - else if (pidlParent || psfParent) - { - LPITEMIDLIST temp_parent=NULL; + + if (pidlParent || psfParent) + { + LPITEMIDLIST temp_parent = NULL; if (!pidlParent) { CComPtr<IPersistFolder2> ppf2Parent; Modified: trunk/reactos/dll/win32/shell32/shellitem.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shellite…
============================================================================== --- trunk/reactos/dll/win32/shell32/shellitem.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/shellitem.h [iso-8859-1] Sun Apr 21 22:10:36 2013 @@ -23,30 +23,31 @@ #define _SHELLITEM_H_ class CShellItem : - public CComCoClass<CShellItem, &CLSID_ShellItem>, - public CComObjectRootEx<CComMultiThreadModelNoCS>, - public IShellItem, - public IPersistIDList + public CComCoClass<CShellItem, &CLSID_ShellItem>, + public CComObjectRootEx<CComMultiThreadModelNoCS>, + public IShellItem, + public IPersistIDList { private: - LPITEMIDLIST m_pidl; + LPITEMIDLIST m_pidl; + public: - CShellItem(); - ~CShellItem(); - HRESULT get_parent_pidl(LPITEMIDLIST *parent_pidl); - HRESULT get_parent_shellfolder(IShellFolder **ppsf); + CShellItem(); + ~CShellItem(); + HRESULT get_parent_pidl(LPITEMIDLIST *parent_pidl); + HRESULT get_parent_shellfolder(IShellFolder **ppsf); - // IShellItem - virtual HRESULT WINAPI BindToHandler(IBindCtx *pbc, REFGUID rbhid, REFIID riid, void **ppvOut); - virtual HRESULT WINAPI GetParent(IShellItem **ppsi); - virtual HRESULT WINAPI GetDisplayName(SIGDN sigdnName, LPWSTR *ppszName); - virtual HRESULT WINAPI GetAttributes(SFGAOF sfgaoMask, SFGAOF *psfgaoAttribs); - virtual HRESULT WINAPI Compare(IShellItem *oth, SICHINTF hint, int *piOrder); + // IShellItem + virtual HRESULT WINAPI BindToHandler(IBindCtx *pbc, REFGUID rbhid, REFIID riid, void **ppvOut); + virtual HRESULT WINAPI GetParent(IShellItem **ppsi); + virtual HRESULT WINAPI GetDisplayName(SIGDN sigdnName, LPWSTR *ppszName); + virtual HRESULT WINAPI GetAttributes(SFGAOF sfgaoMask, SFGAOF *psfgaoAttribs); + virtual HRESULT WINAPI Compare(IShellItem *oth, SICHINTF hint, int *piOrder); - // IPersistIDList - virtual HRESULT WINAPI GetClassID(CLSID *pClassID); - virtual HRESULT WINAPI SetIDList(LPCITEMIDLIST pidl); - virtual HRESULT WINAPI GetIDList(LPITEMIDLIST *ppidl); + // IPersistIDList + virtual HRESULT WINAPI GetClassID(CLSID *pClassID); + virtual HRESULT WINAPI SetIDList(LPCITEMIDLIST pidl); + virtual HRESULT WINAPI GetIDList(LPITEMIDLIST *ppidl); DECLARE_NO_REGISTRY() DECLARE_NOT_AGGREGATABLE(CShellItem) @@ -54,8 +55,8 @@ DECLARE_PROTECT_FINAL_CONSTRUCT() BEGIN_COM_MAP(CShellItem) - COM_INTERFACE_ENTRY_IID(IID_IShellItem, IShellItem) - COM_INTERFACE_ENTRY_IID(IID_IPersistIDList, IPersistIDList) + COM_INTERFACE_ENTRY_IID(IID_IShellItem, IShellItem) + COM_INTERFACE_ENTRY_IID(IID_IPersistIDList, IPersistIDList) END_COM_MAP() }; Modified: trunk/reactos/dll/win32/shell32/startmenu.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/startmen…
============================================================================== --- trunk/reactos/dll/win32/shell32/startmenu.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/startmenu.cpp [iso-8859-1] Sun Apr 21 22:10:36 2013 @@ -22,10 +22,10 @@ WINE_DEFAULT_DEBUG_CHANNEL(shell32start); -CStartMenu::CStartMenu() -{ - m_pBandSite = NULL; - m_pUnkSite = NULL; +CStartMenu::CStartMenu() : + m_pBandSite(NULL), + m_pUnkSite(NULL) +{ } CStartMenu::~CStartMenu() @@ -109,7 +109,7 @@ { HRESULT hr; CComObject<CMenuBandSite> *pBandSiteObj; - + TRACE("(%p)\n", this); //pBandSiteObj = new CComObject<CMenuBandSite>(); @@ -136,10 +136,10 @@ return E_NOTIMPL; } -CMenuBandSite::CMenuBandSite() -{ - m_pObjects = NULL; - m_cObjects = 0; +CMenuBandSite::CMenuBandSite() : + m_pObjects(NULL), + m_cObjects(0) +{ } CMenuBandSite::~CMenuBandSite() @@ -184,7 +184,7 @@ ObjectCount = 0; - for(Index = 0; Index < m_cObjects; Index++) + for (Index = 0; Index < m_cObjects; Index++) { if (m_pObjects[Index] != NULL) { Modified: trunk/reactos/dll/win32/shell32/startmenu.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/startmen…
============================================================================== --- trunk/reactos/dll/win32/shell32/startmenu.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/startmenu.h [iso-8859-1] Sun Apr 21 22:10:36 2013 @@ -1,7 +1,7 @@ /* - * Start menu object + * Start menu object * - * Copyright 2009 Andrew Hill + * Copyright 2009 Andrew Hill * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -22,20 +22,20 @@ #define _STARTMENU_H_ class CStartMenu : - public CComCoClass<CStartMenu, &CLSID_StartMenu>, - public CComObjectRootEx<CComMultiThreadModelNoCS>, - public IMenuPopup, - public IObjectWithSite, - public IInitializeObject, - public IMenuBand // FIXME + public CComCoClass<CStartMenu, &CLSID_StartMenu>, + public CComObjectRootEx<CComMultiThreadModelNoCS>, + public IMenuPopup, + public IObjectWithSite, + public IInitializeObject, + public IMenuBand // FIXME { private: IBandSite *m_pBandSite; IUnknown *m_pUnkSite; public: - CStartMenu(); - ~CStartMenu(); + CStartMenu(); + ~CStartMenu(); // *** IOleWindow methods *** virtual HRESULT STDMETHODCALLTYPE ContextSensitiveHelp(BOOL fEnterMode); @@ -51,13 +51,13 @@ virtual HRESULT STDMETHODCALLTYPE Popup(POINTL *ppt, RECTL *prcExclude, MP_POPUPFLAGS dwFlags); virtual HRESULT STDMETHODCALLTYPE SetSubMenu(IMenuPopup *pmp, BOOL fSet); - // *** IObjectWithSite methods *** - virtual HRESULT STDMETHODCALLTYPE SetSite(IUnknown *pUnkSite); - virtual HRESULT STDMETHODCALLTYPE GetSite(REFIID riid, void **ppvSite); + // *** IObjectWithSite methods *** + virtual HRESULT STDMETHODCALLTYPE SetSite(IUnknown *pUnkSite); + virtual HRESULT STDMETHODCALLTYPE GetSite(REFIID riid, void **ppvSite); // *** IInitializeObject methods *** virtual HRESULT STDMETHODCALLTYPE Initialize(); - + // *** IMenuBand methods *** FIXME virtual HRESULT STDMETHODCALLTYPE IsMenuMessage(MSG *pmsg); virtual HRESULT STDMETHODCALLTYPE TranslateMenuMessage(MSG *pmsg, LRESULT *plRet); @@ -71,69 +71,69 @@ COM_INTERFACE_ENTRY_IID(IID_IOleWindow, IOleWindow) COM_INTERFACE_ENTRY_IID(IID_IDeskBar, IDeskBar) COM_INTERFACE_ENTRY_IID(IID_IMenuPopup, IMenuPopup) - COM_INTERFACE_ENTRY_IID(IID_IObjectWithSite, IObjectWithSite) - COM_INTERFACE_ENTRY_IID(IID_IInitializeObject, IInitializeObject) - COM_INTERFACE_ENTRY_IID(IID_IMenuBand, IMenuBand) // FIXME: Win does not export it + COM_INTERFACE_ENTRY_IID(IID_IObjectWithSite, IObjectWithSite) + COM_INTERFACE_ENTRY_IID(IID_IInitializeObject, IInitializeObject) + COM_INTERFACE_ENTRY_IID(IID_IMenuBand, IMenuBand) // FIXME: Win does not export it END_COM_MAP() }; class CMenuBandSite : - public CComCoClass<CMenuBandSite, &CLSID_MenuBandSite>, - public CComObjectRootEx<CComMultiThreadModelNoCS>, - public IBandSite, - public IDeskBarClient, - public IOleCommandTarget, - public IInputObject, - public IInputObjectSite, - public IWinEventHandler, - public IServiceProvider + public CComCoClass<CMenuBandSite, &CLSID_MenuBandSite>, + public CComObjectRootEx<CComMultiThreadModelNoCS>, + public IBandSite, + public IDeskBarClient, + public IOleCommandTarget, + public IInputObject, + public IInputObjectSite, + public IWinEventHandler, + public IServiceProvider { private: IUnknown **m_pObjects; ULONG m_cObjects; public: - CMenuBandSite(); - ~CMenuBandSite(); + CMenuBandSite(); + ~CMenuBandSite(); - // *** IBandSite methods *** - virtual HRESULT STDMETHODCALLTYPE AddBand(IUnknown *punk); - virtual HRESULT STDMETHODCALLTYPE EnumBands(UINT uBand, DWORD *pdwBandID); - virtual HRESULT STDMETHODCALLTYPE QueryBand(DWORD dwBandID, IDeskBand **ppstb, DWORD *pdwState, LPWSTR pszName, int cchName); - virtual HRESULT STDMETHODCALLTYPE SetBandState(DWORD dwBandID, DWORD dwMask, DWORD dwState); - virtual HRESULT STDMETHODCALLTYPE RemoveBand(DWORD dwBandID); - virtual HRESULT STDMETHODCALLTYPE GetBandObject(DWORD dwBandID, REFIID riid, VOID **ppv); - virtual HRESULT STDMETHODCALLTYPE SetBandSiteInfo(const BANDSITEINFO *pbsinfo); - virtual HRESULT STDMETHODCALLTYPE GetBandSiteInfo(BANDSITEINFO *pbsinfo); + // *** IBandSite methods *** + virtual HRESULT STDMETHODCALLTYPE AddBand(IUnknown *punk); + virtual HRESULT STDMETHODCALLTYPE EnumBands(UINT uBand, DWORD *pdwBandID); + virtual HRESULT STDMETHODCALLTYPE QueryBand(DWORD dwBandID, IDeskBand **ppstb, DWORD *pdwState, LPWSTR pszName, int cchName); + virtual HRESULT STDMETHODCALLTYPE SetBandState(DWORD dwBandID, DWORD dwMask, DWORD dwState); + virtual HRESULT STDMETHODCALLTYPE RemoveBand(DWORD dwBandID); + virtual HRESULT STDMETHODCALLTYPE GetBandObject(DWORD dwBandID, REFIID riid, VOID **ppv); + virtual HRESULT STDMETHODCALLTYPE SetBandSiteInfo(const BANDSITEINFO *pbsinfo); + virtual HRESULT STDMETHODCALLTYPE GetBandSiteInfo(BANDSITEINFO *pbsinfo); - // *** IOleWindow methods *** - virtual HRESULT STDMETHODCALLTYPE GetWindow(HWND *phwnd); - virtual HRESULT STDMETHODCALLTYPE ContextSensitiveHelp(BOOL fEnterMode); + // *** IOleWindow methods *** + virtual HRESULT STDMETHODCALLTYPE GetWindow(HWND *phwnd); + virtual HRESULT STDMETHODCALLTYPE ContextSensitiveHelp(BOOL fEnterMode); - // *** IDeskBarClient methods *** - virtual HRESULT STDMETHODCALLTYPE SetDeskBarSite(IUnknown *punkSite); - virtual HRESULT STDMETHODCALLTYPE SetModeDBC(DWORD dwMode); - virtual HRESULT STDMETHODCALLTYPE UIActivateDBC(DWORD dwState); - virtual HRESULT STDMETHODCALLTYPE GetSize(DWORD dwWhich, LPRECT prc); + // *** IDeskBarClient methods *** + virtual HRESULT STDMETHODCALLTYPE SetDeskBarSite(IUnknown *punkSite); + virtual HRESULT STDMETHODCALLTYPE SetModeDBC(DWORD dwMode); + virtual HRESULT STDMETHODCALLTYPE UIActivateDBC(DWORD dwState); + virtual HRESULT STDMETHODCALLTYPE GetSize(DWORD dwWhich, LPRECT prc); // *** IOleCommandTarget methods *** - virtual HRESULT STDMETHODCALLTYPE QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[ ], OLECMDTEXT *pCmdText); - virtual HRESULT STDMETHODCALLTYPE Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut); + virtual HRESULT STDMETHODCALLTYPE QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[ ], OLECMDTEXT *pCmdText); + virtual HRESULT STDMETHODCALLTYPE Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut); - // *** IInputObject methods *** - virtual HRESULT STDMETHODCALLTYPE UIActivateIO(BOOL fActivate, LPMSG lpMsg); - virtual HRESULT STDMETHODCALLTYPE HasFocusIO(); - virtual HRESULT STDMETHODCALLTYPE TranslateAcceleratorIO(LPMSG lpMsg); + // *** IInputObject methods *** + virtual HRESULT STDMETHODCALLTYPE UIActivateIO(BOOL fActivate, LPMSG lpMsg); + virtual HRESULT STDMETHODCALLTYPE HasFocusIO(); + virtual HRESULT STDMETHODCALLTYPE TranslateAcceleratorIO(LPMSG lpMsg); - // *** IInputObjectSite methods *** - virtual HRESULT STDMETHODCALLTYPE OnFocusChangeIS(IUnknown *punkObj, BOOL fSetFocus); + // *** IInputObjectSite methods *** + virtual HRESULT STDMETHODCALLTYPE OnFocusChangeIS(IUnknown *punkObj, BOOL fSetFocus); - // *** IWinEventHandler methods *** - virtual HRESULT STDMETHODCALLTYPE OnWinEvent(HWND paramC, UINT param10, WPARAM param14, LPARAM param18, LRESULT *param1C); - virtual HRESULT STDMETHODCALLTYPE IsWindowOwner(HWND paramC); + // *** IWinEventHandler methods *** + virtual HRESULT STDMETHODCALLTYPE OnWinEvent(HWND paramC, UINT param10, WPARAM param14, LPARAM param18, LRESULT *param1C); + virtual HRESULT STDMETHODCALLTYPE IsWindowOwner(HWND paramC); - // *** IServiceProvider methods *** - virtual HRESULT STDMETHODCALLTYPE QueryService(REFGUID guidService, REFIID riid, void **ppvObject); + // *** IServiceProvider methods *** + virtual HRESULT STDMETHODCALLTYPE QueryService(REFGUID guidService, REFIID riid, void **ppvObject); DECLARE_REGISTRY_RESOURCEID(IDR_MENUBANDSITE) DECLARE_NOT_AGGREGATABLE(CMenuBandSite) @@ -142,13 +142,13 @@ BEGIN_COM_MAP(CMenuBandSite) COM_INTERFACE_ENTRY_IID(IID_IBandSite, IBandSite) - COM_INTERFACE_ENTRY_IID(IID_IOleWindow, IOleWindow) - COM_INTERFACE_ENTRY_IID(IID_IDeskBarClient, IDeskBarClient) - COM_INTERFACE_ENTRY_IID(IID_IOleCommandTarget, IOleCommandTarget) - COM_INTERFACE_ENTRY_IID(IID_IInputObject, IInputObject) - COM_INTERFACE_ENTRY_IID(IID_IInputObjectSite, IInputObjectSite) - COM_INTERFACE_ENTRY_IID(IID_IWinEventHandler, IWinEventHandler) - COM_INTERFACE_ENTRY_IID(IID_IServiceProvider, IServiceProvider) + COM_INTERFACE_ENTRY_IID(IID_IOleWindow, IOleWindow) + COM_INTERFACE_ENTRY_IID(IID_IDeskBarClient, IDeskBarClient) + COM_INTERFACE_ENTRY_IID(IID_IOleCommandTarget, IOleCommandTarget) + COM_INTERFACE_ENTRY_IID(IID_IInputObject, IInputObject) + COM_INTERFACE_ENTRY_IID(IID_IInputObjectSite, IInputObjectSite) + COM_INTERFACE_ENTRY_IID(IID_IWinEventHandler, IWinEventHandler) + COM_INTERFACE_ENTRY_IID(IID_IServiceProvider, IServiceProvider) END_COM_MAP() };
11 years, 8 months
1
0
0
0
[ekohl] 58820: [MSV1_0] Allocate a profile buffer and use it to return the user profile information to the caller.
by ekohl@svn.reactos.org
Author: ekohl Date: Sun Apr 21 21:08:58 2013 New Revision: 58820 URL:
http://svn.reactos.org/svn/reactos?rev=58820&view=rev
Log: [MSV1_0] Allocate a profile buffer and use it to return the user profile information to the caller. Modified: trunk/reactos/dll/win32/msv1_0/msv1_0.c trunk/reactos/dll/win32/msv1_0/msv1_0.h Modified: trunk/reactos/dll/win32/msv1_0/msv1_0.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msv1_0/msv1_0.c?…
============================================================================== --- trunk/reactos/dll/win32/msv1_0/msv1_0.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msv1_0/msv1_0.c [iso-8859-1] Sun Apr 21 21:08:58 2013 @@ -64,6 +64,145 @@ if (PolicyHandle != NULL) LsarClose(&PolicyHandle); + + return Status; +} + + +static +NTSTATUS +BuildInteractiveProfileBuffer(IN PLSA_CLIENT_REQUEST ClientRequest, + IN PSAMPR_USER_INFO_BUFFER UserInfo, + IN PUNICODE_STRING LogonServer, + OUT PMSV1_0_INTERACTIVE_PROFILE *ProfileBuffer, + OUT PULONG ProfileBufferLength) +{ + PMSV1_0_INTERACTIVE_PROFILE LocalBuffer = NULL; + PVOID ClientBaseAddress = NULL; + LPWSTR Ptr; + ULONG BufferLength; + NTSTATUS Status; + + *ProfileBuffer = NULL; + *ProfileBufferLength = 0; + + BufferLength = sizeof(MSV1_0_INTERACTIVE_PROFILE) + + UserInfo->All.FullName.Length + sizeof(WCHAR) + + UserInfo->All.HomeDirectory.Length + sizeof(WCHAR) + + UserInfo->All.HomeDirectoryDrive.Length + sizeof(WCHAR) + + UserInfo->All.ScriptPath.Length + sizeof(WCHAR) + + UserInfo->All.ProfilePath.Length + sizeof(WCHAR) + + LogonServer->Length + sizeof(WCHAR); + + LocalBuffer = DispatchTable.AllocateLsaHeap(BufferLength); + if (LocalBuffer == NULL) + { + TRACE("Failed to allocate the local buffer!\n"); + Status = STATUS_INSUFFICIENT_RESOURCES; + goto done; + } + + Status = DispatchTable.AllocateClientBuffer(ClientRequest, + BufferLength, + &ClientBaseAddress); + if (!NT_SUCCESS(Status)) + { + TRACE("DispatchTable.AllocateClientBuffer failed (Status 0x%08lx)\n", Status); + goto done; + } + + TRACE("ClientBaseAddress: %p\n", ClientBaseAddress); + + Ptr = (LPWSTR)((ULONG_PTR)LocalBuffer + sizeof(MSV1_0_INTERACTIVE_PROFILE)); + + LocalBuffer->MessageType = MsV1_0InteractiveProfile; + LocalBuffer->LogonCount = UserInfo->All.LogonCount; + LocalBuffer->BadPasswordCount = UserInfo->All.BadPasswordCount; +// LARGE_INTEGER LogonTime; +// LARGE_INTEGER LogoffTime; +// LARGE_INTEGER KickOffTime; +// LARGE_INTEGER PasswordLastSet; +// LARGE_INTEGER PasswordCanChange; +// LARGE_INTEGER PasswordMustChange; + + LocalBuffer->LogonScript.Length = UserInfo->All.ScriptPath.Length; + LocalBuffer->LogonScript.MaximumLength = UserInfo->All.ScriptPath.Length + sizeof(WCHAR); + LocalBuffer->LogonScript.Buffer = (LPWSTR)((ULONG_PTR)ClientBaseAddress + (ULONG_PTR)Ptr - (ULONG_PTR)LocalBuffer); + memcpy(Ptr, + UserInfo->All.ScriptPath.Buffer, + UserInfo->All.ScriptPath.Length); + + Ptr = (LPWSTR)((ULONG_PTR)Ptr + LocalBuffer->LogonScript.MaximumLength); + + LocalBuffer->HomeDirectory.Length = UserInfo->All.HomeDirectory.Length; + LocalBuffer->HomeDirectory.MaximumLength = UserInfo->All.HomeDirectory.Length + sizeof(WCHAR); + LocalBuffer->HomeDirectory.Buffer = (LPWSTR)((ULONG_PTR)ClientBaseAddress + (ULONG_PTR)Ptr - (ULONG_PTR)LocalBuffer); + memcpy(Ptr, + UserInfo->All.HomeDirectory.Buffer, + UserInfo->All.HomeDirectory.Length); + + Ptr = (LPWSTR)((ULONG_PTR)Ptr + LocalBuffer->HomeDirectory.MaximumLength); + + LocalBuffer->FullName.Length = UserInfo->All.FullName.Length; + LocalBuffer->FullName.MaximumLength = UserInfo->All.FullName.Length + sizeof(WCHAR); + LocalBuffer->FullName.Buffer = (LPWSTR)((ULONG_PTR)ClientBaseAddress + (ULONG_PTR)Ptr - (ULONG_PTR)LocalBuffer); + memcpy(Ptr, + UserInfo->All.FullName.Buffer, + UserInfo->All.FullName.Length); + TRACE("FullName.Buffer: %p\n", LocalBuffer->FullName.Buffer); + + Ptr = (LPWSTR)((ULONG_PTR)Ptr + LocalBuffer->FullName.MaximumLength); + + LocalBuffer->ProfilePath.Length = UserInfo->All.ProfilePath.Length; + LocalBuffer->ProfilePath.MaximumLength = UserInfo->All.ProfilePath.Length + sizeof(WCHAR); + LocalBuffer->ProfilePath.Buffer = (LPWSTR)((ULONG_PTR)ClientBaseAddress + (ULONG_PTR)Ptr - (ULONG_PTR)LocalBuffer); + memcpy(Ptr, + UserInfo->All.ProfilePath.Buffer, + UserInfo->All.ProfilePath.Length); + + Ptr = (LPWSTR)((ULONG_PTR)Ptr + LocalBuffer->ProfilePath.MaximumLength); + + LocalBuffer->HomeDirectoryDrive.Length = UserInfo->All.HomeDirectoryDrive.Length; + LocalBuffer->HomeDirectoryDrive.MaximumLength = UserInfo->All.HomeDirectoryDrive.Length + sizeof(WCHAR); + LocalBuffer->HomeDirectoryDrive.Buffer = (LPWSTR)((ULONG_PTR)ClientBaseAddress + (ULONG_PTR)Ptr - (ULONG_PTR)LocalBuffer); + memcpy(Ptr, + UserInfo->All.HomeDirectoryDrive.Buffer, + UserInfo->All.HomeDirectoryDrive.Length); + + Ptr = (LPWSTR)((ULONG_PTR)Ptr + LocalBuffer->HomeDirectoryDrive.MaximumLength); + + LocalBuffer->LogonServer.Length = LogonServer->Length; + LocalBuffer->LogonServer.MaximumLength = LogonServer->Length + sizeof(WCHAR); + LocalBuffer->LogonServer.Buffer = (LPWSTR)((ULONG_PTR)ClientBaseAddress + (ULONG_PTR)Ptr - (ULONG_PTR)LocalBuffer);; + memcpy(Ptr, + LogonServer->Buffer, + LogonServer->Length); + + LocalBuffer->UserFlags = 0; + + Status = DispatchTable.CopyToClientBuffer(ClientRequest, + BufferLength, + ClientBaseAddress, + LocalBuffer); + if (!NT_SUCCESS(Status)) + { + TRACE("DispatchTable.CopyToClientBuffer failed (Status 0x%08lx)\n", Status); + goto done; + } + + *ProfileBuffer = (PMSV1_0_INTERACTIVE_PROFILE)ClientBaseAddress; + *ProfileBufferLength = BufferLength; + +done: + if (LocalBuffer != NULL) + DispatchTable.FreeLsaHeap(LocalBuffer); + + if (!NT_SUCCESS(Status)) + { + if (ClientBaseAddress != NULL) + DispatchTable.FreeClientBuffer(ClientRequest, + ClientBaseAddress); + } return Status; } @@ -212,6 +351,7 @@ SAMPR_ULONG_ARRAY RelativeIds = {0, NULL}; SAMPR_ULONG_ARRAY Use = {0, NULL}; PSAMPR_USER_INFO_BUFFER UserInfo = NULL; + UNICODE_STRING LogonServer; NTSTATUS Status; TRACE("()\n"); @@ -243,6 +383,8 @@ TRACE("Domain: %S\n", LogonInfo->LogonDomainName.Buffer); TRACE("User: %S\n", LogonInfo->UserName.Buffer); TRACE("Password: %S\n", LogonInfo->Password.Buffer); + + RtlInitUnicodeString(&LogonServer, L"Testserver"); } else { @@ -328,9 +470,51 @@ TRACE("UserName: %S\n", UserInfo->All.UserName.Buffer); - + /* FIXME: Check restrictions */ + + /* FIXME: Check the password */ + if ((UserInfo->All.UserAccountControl & USER_PASSWORD_NOT_REQUIRED) == 0) + { + FIXME("Must check the password!\n"); + + } + + /* Return logon information */ + + /* Create and return a new logon id */ + Status = NtAllocateLocallyUniqueId(LogonId); + if (!NT_SUCCESS(Status)) + { + TRACE("NtAllocateLocallyUniqueId failed (Status %08lx)\n", Status); + goto done; + } + + /* Build and fill the interactve profile buffer */ + Status = BuildInteractiveProfileBuffer(ClientRequest, + UserInfo, + &LogonServer, + (PMSV1_0_INTERACTIVE_PROFILE*)ProfileBuffer, + ProfileBufferLength); + if (!NT_SUCCESS(Status)) + { + TRACE("BuildInteractiveProfileBuffer failed (Status %08lx)\n", Status); + goto done; + } + + /* Return the token information type */ + *TokenInformationType = LsaTokenInformationV1; done: + if (!NT_SUCCESS(Status)) + { + if (*ProfileBuffer != NULL) + { + DispatchTable.FreeClientBuffer(ClientRequest, + *ProfileBuffer); + *ProfileBuffer = NULL; + } + } + if (UserHandle != NULL) SamrCloseHandle(&UserHandle); Modified: trunk/reactos/dll/win32/msv1_0/msv1_0.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msv1_0/msv1_0.h?…
============================================================================== --- trunk/reactos/dll/win32/msv1_0/msv1_0.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msv1_0/msv1_0.h [iso-8859-1] Sun Apr 21 21:08:58 2013 @@ -23,6 +23,7 @@ #include <ndk/psfuncs.h> #include <ndk/rtlfuncs.h> #include <ndk/setypes.h> +#include <ndk/sefuncs.h> #include <sspi.h> #include <ntsecapi.h>
11 years, 8 months
1
0
0
0
[tfaber] 58819: [KMTESTS] - Add a few more tests for FindFirstFile - Silence kmtest debugging
by tfaber@svn.reactos.org
Author: tfaber Date: Sun Apr 21 20:47:52 2013 New Revision: 58819 URL:
http://svn.reactos.org/svn/reactos?rev=58819&view=rev
Log: [KMTESTS] - Add a few more tests for FindFirstFile - Silence kmtest debugging Modified: trunk/rostests/kmtests/kernel32/FindFile_user.c trunk/rostests/kmtests/kmtest_drv/kmtest_drv.c trunk/rostests/kmtests/kmtest_drv/kmtest_standalone.c Modified: trunk/rostests/kmtests/kernel32/FindFile_user.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/kmtests/kernel32/FindFile…
============================================================================== --- trunk/rostests/kmtests/kernel32/FindFile_user.c [iso-8859-1] (original) +++ trunk/rostests/kmtests/kernel32/FindFile_user.c [iso-8859-1] Sun Apr 21 20:47:52 2013 @@ -61,6 +61,30 @@ { L"?a?", L">a>" }, { L"a?a?a", L"a>a>a" }, + { L"?.?", L">\">" }, + { L"a?.?", L"a>\">" }, + { L"?.?a", L">\">a" }, + { L"a?.?a", L"a>\">a" }, + { L"?.??.?", L">\">>\">" }, + { L"?.?a?.?", L">\">a>\">" }, + { L"a?.?a?.?a", L"a>\">a>\">a" }, + + { L".?", L"\">" }, + { L"a.?", L"a\">" }, + { L".?a", L"\">a" }, + { L"a.?a", L"a\">a" }, + { L".?.?", L"\">\">" }, + { L".?a.?", L"\">a\">" }, + { L"a.?a.?a", L"a\">a\">a" }, + + { L"?.", L">" }, + { L"a?.", L"a>" }, + { L"?.a", L">.a" }, + { L"a?.a", L"a>.a" }, + { L"?.?.", L">\">" }, + { L"?.a?.", L">.a>" }, + { L"a?.a?.a", L"a>.a>.a" }, + { L"f*.", L"f<" }, { L"f.*", L"f\"*" }, { L"f*.*", L"f<\"*" }, Modified: trunk/rostests/kmtests/kmtest_drv/kmtest_drv.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/kmtests/kmtest_drv/kmtest…
============================================================================== --- trunk/rostests/kmtests/kmtest_drv/kmtest_drv.c [iso-8859-1] (original) +++ trunk/rostests/kmtests/kmtest_drv/kmtest_drv.c [iso-8859-1] Sun Apr 21 20:47:52 2013 @@ -12,7 +12,7 @@ #include <limits.h> #include <pseh/pseh2.h> -//#define NDEBUG +#define NDEBUG #include <debug.h> #include <kmt_public.h> Modified: trunk/rostests/kmtests/kmtest_drv/kmtest_standalone.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/kmtests/kmtest_drv/kmtest…
============================================================================== --- trunk/rostests/kmtests/kmtest_drv/kmtest_standalone.c [iso-8859-1] (original) +++ trunk/rostests/kmtests/kmtest_drv/kmtest_standalone.c [iso-8859-1] Sun Apr 21 20:47:52 2013 @@ -12,7 +12,7 @@ #define KMT_DEFINE_TEST_FUNCTIONS #include <kmt_test.h> -//#define NDEBUG +#define NDEBUG #include <debug.h> #include <kmt_public.h>
11 years, 8 months
1
0
0
0
[pschweitzer] 58818: [NTOSKRNL] Nearly properly reimplement DOT_STAR in FsRtlIs*InExpression. Should fix tests broken by hackfix
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Sun Apr 21 20:34:17 2013 New Revision: 58818 URL:
http://svn.reactos.org/svn/reactos?rev=58818&view=rev
Log: [NTOSKRNL] Nearly properly reimplement DOT_STAR in FsRtlIs*InExpression. Should fix tests broken by hackfix Modified: trunk/reactos/ntoskrnl/fsrtl/dbcsname.c trunk/reactos/ntoskrnl/fsrtl/name.c Modified: trunk/reactos/ntoskrnl/fsrtl/dbcsname.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/fsrtl/dbcsname.c?…
============================================================================== --- trunk/reactos/ntoskrnl/fsrtl/dbcsname.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/fsrtl/dbcsname.c [iso-8859-1] Sun Apr 21 20:34:17 2013 @@ -218,14 +218,47 @@ /* Check DOS_STAR */ else if (Expression->Buffer[ExpressionPosition] == ANSI_DOS_STAR) { - MatchingChars = NamePosition; - while (MatchingChars < Name->Length) - { - if (Name->Buffer[MatchingChars] == '.') + /* We can only consume dot if that's not the last one + * Otherwise, we null match + */ + if (Name->Buffer[NamePosition] == '.') + { + MatchingChars = NamePosition + 1; + while (MatchingChars < Name->Length) { - NamePosition = MatchingChars; + if (Name->Buffer[MatchingChars] == '.') + { + NamePosition++; + break; + } + MatchingChars++; } - MatchingChars++; + } + else + { + /* XXX: Eat everything till the end */ + if (ExpressionPosition + 1 == Expression->Length) + { + NamePosition = Name->Length; + } + + /* Try to eat till the next matching char or . */ + MatchingChars = NamePosition; + while (MatchingChars < Name->Length) + { + if (ExpressionPosition + 1 < Expression->Length && + Name->Buffer[MatchingChars] == Expression->Buffer[ExpressionPosition + 1]) + { + NamePosition = MatchingChars; + break; + } + else if (Name->Buffer[MatchingChars] == '.') + { + NamePosition = MatchingChars + 1; + break; + } + MatchingChars++; + } } ExpressionPosition++; } Modified: trunk/reactos/ntoskrnl/fsrtl/name.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/fsrtl/name.c?rev=…
============================================================================== --- trunk/reactos/ntoskrnl/fsrtl/name.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/fsrtl/name.c [iso-8859-1] Sun Apr 21 20:34:17 2013 @@ -153,14 +153,47 @@ /* Check DOS_STAR */ else if (Expression->Buffer[ExpressionPosition] == DOS_STAR) { - MatchingChars = NamePosition; - while (MatchingChars < Name->Length / sizeof(WCHAR)) - { - if (Name->Buffer[MatchingChars] == L'.') + /* We can only consume dot if that's not the last one + * Otherwise, we null match + */ + if (Name->Buffer[NamePosition] == L'.') + { + MatchingChars = NamePosition + 1; + while (MatchingChars < Name->Length / sizeof(WCHAR)) { - NamePosition = MatchingChars; + if (Name->Buffer[MatchingChars] == L'.') + { + NamePosition++; + break; + } + MatchingChars++; } - MatchingChars++; + } + else + { + /* XXX: Eat everything till the end */ + if (ExpressionPosition + 1 == Expression->Length / sizeof(WCHAR)) + { + NamePosition = Name->Length; + } + + /* Try to eat till the next matching char or . */ + MatchingChars = NamePosition; + while (MatchingChars < Name->Length / sizeof(WCHAR)) + { + if (ExpressionPosition + 1 < Expression->Length / sizeof(WCHAR) && + Name->Buffer[MatchingChars] == Expression->Buffer[ExpressionPosition + 1]) + { + NamePosition = MatchingChars; + break; + } + else if (Name->Buffer[MatchingChars] == L'.') + { + NamePosition = MatchingChars + 1; + break; + } + MatchingChars++; + } } ExpressionPosition++; }
11 years, 8 months
1
0
0
0
[pschweitzer] 58817: [NTOSKRNL] Temp hackfix DOS_STAR to get rosautotest working again
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Sun Apr 21 20:14:36 2013 New Revision: 58817 URL:
http://svn.reactos.org/svn/reactos?rev=58817&view=rev
Log: [NTOSKRNL] Temp hackfix DOS_STAR to get rosautotest working again Modified: trunk/reactos/ntoskrnl/fsrtl/dbcsname.c trunk/reactos/ntoskrnl/fsrtl/name.c Modified: trunk/reactos/ntoskrnl/fsrtl/dbcsname.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/fsrtl/dbcsname.c?…
============================================================================== --- trunk/reactos/ntoskrnl/fsrtl/dbcsname.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/fsrtl/dbcsname.c [iso-8859-1] Sun Apr 21 20:14:36 2013 @@ -223,7 +223,7 @@ { if (Name->Buffer[MatchingChars] == '.') { - NamePosition = MatchingChars + 1; + NamePosition = MatchingChars; } MatchingChars++; } Modified: trunk/reactos/ntoskrnl/fsrtl/name.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/fsrtl/name.c?rev=…
============================================================================== --- trunk/reactos/ntoskrnl/fsrtl/name.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/fsrtl/name.c [iso-8859-1] Sun Apr 21 20:14:36 2013 @@ -158,7 +158,7 @@ { if (Name->Buffer[MatchingChars] == L'.') { - NamePosition = MatchingChars + 1; + NamePosition = MatchingChars; } MatchingChars++; }
11 years, 8 months
1
0
0
0
← Newer
1
...
5
6
7
8
9
10
11
...
27
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
Results per page:
10
25
50
100
200