ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
September 2012
----- 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
17 participants
236 discussions
Start a n
N
ew thread
[dgorbachev] 57254: Silence GCC warning.
by dgorbachev@svn.reactos.org
Author: dgorbachev Date: Sat Sep 8 08:07:44 2012 New Revision: 57254 URL:
http://svn.reactos.org/svn/reactos?rev=57254&view=rev
Log: Silence GCC warning. Modified: trunk/reactos/ntoskrnl/mm/ARM3/section.c Modified: trunk/reactos/ntoskrnl/mm/ARM3/section.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/section.c…
============================================================================== --- trunk/reactos/ntoskrnl/mm/ARM3/section.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/ARM3/section.c [iso-8859-1] Sat Sep 8 08:07:44 2012 @@ -1,7 +1,7 @@ /* * PROJECT: ReactOS Kernel * LICENSE: BSD - See COPYING.ARM in the top level directory - * FILE: ntoskrnl/mm/ARM3/sectopm.c + * FILE: ntoskrnl/mm/ARM3/section.c * PURPOSE: ARM Memory Manager Section Support * PROGRAMMERS: ReactOS Portable Systems Group */ @@ -1353,6 +1353,7 @@ { /* Not yet implemented */ ASSERT(FALSE); + *Segment = NULL; return STATUS_NOT_IMPLEMENTED; }
12 years, 3 months
1
0
0
0
[jimtabor] 57253: - fix CMake x86 MSVCWin build.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Sat Sep 8 06:47:10 2012 New Revision: 57253 URL:
http://svn.reactos.org/svn/reactos?rev=57253&view=rev
Log: - fix CMake x86 MSVCWin build. Modified: trunk/reactos/win32ss/user/user32/include/ntwrapper.h Modified: trunk/reactos/win32ss/user/user32/include/ntwrapper.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/user32/includ…
============================================================================== --- trunk/reactos/win32ss/user/user32/include/ntwrapper.h [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/user32/include/ntwrapper.h [iso-8859-1] Sat Sep 8 06:47:10 2012 @@ -468,12 +468,12 @@ return NtUserDestroyMenu(hMenu); } -EXTINLINE BOOL WINAPI +/*EXTINLINE BOOL WINAPI GetMenuBarInfo(HWND hwnd, LONG idObject, LONG idItem, PMENUBARINFO pmbi) { return NtUserGetMenuBarInfo(hwnd, idObject, idItem, pmbi); } - +*/ EXTINLINE BOOL WINAPI GetMenuItemRect(HWND hWnd, HMENU hMenu, UINT uItem, LPRECT lprcItem) {
12 years, 3 months
1
0
0
0
[jimtabor] 57252: [User32Test] - Turn off GetMenuBarInfo input test temporarily for now.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Sat Sep 8 06:12:41 2012 New Revision: 57252 URL:
http://svn.reactos.org/svn/reactos?rev=57252&view=rev
Log: [User32Test] - Turn off GetMenuBarInfo input test temporarily for now. Modified: trunk/rostests/winetests/user32/menu.c Modified: trunk/rostests/winetests/user32/menu.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/user32/menu.c?r…
============================================================================== --- trunk/rostests/winetests/user32/menu.c [iso-8859-1] (original) +++ trunk/rostests/winetests/user32/menu.c [iso-8859-1] Sat Sep 8 06:12:41 2012 @@ -2180,7 +2180,7 @@ default: return( DefWindowProcA( hWnd, msg, wParam, lParam ) ); } - +#if 0 if(pGetMenuBarInfo) { MENUBARINFO mbi; @@ -2226,7 +2226,7 @@ ok(!(bMenuVisible && (state & MF_HILITE)) == !mbi.fFocused, "msg %x: GetMenuBarInfo.fFocused (%d) is wrong\n", msg, mbi.fFocused != 0); } - +#endif if (msg == WM_EXITMENULOOP) bMenuVisible = FALSE; else if (msg == WM_INITMENUPOPUP)
12 years, 3 months
1
0
0
0
[jimtabor] 57251: [Win32SS] - HAX: Fix menu test crash! - Contract be damned. This number 2 on my list to move server side!
by jimtabor@svn.reactos.org
Author: jimtabor Date: Sat Sep 8 06:09:19 2012 New Revision: 57251 URL:
http://svn.reactos.org/svn/reactos?rev=57251&view=rev
Log: [Win32SS] - HAX: Fix menu test crash! - Contract be damned. This number 2 on my list to move server side! Modified: trunk/reactos/win32ss/user/ntuser/menu.c trunk/reactos/win32ss/user/user32/user32.spec trunk/reactos/win32ss/user/user32/windows/menu.c Modified: trunk/reactos/win32ss/user/ntuser/menu.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/menu.c…
============================================================================== --- trunk/reactos/win32ss/user/ntuser/menu.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/menu.c [iso-8859-1] Sat Sep 8 06:09:19 2012 @@ -1814,14 +1814,29 @@ } if (MenuObject->MenuInfo.FocusedItem != NO_SELECTED_ITEM) kmbi.fBarFocused = TRUE; + + if (MenuObject->MenuItemList) + { SubMenuObject = UserGetMenuObject(MenuObject->MenuItemList->hSubMenu); if(SubMenuObject) kmbi.hwndMenu = SubMenuObject->MenuInfo.Wnd; + } TRACE("OBJID_MENU, idItem = %d\n",idItem); break; } case OBJID_CLIENT: { PMENU_OBJECT SubMenuObject, XSubMenuObject; + HMENU hMenuChk; + // Windows does this! Wine checks for Atom and uses GetWindowLongPtrW. + hMenuChk = (HMENU)co_IntSendMessage(hwnd, MN_GETHMENU, 0, 0); + + if (!(MenuObject = UserGetMenuObject(hMenuChk))) + { + ERR("Window does not have a Popup Menu!\n"); + EngSetLastError(ERROR_INVALID_MENU_HANDLE); + RETURN(FALSE); + } + SubMenuObject = UserGetMenuObject(MenuObject->MenuItemList->hSubMenu); if(SubMenuObject) kmbi.hMenu = SubMenuObject->MenuInfo.Self; else Modified: trunk/reactos/win32ss/user/user32/user32.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/user32/user32…
============================================================================== --- trunk/reactos/win32ss/user/user32/user32.spec [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/user32/user32.spec [iso-8859-1] Sat Sep 8 06:09:19 2012 @@ -302,7 +302,7 @@ @ stdcall GetLayeredWindowAttributes(long ptr ptr ptr) NtUserGetLayeredWindowAttributes @ stdcall GetListBoxInfo(long) NtUserGetListBoxInfo @ stdcall GetMenu(long) -@ stdcall GetMenuBarInfo(long long long ptr) NtUserGetMenuBarInfo +@ stdcall GetMenuBarInfo(long long long ptr) ; tempo haxzo NtUserGetMenuBarInfo @ stdcall GetMenuCheckMarkDimensions() @ stdcall GetMenuContextHelpId(long) @ stdcall GetMenuDefaultItem(long long long) Modified: trunk/reactos/win32ss/user/user32/windows/menu.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/user32/window…
============================================================================== --- trunk/reactos/win32ss/user/user32/windows/menu.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/user32/windows/menu.c [iso-8859-1] Sat Sep 8 06:09:19 2012 @@ -4219,6 +4219,26 @@ /* * @implemented */ +BOOL WINAPI GetMenuBarInfo( HWND hwnd, LONG idObject, LONG idItem, PMENUBARINFO pmbi ) +{ + BOOL Ret; + Ret = NtUserGetMenuBarInfo( hwnd, idObject, idItem, pmbi); + // Reason to move to server side!!!!! + if (!Ret) return Ret; + // EL HAXZO!!! + pmbi->fBarFocused = top_popup_hmenu == pmbi->hMenu; + if (!idItem) + { + pmbi->fFocused = pmbi->fBarFocused; + } + + return TRUE; +} + + +/* + * @implemented + */ LONG WINAPI GetMenuCheckMarkDimensions(VOID) {
12 years, 3 months
1
0
0
0
[spetreolle] 57250: [NDIS] Remove spurious form feeds from NDIS code. Patch by Lee Schroeder. See issue #7310 for more details.
by spetreolle@svn.reactos.org
Author: spetreolle Date: Fri Sep 7 12:01:14 2012 New Revision: 57250 URL:
http://svn.reactos.org/svn/reactos?rev=57250&view=rev
Log: [NDIS] Remove spurious form feeds from NDIS code. Patch by Lee Schroeder. See issue #7310 for more details. Modified: trunk/reactos/drivers/network/ndis/ndis/40stubs.c trunk/reactos/drivers/network/ndis/ndis/control.c trunk/reactos/drivers/network/ndis/ndis/hardware.c trunk/reactos/drivers/network/ndis/ndis/io.c trunk/reactos/drivers/network/ndis/ndis/main.c trunk/reactos/drivers/network/ndis/ndis/memory.c trunk/reactos/drivers/network/ndis/ndis/miniport.c trunk/reactos/drivers/network/ndis/ndis/protocol.c trunk/reactos/drivers/network/ndis/ndis/string.c trunk/reactos/drivers/network/ndis/ndis/time.c Modified: trunk/reactos/drivers/network/ndis/ndis/40stubs.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/ndis/ndis/…
============================================================================== --- trunk/reactos/drivers/network/ndis/ndis/40stubs.c [iso-8859-1] (original) +++ trunk/reactos/drivers/network/ndis/ndis/40stubs.c [iso-8859-1] Fri Sep 7 12:01:14 2012 @@ -262,7 +262,6 @@ /* No-op. */ } - /* * @unimplemented */ @@ -277,7 +276,6 @@ UNIMPLEMENTED } - /* * @unimplemented */ Modified: trunk/reactos/drivers/network/ndis/ndis/control.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/ndis/ndis/…
============================================================================== --- trunk/reactos/drivers/network/ndis/ndis/control.c [iso-8859-1] (original) +++ trunk/reactos/drivers/network/ndis/ndis/control.c [iso-8859-1] Fri Sep 7 12:01:14 2012 @@ -12,7 +12,6 @@ #include "ndissys.h" - /* * @implemented */ @@ -33,7 +32,6 @@ KeInitializeSpinLock(&Lock->SpinLock); } - /* * @implemented */ @@ -94,7 +92,6 @@ } } - /* * @implemented */ @@ -129,7 +126,6 @@ } } - /* * @implemented */ @@ -147,7 +143,6 @@ KeAcquireSpinLock(&SpinLock->SpinLock, &SpinLock->OldIrql); } - /* * @implemented */ @@ -165,7 +160,6 @@ KeInitializeSpinLock(&SpinLock->SpinLock); } - /* * @implemented */ @@ -184,7 +178,6 @@ SpinLock->OldIrql = DISPATCH_LEVEL; } - /* * @implemented */ @@ -202,7 +195,6 @@ KeReleaseSpinLockFromDpcLevel(&SpinLock->SpinLock); } - /* * @implemented */ Modified: trunk/reactos/drivers/network/ndis/ndis/hardware.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/ndis/ndis/…
============================================================================== --- trunk/reactos/drivers/network/ndis/ndis/hardware.c [iso-8859-1] (original) +++ trunk/reactos/drivers/network/ndis/ndis/hardware.c [iso-8859-1] Fri Sep 7 12:01:14 2012 @@ -14,7 +14,6 @@ #include "ndissys.h" - /* * @implemented */ @@ -33,7 +32,6 @@ WrapperContext->SlotNumber, Buffer, Offset, Length); } - /* * @implemented */ @@ -52,7 +50,6 @@ WrapperContext->SlotNumber, Buffer, Offset, Length); } - /* * @implemented */ @@ -96,7 +93,8 @@ return NdisMPciAssignResources(Adapter, SlotNumber, AssignedResources); -} +} + /* * @implemented */ @@ -193,7 +191,6 @@ Buffer, Offset, Length); } - /* * @implemented */ Modified: trunk/reactos/drivers/network/ndis/ndis/io.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/ndis/ndis/…
============================================================================== --- trunk/reactos/drivers/network/ndis/ndis/io.c [iso-8859-1] (original) +++ trunk/reactos/drivers/network/ndis/ndis/io.c [iso-8859-1] Fri Sep 7 12:01:14 2012 @@ -13,7 +13,6 @@ #include "ndissys.h" - VOID NTAPI HandleDeferredProcessing( IN PKDPC Dpc, IN PVOID DeferredContext, @@ -47,7 +46,6 @@ NDIS_DbgPrint(MAX_TRACE, ("Leaving.\n")); } - BOOLEAN NTAPI ServiceRoutine( IN PKINTERRUPT Interrupt, IN PVOID ServiceContext) @@ -94,7 +92,6 @@ return InterruptRecognized; } - /* * @implemented */ @@ -109,7 +106,6 @@ *Data = READ_PORT_UCHAR(UlongToPtr(Port)); // FIXME: What to do with WrapperConfigurationContext? } - /* * @implemented */ @@ -124,7 +120,6 @@ *Data = READ_PORT_ULONG(UlongToPtr(Port)); // FIXME: What to do with WrapperConfigurationContext? } - /* * @implemented */ @@ -139,7 +134,6 @@ *Data = READ_PORT_USHORT(UlongToPtr(Port)); // FIXME: What to do with WrapperConfigurationContext? } - /* * @implemented */ @@ -154,7 +148,6 @@ WRITE_PORT_UCHAR(UlongToPtr(Port), Data); // FIXME: What to do with WrapperConfigurationContext? } - /* * @implemented */ @@ -169,7 +162,6 @@ WRITE_PORT_ULONG(UlongToPtr(Port), Data); // FIXME: What to do with WrapperConfigurationContext? } - /* * @implemented */ @@ -212,7 +204,8 @@ /* We have to hold the object open to keep our lock on the system DMA controller */ return KeepObject; -} +} + IO_ALLOCATION_ACTION NTAPI NdisBusMasterMapRegisterCallback ( IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, @@ -242,7 +235,8 @@ /* We're a bus master so we can go ahead and deallocate the object now */ return DeallocateObjectKeepRegisters; -} +} + /* * @implemented */ @@ -635,7 +629,6 @@ *ArraySize = LoopCount; } - /* * @implemented */ @@ -673,7 +666,6 @@ Adapter->NdisMiniportBlock.MapRegisters[PhysicalMapRegister].WriteToDevice); } - /* * @implemented */ @@ -693,7 +685,6 @@ ExFreePool(DmaBlock); } - /* * @implemented */ @@ -715,7 +706,6 @@ Interrupt->Miniport->Interrupt = NULL; } - /* * @implemented */ @@ -769,7 +759,6 @@ ExFreePool(Adapter->NdisMiniportBlock.MapRegisters); } - /* * @implemented */ @@ -822,7 +811,6 @@ return NDIS_STATUS_SUCCESS; } - /* * @implemented */ @@ -840,7 +828,6 @@ return AdapterObject->DmaOperations->ReadDmaCounter(AdapterObject); } - /* * @implemented */ @@ -858,7 +845,6 @@ return AdapterObject->DmaOperations->GetDmaAlignment(AdapterObject); } - /* * @implemented */ @@ -938,7 +924,8 @@ FALSE, DmaDescription, MaximumLength); -} +} + /* * @implemented */ @@ -1016,7 +1003,6 @@ return NDIS_STATUS_FAILURE; } - /* * @implemented */ Modified: trunk/reactos/drivers/network/ndis/ndis/main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/ndis/ndis/…
============================================================================== --- trunk/reactos/drivers/network/ndis/ndis/main.c [iso-8859-1] (original) +++ trunk/reactos/drivers/network/ndis/ndis/main.c [iso-8859-1] Fri Sep 7 12:01:14 2012 @@ -23,7 +23,7 @@ LONG CancelId; - + VOID NTAPI MainUnload( PDRIVER_OBJECT DriverObject) /* @@ -35,7 +35,7 @@ NDIS_DbgPrint(MAX_TRACE, ("Leaving.\n")); } - + NTSTATUS NTAPI DriverEntry( @@ -68,7 +68,7 @@ return STATUS_SUCCESS; } - + /* * @implemented */ @@ -96,7 +96,7 @@ /* ASSERT(0); */ } - + /* * @implemented */ Modified: trunk/reactos/drivers/network/ndis/ndis/memory.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/ndis/ndis/…
============================================================================== --- trunk/reactos/drivers/network/ndis/ndis/memory.c [iso-8859-1] (original) +++ trunk/reactos/drivers/network/ndis/ndis/memory.c [iso-8859-1] Fri Sep 7 12:01:14 2012 @@ -13,7 +13,6 @@ #include "ndissys.h" - /* * @implemented */ @@ -50,7 +49,6 @@ } - /* * @implemented */ @@ -104,7 +102,6 @@ return NDIS_STATUS_SUCCESS; } - /* * @implemented */ @@ -143,7 +140,6 @@ } } - /* * @implemented */ @@ -184,7 +180,6 @@ Adapter->NdisMiniportBlock.SystemAdapterObject, Length, PhysicalAddress, Cached); } - VOID NTAPI NdisMFreeSharedMemoryPassive( @@ -212,7 +207,6 @@ ExFreePool(Memory); } - /* * @implemented */ Modified: trunk/reactos/drivers/network/ndis/ndis/miniport.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/ndis/ndis/…
============================================================================== --- trunk/reactos/drivers/network/ndis/ndis/miniport.c [iso-8859-1] (original) +++ trunk/reactos/drivers/network/ndis/ndis/miniport.c [iso-8859-1] Fri Sep 7 12:01:14 2012 @@ -167,7 +167,6 @@ return Busy; } - VOID MiniIndicateData( PLOGICAL_ADAPTER Adapter, @@ -282,7 +281,8 @@ KeLowerIrql(OldIrql); } } -} +} + VOID NTAPI MiniIndicateReceivePacket( IN NDIS_HANDLE MiniportAdapterHandle, @@ -425,7 +425,6 @@ KeReleaseSpinLock(&Adapter->NdisMiniportBlock.Lock, OldIrql); } - VOID NTAPI MiniResetComplete( IN NDIS_HANDLE MiniportAdapterHandle, @@ -917,7 +916,6 @@ } } - VOID FASTCALL MiniQueueWorkItem( @@ -991,7 +989,6 @@ KeReleaseSpinLock(&Adapter->NdisMiniportBlock.Lock, OldIrql); } - NDIS_STATUS FASTCALL MiniDequeueWorkItem( @@ -1050,7 +1047,6 @@ } } - NDIS_STATUS MiniDoRequest( PLOGICAL_ADAPTER Adapter, @@ -1121,7 +1117,6 @@ return Status; } - /* * @implemented */ @@ -1142,7 +1137,6 @@ KeLowerIrql(OldIrql); } - /* * @implemented */ @@ -1322,7 +1316,6 @@ } - VOID NTAPI MiniStatus( @@ -1356,7 +1349,6 @@ KeReleaseSpinLock(&Adapter->NdisMiniportBlock.Lock, OldIrql); } - VOID NTAPI MiniStatusComplete( @@ -1384,7 +1376,6 @@ KeReleaseSpinLock(&Adapter->NdisMiniportBlock.Lock, OldIrql); } - /* * @implemented */ @@ -1529,7 +1520,6 @@ MiniStatusComplete(MiniportAdapterHandle); } - /* * @implemented */ @@ -1614,7 +1604,6 @@ *NdisWrapperHandle = Miniport; } - VOID NTAPI NdisIBugcheckCallback( IN PVOID Buffer, IN ULONG Length) @@ -1634,7 +1623,6 @@ sh(Context->DriverContext); } - /* * @implemented */ @@ -1685,7 +1673,6 @@ IoRegisterShutdownNotification(Adapter->NdisMiniportBlock.DeviceObject); } - NDIS_STATUS DoQueries( PLOGICAL_ADAPTER Adapter, @@ -1775,7 +1762,6 @@ return STATUS_SUCCESS; } - NTSTATUS NTAPI NdisIForwardIrpAndWaitCompletionRoutine( @@ -1791,7 +1777,6 @@ return STATUS_MORE_PROCESSING_REQUIRED; } - NTSTATUS NTAPI NdisIForwardIrpAndWait(PLOGICAL_ADAPTER Adapter, PIRP Irp) @@ -1826,7 +1811,6 @@ return STATUS_SUCCESS; } - NTSTATUS NTAPI NdisIPnPStartDevice( @@ -2153,7 +2137,6 @@ return STATUS_SUCCESS; } - NTSTATUS NTAPI NdisIPnPStopDevice( @@ -2275,7 +2258,6 @@ return Status; } - NTSTATUS NTAPI NdisIDispatchPnp( @@ -2348,7 +2330,6 @@ return IoCallDriver(Adapter->NdisMiniportBlock.NextDeviceObject, Irp); } - NTSTATUS NTAPI NdisIAddDevice( @@ -2713,7 +2694,6 @@ return NDIS_STATUS_SUCCESS; } - /* * @implemented */ @@ -2728,7 +2708,6 @@ MiniResetComplete(MiniportAdapterHandle, Status, AddressingReset); } - /* * @implemented */ @@ -2751,7 +2730,6 @@ MiniSendComplete(MiniportAdapterHandle, Packet, Status); } - /* * @implemented */ @@ -2764,7 +2742,6 @@ MiniSendResourcesAvailable(MiniportAdapterHandle); } - /* * @implemented */ @@ -2780,7 +2757,6 @@ MiniTransferDataComplete(MiniportAdapterHandle, Packet, Status, BytesTransferred); } - /* * @implemented */ @@ -2807,7 +2783,6 @@ AdapterType); } - /* * @implemented */ @@ -2853,7 +2828,6 @@ } } - /* * @implemented */ @@ -2881,7 +2855,6 @@ KeWaitForSingleObject(&Timer, Executive, KernelMode, FALSE, 0); } - /* * @implemented */ @@ -2897,7 +2870,6 @@ SynchronizeContext)); } - /* * @unimplemented */ @@ -2940,7 +2912,6 @@ return NDIS_STATUS_FAILURE; } - /* * @implemented */ Modified: trunk/reactos/drivers/network/ndis/ndis/protocol.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/ndis/ndis/…
============================================================================== --- trunk/reactos/drivers/network/ndis/ndis/protocol.c [iso-8859-1] (original) +++ trunk/reactos/drivers/network/ndis/ndis/protocol.c [iso-8859-1] Fri Sep 7 12:01:14 2012 @@ -185,7 +185,6 @@ return ProSendAndFreePnPEvent(Adapter, PnPEvent, Irp); } - /* * @implemented */ @@ -240,7 +239,6 @@ ExInterlockedRemoveEntryList(&Protocol->ListEntry, &ProtocolListLock); } - NDIS_STATUS ProIndicatePacket( PLOGICAL_ADAPTER Adapter, @@ -306,7 +304,6 @@ return NDIS_STATUS_SUCCESS; } - NDIS_STATUS NTAPI ProRequest( IN NDIS_HANDLE MacBindingHandle, @@ -456,7 +453,6 @@ #endif } - NDIS_STATUS NTAPI ProSend( IN NDIS_HANDLE MacBindingHandle, @@ -561,7 +557,6 @@ } } - VOID NTAPI ProSendPackets( IN NDIS_HANDLE NdisBindingHandle, @@ -624,7 +619,6 @@ } } - NDIS_STATUS NTAPI ProTransferData( IN NDIS_HANDLE MacBindingHandle, @@ -1221,7 +1215,6 @@ } } - /* * @implemented */ @@ -1242,7 +1235,6 @@ *Status = ProRequest(NdisBindingHandle, NdisRequest); } - /* * @implemented */ @@ -1255,7 +1247,6 @@ *Status = ProReset(NdisBindingHandle); } - /* * @implemented */ @@ -1277,7 +1268,6 @@ *Status = ProSend(NdisBindingHandle, Packet); } - /* * @implemented */ @@ -1292,7 +1282,6 @@ ProSendPackets(NdisBindingHandle, PacketArray, NumberOfPackets); } - /* * @implemented */ Modified: trunk/reactos/drivers/network/ndis/ndis/string.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/ndis/ndis/…
============================================================================== --- trunk/reactos/drivers/network/ndis/ndis/string.c [iso-8859-1] (original) +++ trunk/reactos/drivers/network/ndis/ndis/string.c [iso-8859-1] Fri Sep 7 12:01:14 2012 @@ -12,7 +12,6 @@ #include "ndissys.h" - /* * @implemented */ @@ -41,7 +40,6 @@ } - /* * @implemented */ @@ -71,7 +69,6 @@ CaseInsensitive); } - /* * @implemented */ @@ -96,7 +93,6 @@ RtlInitString((PANSI_STRING)DestinationString, (PCSZ)SourceString); } - /* * @implemented */ @@ -125,7 +121,6 @@ RtlAnsiStringToUnicodeString((PUNICODE_STRING)DestinationString, &AnsiString, TRUE); } - /* * @implemented */ @@ -150,7 +145,6 @@ RtlInitUnicodeString((PUNICODE_STRING)DestinationString, SourceString); } - /* * @implemented */ @@ -179,7 +173,6 @@ FALSE); } - /* * @implemented */ Modified: trunk/reactos/drivers/network/ndis/ndis/time.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/ndis/ndis/…
============================================================================== --- trunk/reactos/drivers/network/ndis/ndis/time.c [iso-8859-1] (original) +++ trunk/reactos/drivers/network/ndis/ndis/time.c [iso-8859-1] Fri Sep 7 12:01:14 2012 @@ -19,7 +19,6 @@ #include "ndissys.h" - /* * @implemented */ @@ -43,7 +42,6 @@ *TimerCancelled = KeCancelTimer (&Timer->Timer); } - /* * @implemented */ @@ -65,7 +63,6 @@ KeQuerySystemTime (pSystemTime); } - /* * @implemented */ @@ -126,7 +123,6 @@ } } - /* * @implemented */ @@ -188,7 +184,6 @@ SystemArgument2); } - /* * @implemented */ @@ -223,7 +218,6 @@ Timer->NextDeferredTimer = NULL; } - /* * @implemented */ @@ -269,7 +263,6 @@ KeSetTimerEx(&Timer->Timer, Timeout, MillisecondsPeriod, &Timer->Dpc); } - /* * @implemented */ @@ -316,7 +309,6 @@ KeSetTimer(&Timer->Timer, Timeout, &Timer->Dpc); } - /* * @implemented */
12 years, 3 months
1
0
0
0
[jimtabor] 57249: - turn off debugs.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Fri Sep 7 05:50:11 2012 New Revision: 57249 URL:
http://svn.reactos.org/svn/reactos?rev=57249&view=rev
Log: - turn off debugs. Modified: trunk/reactos/win32ss/user/ntuser/message.c Modified: trunk/reactos/win32ss/user/ntuser/message.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/messag…
============================================================================== --- trunk/reactos/win32ss/user/ntuser/message.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/message.c [iso-8859-1] Fri Sep 7 05:50:11 2012 @@ -2227,9 +2227,9 @@ Window = UserGetWindowObject(hWnd); if (Window) { - ERR("FNID_DESKTOP IN\n"); + //ERR("FNID_DESKTOP IN\n"); Ret = DesktopWindowProc(Window, Msg, wParam, lParam, &lResult); - ERR("FNID_DESKTOP OUT\n"); + //ERR("FNID_DESKTOP OUT\n"); } break; }
12 years, 3 months
1
0
0
0
[dgorbachev] 57248: [MOUNTMGR][NDIS] Fix some string length calculations. [CRT] Declare variables extern. [DMUSIC] Fix a bug, already fixed in Wine.
by dgorbachev@svn.reactos.org
Author: dgorbachev Date: Thu Sep 6 21:11:44 2012 New Revision: 57248 URL:
http://svn.reactos.org/svn/reactos?rev=57248&view=rev
Log: [MOUNTMGR][NDIS] Fix some string length calculations. [CRT] Declare variables extern. [DMUSIC] Fix a bug, already fixed in Wine. Modified: trunk/reactos/dll/directx/dmusic/collection.c trunk/reactos/drivers/filters/mountmgr/mountmgr.c trunk/reactos/drivers/network/ndis/ndis/misc.c trunk/reactos/lib/sdk/crt/locale/locale.c Modified: trunk/reactos/dll/directx/dmusic/collection.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/dmusic/collect…
============================================================================== --- trunk/reactos/dll/directx/dmusic/collection.c [iso-8859-1] (original) +++ trunk/reactos/dll/directx/dmusic/collection.c [iso-8859-1] Thu Sep 6 21:11:44 2012 @@ -209,8 +209,8 @@ if (pDesc->dwValidData & DMUS_OBJ_DATE) This->pDesc->ftDate = pDesc->ftDate; if (pDesc->dwValidData & DMUS_OBJ_MEMORY) { - memcpy (&This->pDesc->llMemLength, &pDesc->llMemLength, sizeof (pDesc->llMemLength)); - memcpy (This->pDesc->pbMemData, pDesc->pbMemData, sizeof (pDesc->pbMemData)); + This->pDesc->llMemLength = pDesc->llMemLength; + memcpy (This->pDesc->pbMemData, pDesc->pbMemData, pDesc->llMemLength); } if (pDesc->dwValidData & DMUS_OBJ_STREAM) { /* according to MSDN, we copy the stream */ Modified: trunk/reactos/drivers/filters/mountmgr/mountmgr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filters/mountmgr/m…
============================================================================== --- trunk/reactos/drivers/filters/mountmgr/mountmgr.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filters/mountmgr/mountmgr.c [iso-8859-1] Thu Sep 6 21:11:44 2012 @@ -38,7 +38,7 @@ KEVENT UnloadEvent; LONG Unloading; -PWSTR Cunc = L"\\??\\C:"; +static const WCHAR Cunc[] = L"\\??\\C:"; /* * TODO: Modified: trunk/reactos/drivers/network/ndis/ndis/misc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/ndis/ndis/…
============================================================================== --- trunk/reactos/drivers/network/ndis/ndis/misc.c [iso-8859-1] (original) +++ trunk/reactos/drivers/network/ndis/ndis/misc.c [iso-8859-1] Thu Sep 6 21:11:44 2012 @@ -139,7 +139,7 @@ return (NDIS_HANDLE)obj; } -const WCHAR* NDIS_FILE_FOLDER = L"\\SystemRoot\\System32\\Drivers\\"; +static const WCHAR NDIS_FILE_FOLDER[] = L"\\SystemRoot\\System32\\Drivers\\"; /* * @implemented @@ -242,8 +242,8 @@ *Status = NDIS_STATUS_SUCCESS; FullFileName.Buffer = NULL; - FullFileName.Length = sizeof(NDIS_FILE_FOLDER); - FullFileName.MaximumLength = FileName->MaximumLength + sizeof(NDIS_FILE_FOLDER); + FullFileName.Length = sizeof(NDIS_FILE_FOLDER) - sizeof(UNICODE_NULL); + FullFileName.MaximumLength = FileName->MaximumLength + FullFileName.Length; FullFileName.Buffer = ExAllocatePool ( NonPagedPool, FullFileName.MaximumLength ); if ( !FullFileName.Buffer ) Modified: trunk/reactos/lib/sdk/crt/locale/locale.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/locale/locale.…
============================================================================== --- trunk/reactos/lib/sdk/crt/locale/locale.c [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/crt/locale/locale.c [iso-8859-1] Thu Sep 6 21:11:44 2012 @@ -74,8 +74,8 @@ LANGID found_lang_id; } locale_search_t; -unsigned int __setlc_active; -unsigned int __unguarded_readlc_active; +extern unsigned int __setlc_active; +extern unsigned int __unguarded_readlc_active; int _current_category; /* used by setlocale */ const char *_current_locale;
12 years, 3 months
1
0
0
0
[dgorbachev] 57247: [OPENGL] Silence GCC warning.
by dgorbachev@svn.reactos.org
Author: dgorbachev Date: Thu Sep 6 21:09:36 2012 New Revision: 57247 URL:
http://svn.reactos.org/svn/reactos?rev=57247&view=rev
Log: [OPENGL] Silence GCC warning. Modified: trunk/reactos/dll/opengl/mesa/CMakeLists.txt Modified: trunk/reactos/dll/opengl/mesa/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/CMakeLists…
============================================================================== --- trunk/reactos/dll/opengl/mesa/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/CMakeLists.txt [iso-8859-1] Thu Sep 6 21:09:36 2012 @@ -14,6 +14,9 @@ if(NOT MSVC) add_compile_flags_language("-std=gnu99" "C") add_compile_flags("-Wno-deprecated-declarations") + if(GCC_VERSION VERSION_EQUAL 4.7 OR GCC_VERSION VERSION_GREATER 4.7) + add_compile_flags("-Wno-error=unused-local-typedefs") + endif() # optimizations (builtin memcmp is slow on some gcc versions) used in SConsript files add_compile_flags("-ffast-math -fno-builtin-memcmp") else() @@ -32,4 +35,4 @@ # our DBG definitions conflict with mesa source code remove_definitions(-DDBG=1 -DDBG=0) -add_subdirectory(src) +add_subdirectory(src)
12 years, 3 months
1
0
0
0
[akhaldi] 57246: [FORMATTING] * No code changes.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Thu Sep 6 18:36:48 2012 New Revision: 57246 URL:
http://svn.reactos.org/svn/reactos?rev=57246&view=rev
Log: [FORMATTING] * No code changes. Modified: trunk/reactos/drivers/filesystems/fastfat/dir.c Modified: trunk/reactos/drivers/filesystems/fastfat/dir.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfa…
============================================================================== --- trunk/reactos/drivers/filesystems/fastfat/dir.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/fastfat/dir.c [iso-8859-1] Thu Sep 6 18:36:48 2012 @@ -8,504 +8,602 @@ */ +/* INCLUDES *****************************************************************/ + #define NDEBUG #include "vfat.h" - -// function like DosDateTimeToFileTime +/* FUNCTIONS ****************************************************************/ + +/* Function like DosDateTimeToFileTime */ BOOLEAN -FsdDosDateTimeToSystemTime (PDEVICE_EXTENSION DeviceExt, USHORT DosDate, USHORT DosTime, PLARGE_INTEGER SystemTime) -{ - PDOSTIME pdtime = (PDOSTIME) &DosTime; - PDOSDATE pddate = (PDOSDATE) &DosDate; - TIME_FIELDS TimeFields; - LARGE_INTEGER LocalTime; - - if (SystemTime == NULL) - return FALSE; - - TimeFields.Milliseconds = 0; - TimeFields.Second = pdtime->Second * 2; - TimeFields.Minute = pdtime->Minute; - TimeFields.Hour = pdtime->Hour; - - TimeFields.Day = pddate->Day; - TimeFields.Month = pddate->Month; - TimeFields.Year = (CSHORT)(DeviceExt->BaseDateYear + pddate->Year); - - RtlTimeFieldsToTime (&TimeFields, &LocalTime); - ExLocalTimeToSystemTime(&LocalTime, SystemTime); - - return TRUE; -} - -// function like FileTimeToDosDateTime +FsdDosDateTimeToSystemTime(PDEVICE_EXTENSION DeviceExt, + USHORT DosDate, + USHORT DosTime, + PLARGE_INTEGER SystemTime) +{ + PDOSTIME pdtime = (PDOSTIME)&DosTime; + PDOSDATE pddate = (PDOSDATE)&DosDate; + TIME_FIELDS TimeFields; + LARGE_INTEGER LocalTime; + + if (SystemTime == NULL) + return FALSE; + + TimeFields.Milliseconds = 0; + TimeFields.Second = pdtime->Second * 2; + TimeFields.Minute = pdtime->Minute; + TimeFields.Hour = pdtime->Hour; + + TimeFields.Day = pddate->Day; + TimeFields.Month = pddate->Month; + TimeFields.Year = (CSHORT)(DeviceExt->BaseDateYear + pddate->Year); + + RtlTimeFieldsToTime(&TimeFields, &LocalTime); + ExLocalTimeToSystemTime(&LocalTime, SystemTime); + + return TRUE; +} + +/* Function like FileTimeToDosDateTime */ BOOLEAN -FsdSystemTimeToDosDateTime (PDEVICE_EXTENSION DeviceExt, PLARGE_INTEGER SystemTime, USHORT *pDosDate, USHORT *pDosTime) -{ - PDOSTIME pdtime = (PDOSTIME) pDosTime; - PDOSDATE pddate = (PDOSDATE) pDosDate; - TIME_FIELDS TimeFields; - LARGE_INTEGER LocalTime; - - if (SystemTime == NULL) - return FALSE; - - ExSystemTimeToLocalTime (SystemTime, &LocalTime); - RtlTimeToTimeFields (&LocalTime, &TimeFields); - - if (pdtime) - { - pdtime->Second = TimeFields.Second / 2; - pdtime->Minute = TimeFields.Minute; - pdtime->Hour = TimeFields.Hour; - } - - if (pddate) - { - pddate->Day = TimeFields.Day; - pddate->Month = TimeFields.Month; - pddate->Year = (USHORT) (TimeFields.Year - DeviceExt->BaseDateYear); - } - - return TRUE; +FsdSystemTimeToDosDateTime(PDEVICE_EXTENSION DeviceExt, + PLARGE_INTEGER SystemTime, + PUSHORT pDosDate, + PUSHORT pDosTime) +{ + PDOSTIME pdtime = (PDOSTIME)pDosTime; + PDOSDATE pddate = (PDOSDATE)pDosDate; + TIME_FIELDS TimeFields; + LARGE_INTEGER LocalTime; + + if (SystemTime == NULL) + return FALSE; + + ExSystemTimeToLocalTime(SystemTime, &LocalTime); + RtlTimeToTimeFields(&LocalTime, &TimeFields); + + if (pdtime) + { + pdtime->Second = TimeFields.Second / 2; + pdtime->Minute = TimeFields.Minute; + pdtime->Hour = TimeFields.Hour; + } + + if (pddate) + { + pddate->Day = TimeFields.Day; + pddate->Month = TimeFields.Month; + pddate->Year = (USHORT) (TimeFields.Year - DeviceExt->BaseDateYear); + } + + return TRUE; } #define ULONG_ROUND_UP(x) ROUND_UP((x), (sizeof(ULONG))) static NTSTATUS -VfatGetFileNameInformation (PVFAT_DIRENTRY_CONTEXT DirContext, - PFILE_NAMES_INFORMATION pInfo, ULONG BufferLength) -{ - if ((sizeof (FILE_DIRECTORY_INFORMATION) + DirContext->LongNameU.Length) > BufferLength) - return STATUS_BUFFER_OVERFLOW; - pInfo->FileNameLength = DirContext->LongNameU.Length; - pInfo->NextEntryOffset = - ULONG_ROUND_UP (sizeof (FILE_DIRECTORY_INFORMATION) + DirContext->LongNameU.Length); - RtlCopyMemory (pInfo->FileName, DirContext->LongNameU.Buffer, DirContext->LongNameU.Length); - return STATUS_SUCCESS; +VfatGetFileNameInformation(PVFAT_DIRENTRY_CONTEXT DirContext, + PFILE_NAMES_INFORMATION pInfo, + ULONG BufferLength) +{ + if ((sizeof(FILE_DIRECTORY_INFORMATION) + DirContext->LongNameU.Length) > BufferLength) + return STATUS_BUFFER_OVERFLOW; + + pInfo->FileNameLength = DirContext->LongNameU.Length; + pInfo->NextEntryOffset = ULONG_ROUND_UP(sizeof(FILE_DIRECTORY_INFORMATION) + + DirContext->LongNameU.Length); + + RtlCopyMemory(pInfo->FileName, + DirContext->LongNameU.Buffer, + DirContext->LongNameU.Length); + + return STATUS_SUCCESS; } static NTSTATUS -VfatGetFileDirectoryInformation (PVFAT_DIRENTRY_CONTEXT DirContext, - PDEVICE_EXTENSION DeviceExt, - PFILE_DIRECTORY_INFORMATION pInfo, - ULONG BufferLength) -{ - if ((sizeof (FILE_DIRECTORY_INFORMATION) + DirContext->LongNameU.Length) > BufferLength) - return STATUS_BUFFER_OVERFLOW; - pInfo->FileNameLength = DirContext->LongNameU.Length; - pInfo->NextEntryOffset = - ULONG_ROUND_UP (sizeof (FILE_DIRECTORY_INFORMATION) + DirContext->LongNameU.Length); - RtlCopyMemory (pInfo->FileName, DirContext->LongNameU.Buffer, DirContext->LongNameU.Length); -// pInfo->FileIndex=; - if (DeviceExt->Flags & VCB_IS_FATX) - { - FsdDosDateTimeToSystemTime (DeviceExt, DirContext->DirEntry.FatX.CreationDate, - DirContext->DirEntry.FatX.CreationTime, - &pInfo->CreationTime); - FsdDosDateTimeToSystemTime (DeviceExt, DirContext->DirEntry.FatX.AccessDate, - DirContext->DirEntry.FatX.AccessTime, - &pInfo->LastAccessTime); - FsdDosDateTimeToSystemTime (DeviceExt, DirContext->DirEntry.FatX.UpdateDate, - DirContext->DirEntry.FatX.UpdateTime, - &pInfo->LastWriteTime); - pInfo->ChangeTime = pInfo->LastWriteTime; - if (DirContext->DirEntry.FatX.Attrib & FILE_ATTRIBUTE_DIRECTORY) - { - pInfo->EndOfFile.QuadPart = 0; - pInfo->AllocationSize.QuadPart = 0; - } +VfatGetFileDirectoryInformation(PVFAT_DIRENTRY_CONTEXT DirContext, + PDEVICE_EXTENSION DeviceExt, + PFILE_DIRECTORY_INFORMATION pInfo, + ULONG BufferLength) +{ + if ((sizeof(FILE_DIRECTORY_INFORMATION) + DirContext->LongNameU.Length) > BufferLength) + return STATUS_BUFFER_OVERFLOW; + + pInfo->FileNameLength = DirContext->LongNameU.Length; + pInfo->NextEntryOffset = ULONG_ROUND_UP(sizeof(FILE_DIRECTORY_INFORMATION) + + DirContext->LongNameU.Length); + /* pInfo->FileIndex = ; */ + + RtlCopyMemory(pInfo->FileName, + DirContext->LongNameU.Buffer, + DirContext->LongNameU.Length); + + if (DeviceExt->Flags & VCB_IS_FATX) + { + FsdDosDateTimeToSystemTime(DeviceExt, + DirContext->DirEntry.FatX.CreationDate, + DirContext->DirEntry.FatX.CreationTime, + &pInfo->CreationTime); + FsdDosDateTimeToSystemTime(DeviceExt, + DirContext->DirEntry.FatX.AccessDate, + DirContext->DirEntry.FatX.AccessTime, + &pInfo->LastAccessTime); + FsdDosDateTimeToSystemTime(DeviceExt, + DirContext->DirEntry.FatX.UpdateDate, + DirContext->DirEntry.FatX.UpdateTime, + &pInfo->LastWriteTime); + + pInfo->ChangeTime = pInfo->LastWriteTime; + + if (DirContext->DirEntry.FatX.Attrib & FILE_ATTRIBUTE_DIRECTORY) + { + pInfo->EndOfFile.QuadPart = 0; + pInfo->AllocationSize.QuadPart = 0; + } + else + { + pInfo->EndOfFile.u.HighPart = 0; + pInfo->EndOfFile.u.LowPart = DirContext->DirEntry.FatX.FileSize; + /* Make allocsize a rounded up multiple of BytesPerCluster */ + pInfo->AllocationSize.u.HighPart = 0; + pInfo->AllocationSize.u.LowPart = ROUND_UP(DirContext->DirEntry.FatX.FileSize, + DeviceExt->FatInfo.BytesPerCluster); + } + + pInfo->FileAttributes = DirContext->DirEntry.FatX.Attrib & 0x3f; + } else - { + { + FsdDosDateTimeToSystemTime(DeviceExt, + DirContext->DirEntry.Fat.CreationDate, + DirContext->DirEntry.Fat.CreationTime, + &pInfo->CreationTime); + FsdDosDateTimeToSystemTime(DeviceExt, + DirContext->DirEntry.Fat.AccessDate, + 0, + &pInfo->LastAccessTime); + FsdDosDateTimeToSystemTime(DeviceExt, + DirContext->DirEntry.Fat.UpdateDate, + DirContext->DirEntry.Fat.UpdateTime, + &pInfo->LastWriteTime); + + pInfo->ChangeTime = pInfo->LastWriteTime; + + if (DirContext->DirEntry.Fat.Attrib & FILE_ATTRIBUTE_DIRECTORY) + { + pInfo->EndOfFile.QuadPart = 0; + pInfo->AllocationSize.QuadPart = 0; + } + else + { + pInfo->EndOfFile.u.HighPart = 0; + pInfo->EndOfFile.u.LowPart = DirContext->DirEntry.Fat.FileSize; + /* Make allocsize a rounded up multiple of BytesPerCluster */ + pInfo->AllocationSize.u.HighPart = 0; + pInfo->AllocationSize.u.LowPart = ROUND_UP(DirContext->DirEntry.Fat.FileSize, + DeviceExt->FatInfo.BytesPerCluster); + } + + pInfo->FileAttributes = DirContext->DirEntry.Fat.Attrib & 0x3f; + } + + return STATUS_SUCCESS; +} + +static NTSTATUS +VfatGetFileFullDirectoryInformation(PVFAT_DIRENTRY_CONTEXT DirContext, + PDEVICE_EXTENSION DeviceExt, + PFILE_FULL_DIR_INFORMATION pInfo, + ULONG BufferLength) +{ + if ((sizeof(FILE_FULL_DIR_INFORMATION) + DirContext->LongNameU.Length) > BufferLength) + return STATUS_BUFFER_OVERFLOW; + + pInfo->FileNameLength = DirContext->LongNameU.Length; + pInfo->NextEntryOffset = ULONG_ROUND_UP(sizeof(FILE_FULL_DIR_INFORMATION) + + DirContext->LongNameU.Length); + /* pInfo->FileIndex = ; */ + /* pInfo->EaSize = ; */ + + RtlCopyMemory(pInfo->FileName, + DirContext->LongNameU.Buffer, + DirContext->LongNameU.Length); + + if (DeviceExt->Flags & VCB_IS_FATX) + { + FsdDosDateTimeToSystemTime(DeviceExt, + DirContext->DirEntry.FatX.CreationDate, + DirContext->DirEntry.FatX.CreationTime, + &pInfo->CreationTime); + FsdDosDateTimeToSystemTime(DeviceExt, + DirContext->DirEntry.FatX.AccessDate, + DirContext->DirEntry.FatX.AccessTime, + &pInfo->LastAccessTime); + FsdDosDateTimeToSystemTime(DeviceExt, + DirContext->DirEntry.FatX.UpdateDate, + DirContext->DirEntry.FatX.UpdateTime, + &pInfo->LastWriteTime); + + pInfo->ChangeTime = pInfo->LastWriteTime; pInfo->EndOfFile.u.HighPart = 0; pInfo->EndOfFile.u.LowPart = DirContext->DirEntry.FatX.FileSize; /* Make allocsize a rounded up multiple of BytesPerCluster */ pInfo->AllocationSize.u.HighPart = 0; - pInfo->AllocationSize.u.LowPart = ROUND_UP(DirContext->DirEntry.FatX.FileSize, DeviceExt->FatInfo.BytesPerCluster); - } - pInfo->FileAttributes = DirContext->DirEntry.FatX.Attrib & 0x3f; - } - else - { - FsdDosDateTimeToSystemTime (DeviceExt, DirContext->DirEntry.Fat.CreationDate, - DirContext->DirEntry.Fat.CreationTime, - &pInfo->CreationTime); - FsdDosDateTimeToSystemTime (DeviceExt, DirContext->DirEntry.Fat.AccessDate, 0, - &pInfo->LastAccessTime); - FsdDosDateTimeToSystemTime (DeviceExt, DirContext->DirEntry.Fat.UpdateDate, - DirContext->DirEntry.Fat.UpdateTime, - &pInfo->LastWriteTime); - pInfo->ChangeTime = pInfo->LastWriteTime; - if (DirContext->DirEntry.Fat.Attrib & FILE_ATTRIBUTE_DIRECTORY) - { - pInfo->EndOfFile.QuadPart = 0; - pInfo->AllocationSize.QuadPart = 0; - } + pInfo->AllocationSize.u.LowPart = ROUND_UP(DirContext->DirEntry.FatX.FileSize, + DeviceExt->FatInfo.BytesPerCluster); + pInfo->FileAttributes = DirContext->DirEntry.FatX.Attrib & 0x3f; + } else - { + { + FsdDosDateTimeToSystemTime(DeviceExt, + DirContext->DirEntry.Fat.CreationDate, + DirContext->DirEntry.Fat.CreationTime, + &pInfo->CreationTime); + FsdDosDateTimeToSystemTime(DeviceExt, + DirContext->DirEntry.Fat.AccessDate, + 0, + &pInfo->LastAccessTime); + FsdDosDateTimeToSystemTime(DeviceExt, + DirContext->DirEntry.Fat.UpdateDate, + DirContext->DirEntry.Fat.UpdateTime, + &pInfo->LastWriteTime); + + pInfo->ChangeTime = pInfo->LastWriteTime; pInfo->EndOfFile.u.HighPart = 0; pInfo->EndOfFile.u.LowPart = DirContext->DirEntry.Fat.FileSize; /* Make allocsize a rounded up multiple of BytesPerCluster */ pInfo->AllocationSize.u.HighPart = 0; - pInfo->AllocationSize.u.LowPart = ROUND_UP(DirContext->DirEntry.Fat.FileSize, DeviceExt->FatInfo.BytesPerCluster); - } - pInfo->FileAttributes = DirContext->DirEntry.Fat.Attrib & 0x3f; - } - - return STATUS_SUCCESS; + pInfo->AllocationSize.u.LowPart = ROUND_UP(DirContext->DirEntry.Fat.FileSize, + DeviceExt->FatInfo.BytesPerCluster); + pInfo->FileAttributes = DirContext->DirEntry.Fat.Attrib & 0x3f; + } + + return STATUS_SUCCESS; } static NTSTATUS -VfatGetFileFullDirectoryInformation (PVFAT_DIRENTRY_CONTEXT DirContext, - PDEVICE_EXTENSION DeviceExt, - PFILE_FULL_DIR_INFORMATION pInfo, - ULONG BufferLength) -{ - if ((sizeof (FILE_FULL_DIR_INFORMATION) + DirContext->LongNameU.Length) > BufferLength) - return STATUS_BUFFER_OVERFLOW; - pInfo->FileNameLength = DirContext->LongNameU.Length; - pInfo->NextEntryOffset = - ULONG_ROUND_UP (sizeof (FILE_FULL_DIR_INFORMATION) + DirContext->LongNameU.Length); - RtlCopyMemory (pInfo->FileName, DirContext->LongNameU.Buffer, DirContext->LongNameU.Length); -// pInfo->FileIndex=; - if (DeviceExt->Flags & VCB_IS_FATX) - { - FsdDosDateTimeToSystemTime (DeviceExt, DirContext->DirEntry.FatX.CreationDate, - DirContext->DirEntry.FatX.CreationTime, - &pInfo->CreationTime); - FsdDosDateTimeToSystemTime (DeviceExt, DirContext->DirEntry.FatX.AccessDate, - DirContext->DirEntry.FatX.AccessTime, - &pInfo->LastAccessTime); - FsdDosDateTimeToSystemTime (DeviceExt, DirContext->DirEntry.FatX.UpdateDate, - DirContext->DirEntry.FatX.UpdateTime, - &pInfo->LastWriteTime); - pInfo->ChangeTime = pInfo->LastWriteTime; - pInfo->EndOfFile.u.HighPart = 0; - pInfo->EndOfFile.u.LowPart = DirContext->DirEntry.FatX.FileSize; - /* Make allocsize a rounded up multiple of BytesPerCluster */ - pInfo->AllocationSize.u.HighPart = 0; - pInfo->AllocationSize.u.LowPart = ROUND_UP(DirContext->DirEntry.FatX.FileSize, DeviceExt->FatInfo.BytesPerCluster); - pInfo->FileAttributes = DirContext->DirEntry.FatX.Attrib & 0x3f; - } - else - { - FsdDosDateTimeToSystemTime (DeviceExt, DirContext->DirEntry.Fat.CreationDate, - DirContext->DirEntry.Fat.CreationTime, - &pInfo->CreationTime); - FsdDosDateTimeToSystemTime (DeviceExt, DirContext->DirEntry.Fat.AccessDate, - 0, &pInfo->LastAccessTime); - FsdDosDateTimeToSystemTime (DeviceExt, DirContext->DirEntry.Fat.UpdateDate, - DirContext->DirEntry.Fat.UpdateTime, - &pInfo->LastWriteTime); - pInfo->ChangeTime = pInfo->LastWriteTime; - pInfo->EndOfFile.u.HighPart = 0; - pInfo->EndOfFile.u.LowPart = DirContext->DirEntry.Fat.FileSize; - /* Make allocsize a rounded up multiple of BytesPerCluster */ - pInfo->AllocationSize.u.HighPart = 0; - pInfo->AllocationSize.u.LowPart = ROUND_UP(DirContext->DirEntry.Fat.FileSize, DeviceExt->FatInfo.BytesPerCluster); - pInfo->FileAttributes = DirContext->DirEntry.Fat.Attrib & 0x3f; - } -// pInfo->EaSize=; - return STATUS_SUCCESS; +VfatGetFileBothInformation(PVFAT_DIRENTRY_CONTEXT DirContext, + PDEVICE_EXTENSION DeviceExt, + PFILE_BOTH_DIR_INFORMATION pInfo, + ULONG BufferLength) +{ + if ((sizeof(FILE_BOTH_DIR_INFORMATION) + DirContext->LongNameU.Length) > BufferLength) + return STATUS_BUFFER_OVERFLOW; + + pInfo->EaSize = 0; + + if (DeviceExt->Flags & VCB_IS_FATX) + { + pInfo->FileNameLength = DirContext->LongNameU.Length; + + RtlCopyMemory(pInfo->FileName, + DirContext->LongNameU.Buffer, + DirContext->LongNameU.Length); + + pInfo->NextEntryOffset = ULONG_ROUND_UP(sizeof(FILE_BOTH_DIR_INFORMATION) + + DirContext->LongNameU.Length); + pInfo->ShortName[0] = 0; + pInfo->ShortNameLength = 0; + /* pInfo->FileIndex = ; */ + + FsdDosDateTimeToSystemTime(DeviceExt, + DirContext->DirEntry.FatX.CreationDate, + DirContext->DirEntry.FatX.CreationTime, + &pInfo->CreationTime); + FsdDosDateTimeToSystemTime(DeviceExt, + DirContext->DirEntry.FatX.AccessDate, + DirContext->DirEntry.FatX.AccessTime, + &pInfo->LastAccessTime); + FsdDosDateTimeToSystemTime(DeviceExt, + DirContext->DirEntry.FatX.UpdateDate, + DirContext->DirEntry.FatX.UpdateTime, + &pInfo->LastWriteTime); + + pInfo->ChangeTime = pInfo->LastWriteTime; + + if (DirContext->DirEntry.FatX.Attrib & FILE_ATTRIBUTE_DIRECTORY) + { + pInfo->EndOfFile.QuadPart = 0; + pInfo->AllocationSize.QuadPart = 0; + } + else + { + pInfo->EndOfFile.u.HighPart = 0; + pInfo->EndOfFile.u.LowPart = DirContext->DirEntry.FatX.FileSize; + /* Make allocsize a rounded up multiple of BytesPerCluster */ + pInfo->AllocationSize.u.HighPart = 0; + pInfo->AllocationSize.u.LowPart = ROUND_UP(DirContext->DirEntry.FatX.FileSize, + DeviceExt->FatInfo.BytesPerCluster); + } + + pInfo->FileAttributes = DirContext->DirEntry.FatX.Attrib & 0x3f; + } + else + { + pInfo->FileNameLength = DirContext->LongNameU.Length; + pInfo->NextEntryOffset = ULONG_ROUND_UP(sizeof(FILE_BOTH_DIR_INFORMATION) + + DirContext->LongNameU.Length); + + RtlCopyMemory(pInfo->ShortName, + DirContext->ShortNameU.Buffer, + DirContext->ShortNameU.Length); + + pInfo->ShortNameLength = (CCHAR)DirContext->ShortNameU.Length; + + RtlCopyMemory(pInfo->FileName, + DirContext->LongNameU.Buffer, + DirContext->LongNameU.Length); + + /* pInfo->FileIndex = ; */ + + FsdDosDateTimeToSystemTime(DeviceExt, + DirContext->DirEntry.Fat.CreationDate, + DirContext->DirEntry.Fat.CreationTime, + &pInfo->CreationTime); + FsdDosDateTimeToSystemTime(DeviceExt, + DirContext->DirEntry.Fat.AccessDate, + 0, + &pInfo->LastAccessTime); + FsdDosDateTimeToSystemTime(DeviceExt, + DirContext->DirEntry.Fat.UpdateDate, + DirContext->DirEntry.Fat.UpdateTime, + &pInfo->LastWriteTime); + + pInfo->ChangeTime = pInfo->LastWriteTime; + + if (DirContext->DirEntry.Fat.Attrib & FILE_ATTRIBUTE_DIRECTORY) + { + pInfo->EndOfFile.QuadPart = 0; + pInfo->AllocationSize.QuadPart = 0; + } + else + { + pInfo->EndOfFile.u.HighPart = 0; + pInfo->EndOfFile.u.LowPart = DirContext->DirEntry.Fat.FileSize; + /* Make allocsize a rounded up multiple of BytesPerCluster */ + pInfo->AllocationSize.u.HighPart = 0; + pInfo->AllocationSize.u.LowPart = ROUND_UP(DirContext->DirEntry.Fat.FileSize, DeviceExt->FatInfo.BytesPerCluster); + } + + pInfo->FileAttributes = DirContext->DirEntry.Fat.Attrib & 0x3f; + } + + return STATUS_SUCCESS; } static NTSTATUS -VfatGetFileBothInformation (PVFAT_DIRENTRY_CONTEXT DirContext, - PDEVICE_EXTENSION DeviceExt, - PFILE_BOTH_DIR_INFORMATION pInfo, - ULONG BufferLength) -{ - if ((sizeof (FILE_BOTH_DIR_INFORMATION) + DirContext->LongNameU.Length) > BufferLength) - return STATUS_BUFFER_OVERFLOW; - - if (DeviceExt->Flags & VCB_IS_FATX) - { - pInfo->FileNameLength = DirContext->LongNameU.Length; - RtlCopyMemory(pInfo->FileName, DirContext->LongNameU.Buffer, DirContext->LongNameU.Length); - pInfo->NextEntryOffset = - ULONG_ROUND_UP (sizeof (FILE_BOTH_DIR_INFORMATION) + DirContext->LongNameU.Length); - pInfo->ShortName[0] = 0; - pInfo->ShortNameLength = 0; - // pInfo->FileIndex=; - FsdDosDateTimeToSystemTime (DeviceExt, DirContext->DirEntry.FatX.CreationDate, - DirContext->DirEntry.FatX.CreationTime, - &pInfo->CreationTime); - FsdDosDateTimeToSystemTime (DeviceExt, DirContext->DirEntry.FatX.AccessDate, - DirContext->DirEntry.FatX.AccessTime, - &pInfo->LastAccessTime); - FsdDosDateTimeToSystemTime (DeviceExt, DirContext->DirEntry.FatX.UpdateDate, - DirContext->DirEntry.FatX.UpdateTime, - &pInfo->LastWriteTime); - pInfo->ChangeTime = pInfo->LastWriteTime; - if (DirContext->DirEntry.FatX.Attrib & FILE_ATTRIBUTE_DIRECTORY) - { - pInfo->EndOfFile.QuadPart = 0; - pInfo->AllocationSize.QuadPart = 0; - } +DoQuery(PVFAT_IRP_CONTEXT IrpContext) +{ + NTSTATUS Status = STATUS_SUCCESS; + LONG BufferLength = 0; + PUNICODE_STRING pSearchPattern = NULL; + FILE_INFORMATION_CLASS FileInformationClass; + PUCHAR Buffer = NULL; + PFILE_NAMES_INFORMATION Buffer0 = NULL; + PVFATFCB pFcb; + PVFATCCB pCcb; + BOOLEAN FirstQuery = FALSE; + BOOLEAN FirstCall = TRUE; + VFAT_DIRENTRY_CONTEXT DirContext; + WCHAR LongNameBuffer[LONGNAME_MAX_LENGTH + 1]; + WCHAR ShortNameBuffer[13]; + + PIO_STACK_LOCATION Stack = IrpContext->Stack; + + pCcb = (PVFATCCB)IrpContext->FileObject->FsContext2; + pFcb = (PVFATFCB)IrpContext->FileObject->FsContext; + + /* Determine Buffer for result : */ + BufferLength = Stack->Parameters.QueryDirectory.Length; +#if 0 + /* Do not probe the user buffer until SEH is available */ + if (IrpContext->Irp->RequestorMode != KernelMode && + IrpContext->Irp->MdlAddress == NULL && + IrpContext->Irp->UserBuffer != NULL) + { + ProbeForWrite(IrpContext->Irp->UserBuffer, BufferLength, 1); + } +#endif + Buffer = VfatGetUserBuffer(IrpContext->Irp); + + if (!ExAcquireResourceSharedLite(&pFcb->MainResource, + (BOOLEAN)(IrpContext->Flags & IRPCONTEXT_CANWAIT))) + { + Status = VfatLockUserBuffer(IrpContext->Irp, BufferLength, IoWriteAccess); + if (NT_SUCCESS(Status)) + Status = STATUS_PENDING; + + return Status; + } + + /* Obtain the callers parameters */ +#ifdef _MSC_VER + /* HACKHACK: Bug in the MS ntifs.h header: + * FileName is really a PUNICODE_STRING, not a PSTRING */ + pSearchPattern = (PUNICODE_STRING)Stack->Parameters.QueryDirectory.FileName; +#else + pSearchPattern = Stack->Parameters.QueryDirectory.FileName; +#endif + FileInformationClass = Stack->Parameters.QueryDirectory.FileInformationClass; + + if (pSearchPattern) + { + if (!pCcb->SearchPattern.Buffer) + { + FirstQuery = TRUE; + pCcb->SearchPattern.MaximumLength = pSearchPattern->Length + sizeof(WCHAR); + pCcb->SearchPattern.Buffer = ExAllocatePoolWithTag(NonPagedPool, + pCcb->SearchPattern.MaximumLength, + TAG_VFAT); + if (!pCcb->SearchPattern.Buffer) + { + ExReleaseResourceLite(&pFcb->MainResource); + return STATUS_INSUFFICIENT_RESOURCES; + } + RtlCopyUnicodeString(&pCcb->SearchPattern, pSearchPattern); + pCcb->SearchPattern.Buffer[pCcb->SearchPattern.Length / sizeof(WCHAR)] = 0; + } + } + else if (!pCcb->SearchPattern.Buffer) + { + FirstQuery = TRUE; + pCcb->SearchPattern.MaximumLength = 2 * sizeof(WCHAR); + pCcb->SearchPattern.Buffer = ExAllocatePoolWithTag(NonPagedPool, + 2 * sizeof(WCHAR), + TAG_VFAT); + if (!pCcb->SearchPattern.Buffer) + { + ExReleaseResourceLite(&pFcb->MainResource); + return STATUS_INSUFFICIENT_RESOURCES; + } + pCcb->SearchPattern.Buffer[0] = L'*'; + pCcb->SearchPattern.Buffer[1] = 0; + pCcb->SearchPattern.Length = sizeof(WCHAR); + } + + if (IrpContext->Stack->Flags & SL_INDEX_SPECIFIED) + { + DirContext.DirIndex = pCcb->Entry = Stack->Parameters.QueryDirectory.FileIndex; + } + else if (FirstQuery || (IrpContext->Stack->Flags & SL_RESTART_SCAN)) + { + DirContext.DirIndex = pCcb->Entry = 0; + } else - { - pInfo->EndOfFile.u.HighPart = 0; - pInfo->EndOfFile.u.LowPart = DirContext->DirEntry.FatX.FileSize; - /* Make allocsize a rounded up multiple of BytesPerCluster */ - pInfo->AllocationSize.u.HighPart = 0; - pInfo->AllocationSize.u.LowPart = ROUND_UP(DirContext->DirEntry.FatX.FileSize, DeviceExt->FatInfo.BytesPerCluster); - } - pInfo->FileAttributes = DirContext->DirEntry.FatX.Attrib & 0x3f; - } - else - { - pInfo->FileNameLength = DirContext->LongNameU.Length; - pInfo->NextEntryOffset = - ULONG_ROUND_UP (sizeof (FILE_BOTH_DIR_INFORMATION) + DirContext->LongNameU.Length); - RtlCopyMemory(pInfo->ShortName, DirContext->ShortNameU.Buffer, DirContext->ShortNameU.Length); - pInfo->ShortNameLength = (CCHAR)DirContext->ShortNameU.Length; - RtlCopyMemory (pInfo->FileName, DirContext->LongNameU.Buffer, DirContext->LongNameU.Length); - // pInfo->FileIndex=; - FsdDosDateTimeToSystemTime (DeviceExt, DirContext->DirEntry.Fat.CreationDate, - DirContext->DirEntry.Fat.CreationTime, - &pInfo->CreationTime); - FsdDosDateTimeToSystemTime (DeviceExt, DirContext->DirEntry.Fat.AccessDate, 0, - &pInfo->LastAccessTime); - FsdDosDateTimeToSystemTime (DeviceExt, DirContext->DirEntry.Fat.UpdateDate, - DirContext->DirEntry.Fat.UpdateTime, - &pInfo->LastWriteTime); - pInfo->ChangeTime = pInfo->LastWriteTime; - if (DirContext->DirEntry.Fat.Attrib & FILE_ATTRIBUTE_DIRECTORY) - { - pInfo->EndOfFile.QuadPart = 0; - pInfo->AllocationSize.QuadPart = 0; - } - else - { - pInfo->EndOfFile.u.HighPart = 0; - pInfo->EndOfFile.u.LowPart = DirContext->DirEntry.Fat.FileSize; - /* Make allocsize a rounded up multiple of BytesPerCluster */ - pInfo->AllocationSize.u.HighPart = 0; - pInfo->AllocationSize.u.LowPart = ROUND_UP(DirContext->DirEntry.Fat.FileSize, DeviceExt->FatInfo.BytesPerCluster); - } - pInfo->FileAttributes = DirContext->DirEntry.Fat.Attrib & 0x3f; - } - pInfo->EaSize=0; - return STATUS_SUCCESS; -} - -static NTSTATUS DoQuery (PVFAT_IRP_CONTEXT IrpContext) -{ - NTSTATUS RC = STATUS_SUCCESS; - long BufferLength = 0; - PUNICODE_STRING pSearchPattern = NULL; - FILE_INFORMATION_CLASS FileInformationClass; - unsigned char *Buffer = NULL; - PFILE_NAMES_INFORMATION Buffer0 = NULL; - PVFATFCB pFcb; - PVFATCCB pCcb; - BOOLEAN FirstQuery = FALSE; - BOOLEAN FirstCall = TRUE; - VFAT_DIRENTRY_CONTEXT DirContext; - WCHAR LongNameBuffer[LONGNAME_MAX_LENGTH + 1]; - WCHAR ShortNameBuffer[13]; - - PIO_STACK_LOCATION Stack = IrpContext->Stack; - - pCcb = (PVFATCCB) IrpContext->FileObject->FsContext2; - pFcb = (PVFATFCB) IrpContext->FileObject->FsContext; - - // determine Buffer for result : - BufferLength = Stack->Parameters.QueryDirectory.Length; -#if 0 - /* Do not probe the user buffer until SEH is available */ - if (IrpContext->Irp->RequestorMode != KernelMode && - IrpContext->Irp->MdlAddress == NULL && - IrpContext->Irp->UserBuffer != NULL) - { - ProbeForWrite(IrpContext->Irp->UserBuffer, BufferLength, 1); - } -#endif - Buffer = VfatGetUserBuffer(IrpContext->Irp); - - if (!ExAcquireResourceSharedLite(&pFcb->MainResource, - (BOOLEAN)(IrpContext->Flags & IRPCONTEXT_CANWAIT))) - { - RC = VfatLockUserBuffer(IrpContext->Irp, BufferLength, IoWriteAccess); - if (NT_SUCCESS(RC)) - { - RC = STATUS_PENDING; - } - return RC; - } - - /* Obtain the callers parameters */ -#ifdef _MSC_VER - /* HACKHACK: Bug in the MS ntifs.h header: - * FileName is really a PUNICODE_STRING, not a PSTRING */ - pSearchPattern = (PUNICODE_STRING)Stack->Parameters.QueryDirectory.FileName; -#else - pSearchPattern = Stack->Parameters.QueryDirectory.FileName; -#endif - FileInformationClass = - Stack->Parameters.QueryDirectory.FileInformationClass; - if (pSearchPattern) - { - if (!pCcb->SearchPattern.Buffer) - { - FirstQuery = TRUE; - pCcb->SearchPattern.MaximumLength = pSearchPattern->Length + sizeof(WCHAR); - pCcb->SearchPattern.Buffer = ExAllocatePoolWithTag(NonPagedPool, pCcb->SearchPattern.MaximumLength, TAG_VFAT); - if (!pCcb->SearchPattern.Buffer) + { + DirContext.DirIndex = pCcb->Entry; + } + + DPRINT("Buffer=%p tofind=%wZ\n", Buffer, &pCcb->SearchPattern); + + DirContext.LongNameU.Buffer = LongNameBuffer; + DirContext.LongNameU.MaximumLength = sizeof(LongNameBuffer); + DirContext.ShortNameU.Buffer = ShortNameBuffer; + DirContext.ShortNameU.MaximumLength = sizeof(ShortNameBuffer); + + while ((Status == STATUS_SUCCESS) && (BufferLength > 0)) + { + Status = FindFile(IrpContext->DeviceExt, + pFcb, + &pCcb->SearchPattern, + &DirContext, + FirstCall); + pCcb->Entry = DirContext.DirIndex; + + DPRINT("Found %wZ, Status=%x, entry %x\n", &DirContext.LongNameU, Status, pCcb->Entry); + + FirstCall = FALSE; + if (NT_SUCCESS(Status)) + { + switch (FileInformationClass) { - ExReleaseResourceLite(&pFcb->MainResource); - return STATUS_INSUFFICIENT_RESOURCES; + case FileNameInformation: + Status = VfatGetFileNameInformation(&DirContext, + (PFILE_NAMES_INFORMATION)Buffer, + BufferLength); + break; + + case FileDirectoryInformation: + Status = VfatGetFileDirectoryInformation(&DirContext, + IrpContext->DeviceExt, + (PFILE_DIRECTORY_INFORMATION)Buffer, + BufferLength); + break; + + case FileFullDirectoryInformation: + Status = VfatGetFileFullDirectoryInformation(&DirContext, + IrpContext->DeviceExt, + (PFILE_FULL_DIR_INFORMATION)Buffer, + BufferLength); + break; + + case FileBothDirectoryInformation: + Status = VfatGetFileBothInformation(&DirContext, + IrpContext->DeviceExt, + (PFILE_BOTH_DIR_INFORMATION)Buffer, + BufferLength); + break; + + default: + Status = STATUS_INVALID_INFO_CLASS; + break; } - RtlCopyUnicodeString(&pCcb->SearchPattern, pSearchPattern); - pCcb->SearchPattern.Buffer[pCcb->SearchPattern.Length / sizeof(WCHAR)] = 0; - } - } - else if (!pCcb->SearchPattern.Buffer) - { - FirstQuery = TRUE; - pCcb->SearchPattern.MaximumLength = 2 * sizeof(WCHAR); - pCcb->SearchPattern.Buffer = ExAllocatePoolWithTag(NonPagedPool, 2 * sizeof(WCHAR), TAG_VFAT); - if (!pCcb->SearchPattern.Buffer) - { - ExReleaseResourceLite(&pFcb->MainResource); - return STATUS_INSUFFICIENT_RESOURCES; - } - pCcb->SearchPattern.Buffer[0] = L'*'; - pCcb->SearchPattern.Buffer[1] = 0; - pCcb->SearchPattern.Length = sizeof(WCHAR); - } - - if (IrpContext->Stack->Flags & SL_INDEX_SPECIFIED) - { - DirContext.DirIndex = pCcb->Entry = Stack->Parameters.QueryDirectory.FileIndex; - } - else if (FirstQuery || (IrpContext->Stack->Flags & SL_RESTART_SCAN)) - { - DirContext.DirIndex = pCcb->Entry = 0; - } - else - { - DirContext.DirIndex = pCcb->Entry; - } - - DPRINT ("Buffer=%p tofind=%wZ\n", Buffer, &pCcb->SearchPattern); - - DirContext.LongNameU.Buffer = LongNameBuffer; - DirContext.LongNameU.MaximumLength = sizeof(LongNameBuffer); - DirContext.ShortNameU.Buffer = ShortNameBuffer; - DirContext.ShortNameU.MaximumLength = sizeof(ShortNameBuffer); - - while (RC == STATUS_SUCCESS && BufferLength > 0) - { - RC = FindFile (IrpContext->DeviceExt, pFcb, - &pCcb->SearchPattern, &DirContext, FirstCall); - pCcb->Entry = DirContext.DirIndex; - DPRINT ("Found %wZ, RC=%x, entry %x\n", &DirContext.LongNameU, RC, pCcb->Entry); - FirstCall = FALSE; - if (NT_SUCCESS (RC)) - { - switch (FileInformationClass) - { - case FileNameInformation: - RC = VfatGetFileNameInformation (&DirContext, - (PFILE_NAMES_INFORMATION) Buffer, - BufferLength); + + if (Status == STATUS_BUFFER_OVERFLOW || Status == STATUS_INVALID_INFO_CLASS) break; - case FileDirectoryInformation: - RC = VfatGetFileDirectoryInformation (&DirContext, - IrpContext->DeviceExt, - (PFILE_DIRECTORY_INFORMATION) Buffer, - BufferLength); - break; - case FileFullDirectoryInformation: - RC = VfatGetFileFullDirectoryInformation (&DirContext, - IrpContext->DeviceExt, - (PFILE_FULL_DIR_INFORMATION) Buffer, - BufferLength); - break; - case FileBothDirectoryInformation: - RC = VfatGetFileBothInformation (&DirContext, - IrpContext->DeviceExt, - (PFILE_BOTH_DIR_INFORMATION) Buffer, - BufferLength); - break; - default: - RC = STATUS_INVALID_INFO_CLASS; - } - if (RC == STATUS_BUFFER_OVERFLOW || RC == STATUS_INVALID_INFO_CLASS) - { - break; - } - } - else - { - if (FirstQuery) - { - RC = STATUS_NO_SUCH_FILE; - } - else - { - RC = STATUS_NO_MORE_FILES; - } - break; - } - Buffer0 = (PFILE_NAMES_INFORMATION) Buffer; - Buffer0->FileIndex = DirContext.DirIndex; - pCcb->Entry = ++DirContext.DirIndex; - BufferLength -= Buffer0->NextEntryOffset; - if (IrpContext->Stack->Flags & SL_RETURN_SINGLE_ENTRY) - { - break; - } - Buffer += Buffer0->NextEntryOffset; - } - if (Buffer0) - { - Buffer0->NextEntryOffset = 0; - RC = STATUS_SUCCESS; - IrpContext->Irp->IoStatus.Information = Stack->Parameters.QueryDirectory.Length - BufferLength; - - } - ExReleaseResourceLite(&pFcb->MainResource); - return RC; -} - - -NTSTATUS VfatDirectoryControl (PVFAT_IRP_CONTEXT IrpContext) + } + else + { + Status = (FirstQuery ? STATUS_NO_SUCH_FILE : STATUS_NO_MORE_FILES); + break; + } + + Buffer0 = (PFILE_NAMES_INFORMATION) Buffer; + Buffer0->FileIndex = DirContext.DirIndex; + pCcb->Entry = ++DirContext.DirIndex; + BufferLength -= Buffer0->NextEntryOffset; + + if (IrpContext->Stack->Flags & SL_RETURN_SINGLE_ENTRY) + break; + + Buffer += Buffer0->NextEntryOffset; + } + + if (Buffer0) + { + Buffer0->NextEntryOffset = 0; + Status = STATUS_SUCCESS; + IrpContext->Irp->IoStatus.Information = Stack->Parameters.QueryDirectory.Length - BufferLength; + } + + ExReleaseResourceLite(&pFcb->MainResource); + + return Status; +} + + /* * FUNCTION: directory control : read/write directory informations */ -{ - NTSTATUS RC = STATUS_SUCCESS; - IrpContext->Irp->IoStatus.Information = 0; - switch (IrpContext->MinorFunction) - { - case IRP_MN_QUERY_DIRECTORY: - RC = DoQuery (IrpContext); - break; - case IRP_MN_NOTIFY_CHANGE_DIRECTORY: - DPRINT (" vfat, dir : change\n"); - RC = STATUS_NOT_IMPLEMENTED; - break; - default: - // error - DbgPrint ("unexpected minor function %x in VFAT driver\n", - IrpContext->MinorFunction); - RC = STATUS_INVALID_DEVICE_REQUEST; - break; - } - if (RC == STATUS_PENDING) - { - RC = VfatQueueRequest(IrpContext); - } - else - { - IrpContext->Irp->IoStatus.Status = RC; - IoCompleteRequest (IrpContext->Irp, IO_NO_INCREMENT); - VfatFreeIrpContext(IrpContext); - } - return RC; -} - - +NTSTATUS +VfatDirectoryControl(PVFAT_IRP_CONTEXT IrpContext) +{ + NTSTATUS Status = STATUS_SUCCESS; + + IrpContext->Irp->IoStatus.Information = 0; + + switch (IrpContext->MinorFunction) + { + case IRP_MN_QUERY_DIRECTORY: + Status = DoQuery (IrpContext); + break; + + case IRP_MN_NOTIFY_CHANGE_DIRECTORY: + DPRINT("VFAT, dir : change\n"); + Status = STATUS_NOT_IMPLEMENTED; + break; + + default: + /* Error */ + DPRINT("Unexpected minor function %x in VFAT driver\n", + IrpContext->MinorFunction); + Status = STATUS_INVALID_DEVICE_REQUEST; + break; + } + + if (Status == STATUS_PENDING) + { + Status = VfatQueueRequest(IrpContext); + } + else + { + IrpContext->Irp->IoStatus.Status = Status; + IoCompleteRequest (IrpContext->Irp, IO_NO_INCREMENT); + VfatFreeIrpContext(IrpContext); + } + + return Status; +} + +/* EOF */
12 years, 3 months
1
0
0
0
[jimtabor] 57245: [SDK|UndocUser] - Add missing scroll flags.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Thu Sep 6 15:44:10 2012 New Revision: 57245 URL:
http://svn.reactos.org/svn/reactos?rev=57245&view=rev
Log: [SDK|UndocUser] - Add missing scroll flags. Modified: trunk/reactos/include/psdk/winuser.h trunk/reactos/include/reactos/undocuser.h Modified: trunk/reactos/include/psdk/winuser.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/winuser.h?rev…
============================================================================== --- trunk/reactos/include/psdk/winuser.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/winuser.h [iso-8859-1] Thu Sep 6 15:44:10 2012 @@ -2501,6 +2501,9 @@ #define SW_SCROLLCHILDREN 1 #define SW_INVALIDATE 2 #define SW_ERASE 4 +#if(WINVER >= 0x0500) +#define SW_SMOOTHSCROLL 16 +#endif #define SC_SIZE 0xF000 #define SC_MOVE 0xF010 #define SC_MINIMIZE 0xF020 Modified: trunk/reactos/include/reactos/undocuser.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/undocuser.…
============================================================================== --- trunk/reactos/include/reactos/undocuser.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/undocuser.h [iso-8859-1] Thu Sep 6 15:44:10 2012 @@ -71,6 +71,9 @@ /* NtUserSetScrollInfo mask to return original position before it is change */ #define SIF_PREVIOUSPOS 4096 +/* ScrollWindow uses the window DC, ScrollWindowEx doesn't */ +#define SW_SCROLLWNDDCE 0x8000 + /* Non SDK Queue state flags. */ #define QS_SMRESULT 0x8000 /* see "Undoc. Windows" */
12 years, 3 months
1
0
0
0
← Newer
1
...
17
18
19
20
21
22
23
24
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
Results per page:
10
25
50
100
200