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
January 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
19 participants
559 discussions
Start a n
N
ew thread
[akhaldi] 55007: [PORTCLS] * Fix a bug in PcNewResourceSublist which led to memory corruption.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Wed Jan 18 23:34:26 2012 New Revision: 55007 URL:
http://svn.reactos.org/svn/reactos?rev=55007&view=rev
Log: [PORTCLS] * Fix a bug in PcNewResourceSublist which led to memory corruption. Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/resource.cpp Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/resource.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/resource.cpp [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/resource.cpp [iso-8859-1] Wed Jan 18 23:34:26 2012 @@ -427,7 +427,7 @@ #endif /* Allocate resource list */ - NewList->m_TranslatedResourceList = (PCM_RESOURCE_LIST)AllocateItem(PoolType, sizeof(CM_RESOURCE_LIST), TAG_PORTCLASS); + NewList->m_TranslatedResourceList = (PCM_RESOURCE_LIST)AllocateItem(PoolType, ResourceSize, TAG_PORTCLASS); if (!NewList->m_TranslatedResourceList) { /* No memory */ @@ -436,7 +436,7 @@ } /* Allocate resource list */ - NewList->m_UntranslatedResourceList = (PCM_RESOURCE_LIST)AllocateItem(PoolType, sizeof(CM_RESOURCE_LIST), TAG_PORTCLASS); + NewList->m_UntranslatedResourceList = (PCM_RESOURCE_LIST)AllocateItem(PoolType, ResourceSize, TAG_PORTCLASS); if (!NewList->m_UntranslatedResourceList) { /* No memory */
12 years, 11 months
1
0
0
0
[khornicek] 55006: [TRANSLATION] - Add Czech resources for devmgmt.
by khornicek@svn.reactos.org
Author: khornicek Date: Wed Jan 18 22:03:05 2012 New Revision: 55006 URL:
http://svn.reactos.org/svn/reactos?rev=55006&view=rev
Log: [TRANSLATION] - Add Czech resources for devmgmt. Added: trunk/reactos/base/applications/mscutils/devmgmt/lang/cs-CZ.rc (with props) Modified: trunk/reactos/base/applications/mscutils/devmgmt/rsrc.rc Added: trunk/reactos/base/applications/mscutils/devmgmt/lang/cs-CZ.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
============================================================================== --- trunk/reactos/base/applications/mscutils/devmgmt/lang/cs-CZ.rc (added) +++ trunk/reactos/base/applications/mscutils/devmgmt/lang/cs-CZ.rc [iso-8859-1] Wed Jan 18 22:03:05 2012 @@ -1,0 +1,82 @@ +LANGUAGE LANG_CZECH, SUBLANG_DEFAULT + +IDR_MAINMENU MENU +BEGIN + POPUP "&Soubor" + BEGIN + MENUITEM "&Konec", IDC_EXIT + END + POPUP "&Akce" + BEGIN + MENUITEM "Tisk", IDC_PRINT, GRAYED + MENUITEM SEPARATOR + MENUITEM "Vlastnosti", IDC_PROP, GRAYED + MENUITEM SEPARATOR + MENUITEM "NápovÄda", IDC_PROGHELP, GRAYED + END + POPUP "&ZobrazenÃ" + BEGIN + MENUITEM "ZaÅÃzenà podle typu", IDC_DEVBYTYPE, CHECKED + MENUITEM "ZaÅÃzenà podle pÅipojenÃ", IDC_STATIC, GRAYED + MENUITEM "ProstÅedky podle typu", IDC_STATIC, GRAYED + MENUITEM "ProstÅedky podle pÅipojenÃ", IDC_STATIC, GRAYED + END + POPUP "NápovÄda" + BEGIN + MENUITEM "NápovÄda", IDC_PROGHELP + MENUITEM "O programu", IDC_ABOUT + END +END + +IDR_POPUP MENU +BEGIN + POPUP "popup" + BEGIN + MENUITEM "Vlastnosti", IDC_PROP, GRAYED + MENUITEM SEPARATOR + MENUITEM "NápovÄda", IDC_PROGHELP + END +END + +IDD_ABOUTBOX DIALOGEX 22,16,190,182 +CAPTION "O Správci zaÅÃzenÃ" +FONT 8,"MS Shell Dlg",0,0 +STYLE DS_SHELLFONT | WS_BORDER | WS_DLGFRAME | WS_SYSMENU | DS_MODALFRAME +BEGIN + LTEXT "Správce zaÅÃzenà v0.1\nCopyright (C) 2006\nby Ged Murphy (gedmurphy(a)gmail.com)", IDC_STATIC, 48, 7, 130, 30 + PUSHBUTTON "ZavÅÃt", IDOK, 75, 162, 44, 15 + ICON IDI_MAIN_ICON, IDC_STATIC, 10, 10, 7, 30 + EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_TOOLTIP_PROP "Vlastnosti" + IDS_TOOLTIP_REFRESH "Obnovit" + IDS_TOOLTIP_HELP "NápovÄda" + IDS_TOOLTIP_EXIT "Konec" +END + +/* Hints */ +STRINGTABLE DISCARDABLE +BEGIN + IDS_APPNAME "ReactOS Správce zaÅÃzenÃ" + IDS_HINT_BLANK " " + IDS_HINT_EXIT " UkonÄit pogram." + IDS_HINT_REFRESH " Obnovit seznam zaÅÃzenÃ." + IDS_HINT_PROP " Zobrazit kartu vlastnostà pro vybranou položku." + IDS_HINT_HELP " Zobrazit nápovÄdu." + IDS_HINT_ABOUT " O ReactOS Správci zaÅÃzenÃ." + + IDS_HINT_SYS_RESTORE " Obnovà normálnà velikost okna." + IDS_HINT_SYS_MOVE " PÅesune okno." + IDS_HINT_SYS_SIZE " ZmÄnà velikost okna." + IDS_HINT_SYS_MINIMIZE " Minimalizuje okno." + IDS_HINT_SYS_MAXIMIZE " Maximalizuje okno." + IDS_HINT_SYS_CLOSE " ZavÅe toto okno." +END Propchange: trunk/reactos/base/applications/mscutils/devmgmt/lang/cs-CZ.rc ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/base/applications/mscutils/devmgmt/rsrc.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
============================================================================== --- trunk/reactos/base/applications/mscutils/devmgmt/rsrc.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/mscutils/devmgmt/rsrc.rc [iso-8859-1] Wed Jan 18 22:03:05 2012 @@ -15,6 +15,7 @@ // UTF-8 #pragma code_page(65001) #include "lang/bg-BG.rc" +#include "lang/cs-CZ.rc" #include "lang/de-DE.rc" #include "lang/el-GR.rc" #include "lang/en-US.rc"
12 years, 11 months
1
0
0
0
[rharabien] 55005: [EXPLORER-NEW] - Move helper macros for IDeskBarClient to shlobj.h - Remove duplicated commented out calls (spotted by Amine Khaldi)
by rharabien@svn.reactos.org
Author: rharabien Date: Wed Jan 18 17:02:34 2012 New Revision: 55005 URL:
http://svn.reactos.org/svn/reactos?rev=55005&view=rev
Log: [EXPLORER-NEW] - Move helper macros for IDeskBarClient to shlobj.h - Remove duplicated commented out calls (spotted by Amine Khaldi) Modified: trunk/reactos/base/shell/explorer-new/startmnu.c trunk/reactos/base/shell/explorer-new/todo.h trunk/reactos/include/psdk/shlobj.h Modified: trunk/reactos/base/shell/explorer-new/startmnu.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer-new/st…
============================================================================== --- trunk/reactos/base/shell/explorer-new/startmnu.c [iso-8859-1] (original) +++ trunk/reactos/base/shell/explorer-new/startmnu.c [iso-8859-1] Wed Jan 18 17:02:34 2012 @@ -818,18 +818,13 @@ (PVOID)&pbb); if (SUCCEEDED(hRet)) { - // hRet = IBanneredBar_SetBitmap(pbb, - // hbmBanner); hRet = IBanneredBar_SetBitmap(pbb, hbmBanner); /* Update the icon size */ - //hRet = IBanneredBar_SetIconSize(pbb, - // bSmallIcons ? BMICON_SMALL : BMICON_LARGE); hRet = IBanneredBar_SetIconSize(pbb, bSmallIcons ? BMICON_SMALL : BMICON_LARGE); - //IBanneredBar_Release(pbb); IBanneredBar_Release(pbb); } @@ -888,10 +883,7 @@ hr = IMenuPopup_QueryInterface(pMp, &IID_IInitializeObject, (PVOID*)&pIo); if (SUCCEEDED(hr)) { - //hr = IInitializeObject_Initialize(pIo); hr = IInitializeObject_Initialize(pIo); - - //IInitializeObject_Release(pIo); IInitializeObject_Release(pIo); } else Modified: trunk/reactos/base/shell/explorer-new/todo.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer-new/to…
============================================================================== --- trunk/reactos/base/shell/explorer-new/todo.h [iso-8859-1] (original) +++ trunk/reactos/base/shell/explorer-new/todo.h [iso-8859-1] Wed Jan 18 17:02:34 2012 @@ -1,29 +1,11 @@ #pragma once - -#ifdef INTERFACE -#undef INTERFACE -#endif /* FIXME: Ugly hack!!! FIX ASAP! Move to uuid! */ static const GUID VID_HACK_LargeIcons = {0x0057D0E0, 0x3573, 0x11CF, {0xAE, 0x69, 0x08, 0x00, 0x2B, 0x2E, 0x12, 0x62}}; #define VID_LargeIcons VID_HACK_LargeIcons -static const GUID IID_HACK_IDeskBarClient = {0xEB0FE175, 0x1A3A, 0x11D0, {0x89, 0xB3, 0x00, 0xA0, 0xC9, 0x0A, 0x90, 0xAC}}; -#define IID_IDeskBarClient IID_HACK_IDeskBarClient static const GUID IID_HACK_IDeskBar = {0xEB0FE173, 0x1A3A, 0x11D0, {0x89, 0xB3, 0x00, 0xA0, 0xC9, 0x0A, 0x90, 0xAC}}; #define IID_IDeskBar IID_HACK_IDeskBar static const GUID SID_HACK_SMenuPopup = {0xD1E7AFEB,0x6A2E,0x11D0,{0x8C,0x78,0x00,0xC0,0x4F,0xD9,0x18,0xB4}}; #define SID_SMenuPopup SID_HACK_SMenuPopup - -#ifdef COBJMACROS -#define IDeskBarClient_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b) -#define IDeskBarClient_AddRef(T) (T)->lpVtbl->AddRef(T) -#define IDeskBarClient_Release(T) (T)->lpVtbl->Release(T) -#define IDeskBarClient_GetWindow(T,a) (T)->lpVtbl->GetWindow(T,a) -#define IDeskBarClient_ContextSensitiveHelp(T,a) (T)->lpVtbl->ContextSensitiveHelp(T,a) -#define IDeskBarClient_SetDeskBarSite(T,a) (T)->lpVtbl->SetDeskBarSite(T,a) -#define IDeskBarClient_SetModeDBC(T,a) (T)->lpVtbl->SetModeDBC(T,a) -#define IDeskBarClient_UIActivateDBC(T,a) (T)->lpVtbl->UIActivateDBC(T,a) -#define IDeskBarClient_GetSize(T,a,b) (T)->lpVtbl->GetSize(T,a,b) -#endif Modified: trunk/reactos/include/psdk/shlobj.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/shlobj.h?rev=…
============================================================================== --- trunk/reactos/include/psdk/shlobj.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/shlobj.h [iso-8859-1] Wed Jan 18 17:02:34 2012 @@ -744,6 +744,21 @@ }; #undef INTERFACE +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDeskBarClient_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDeskBarClient_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDeskBarClient_Release(p) (p)->lpVtbl->Release(p) +/*** IOleWindow methods ***/ +#define IDeskBarClient_GetWindow(p,a) (p)->lpVtbl->GetWindow(p,a) +#define IDeskBarClient_ContextSensitiveHelp(p,a) (p)->lpVtbl->ContextSensitiveHelp(p,a) +/*** IOleWindow IDeskBarClient ***/ +#define IDeskBarClient_SetDeskBarSite(p,a) (p)->lpVtbl->SetDeskBarSite(p,a) +#define IDeskBarClient_SetModeDBC(p,a) (p)->lpVtbl->SetModeDBC(p,a) +#define IDeskBarClient_UIActivateDBC(p,a) (p)->lpVtbl->UIActivateDBC(p,a) +#define IDeskBarClient_GetSize(p,a,b) (p)->lpVtbl->GetSize(p,a,b) +#endif + #define DBC_GS_IDEAL 0 #define DBC_GS_SIZEDOWN 1
12 years, 11 months
1
0
0
0
[rharabien] 55004: [EXPLORER-NEW] - Use macros for calling IBanneredBar methods - Remove some definitions from todo header because they are already in shlguid_undoc.h
by rharabien@svn.reactos.org
Author: rharabien Date: Wed Jan 18 16:23:13 2012 New Revision: 55004 URL:
http://svn.reactos.org/svn/reactos?rev=55004&view=rev
Log: [EXPLORER-NEW] - Use macros for calling IBanneredBar methods - Remove some definitions from todo header because they are already in shlguid_undoc.h Modified: trunk/reactos/base/shell/explorer-new/startmnu.c trunk/reactos/base/shell/explorer-new/todo.h Modified: trunk/reactos/base/shell/explorer-new/startmnu.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer-new/st…
============================================================================== --- trunk/reactos/base/shell/explorer-new/startmnu.c [iso-8859-1] (original) +++ trunk/reactos/base/shell/explorer-new/startmnu.c [iso-8859-1] Wed Jan 18 16:23:13 2012 @@ -820,18 +820,17 @@ { // hRet = IBanneredBar_SetBitmap(pbb, // hbmBanner); - hRet = pbb->lpVtbl->SetBitmap(pbb, - hbmBanner); + hRet = IBanneredBar_SetBitmap(pbb, hbmBanner); /* Update the icon size */ //hRet = IBanneredBar_SetIconSize(pbb, // bSmallIcons ? BMICON_SMALL : BMICON_LARGE); - hRet = pbb->lpVtbl->SetIconSize(pbb, + hRet = IBanneredBar_SetIconSize(pbb, bSmallIcons ? BMICON_SMALL : BMICON_LARGE); //IBanneredBar_Release(pbb); - pbb->lpVtbl->Release(pbb); + IBanneredBar_Release(pbb); } return hRet; @@ -890,10 +889,10 @@ if (SUCCEEDED(hr)) { //hr = IInitializeObject_Initialize(pIo); - hr = pIo->lpVtbl->Initialize(pIo); + hr = IInitializeObject_Initialize(pIo); //IInitializeObject_Release(pIo); - pIo->lpVtbl->Release(pIo); + IInitializeObject_Release(pIo); } else hr = S_OK; Modified: trunk/reactos/base/shell/explorer-new/todo.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer-new/to…
============================================================================== --- trunk/reactos/base/shell/explorer-new/todo.h [iso-8859-1] (original) +++ trunk/reactos/base/shell/explorer-new/todo.h [iso-8859-1] Wed Jan 18 16:23:13 2012 @@ -5,10 +5,6 @@ #endif /* FIXME: Ugly hack!!! FIX ASAP! Move to uuid! */ -static const GUID IID_HACK_IShellView2 = {0x88E39E80,0x3578,0x11CF,{0xAE,0x69,0x08,0x00,0x2B,0x2E,0x12,0x62}}; -#define IID_IShellView2 IID_HACK_IShellView2 -static const GUID IID_HACK_IShellView3 = {0xEC39FA88,0xF8AF,0x41CF,{0x84,0x21,0x38,0xBE,0xD2,0x8F,0x46,0x73}}; -#define IID_IShellView3 IID_HACK_IShellView2 static const GUID VID_HACK_LargeIcons = {0x0057D0E0, 0x3573, 0x11CF, {0xAE, 0x69, 0x08, 0x00, 0x2B, 0x2E, 0x12, 0x62}}; #define VID_LargeIcons VID_HACK_LargeIcons @@ -16,14 +12,6 @@ #define IID_IDeskBarClient IID_HACK_IDeskBarClient static const GUID IID_HACK_IDeskBar = {0xEB0FE173, 0x1A3A, 0x11D0, {0x89, 0xB3, 0x00, 0xA0, 0xC9, 0x0A, 0x90, 0xAC}}; #define IID_IDeskBar IID_HACK_IDeskBar - -static const GUID IID_HACK_IMenuPopup = {0xD1E7AFEB,0x6A2E,0x11D0,{0x8C,0x78,0x00,0xC0,0x4F,0xD9,0x18,0xB4}}; -#define IID_IMenuPopup IID_HACK_IMenuPopup -static const GUID IID_HACK_IBanneredBar = {0x596A9A94,0x013E,0x11D1,{0x8D,0x34,0x00,0xA0,0xC9,0x0F,0x27,0x19}}; -#define IID_IBanneredBar IID_HACK_IBanneredBar - -static const GUID IID_HACK_IInitializeObject = {0x4622AD16,0xFF23,0x11D0,{0x8D,0x34,0x00,0xA0,0xC9,0x0F,0x27,0x19}}; -#define IID_IInitializeObject IID_HACK_IInitializeObject static const GUID SID_HACK_SMenuPopup = {0xD1E7AFEB,0x6A2E,0x11D0,{0x8C,0x78,0x00,0xC0,0x4F,0xD9,0x18,0xB4}}; #define SID_SMenuPopup SID_HACK_SMenuPopup
12 years, 11 months
1
0
0
0
[khornicek] 55003: [MSTSC] - Fix some corner cases for settings parsing (empty values, values containing delimiters). - If provided, take port number into account.
by khornicek@svn.reactos.org
Author: khornicek Date: Wed Jan 18 13:09:18 2012 New Revision: 55003 URL:
http://svn.reactos.org/svn/reactos?rev=55003&view=rev
Log: [MSTSC] - Fix some corner cases for settings parsing (empty values, values containing delimiters). - If provided, take port number into account. Modified: trunk/reactos/base/applications/mstsc/settings.c trunk/reactos/base/applications/mstsc/win32.c Modified: trunk/reactos/base/applications/mstsc/settings.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mstsc/se…
============================================================================== --- trunk/reactos/base/applications/mstsc/settings.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/mstsc/settings.c [iso-8859-1] Wed Jan 18 13:09:18 2012 @@ -230,6 +230,7 @@ { LPWSTR lpStr = lpBuffer; WCHAR szSeps[] = L":\r\n"; + WCHAR szNewline[] = L"\r\n"; LPWSTR lpToken; BOOL bFound; INT i; @@ -258,7 +259,7 @@ else if (lpToken[0] == L's') { pRdpSettings->pSettings[i].Type = lpToken[0]; - lpToken = wcstok(NULL, szSeps); + lpToken = wcstok(NULL, szNewline); if (lpToken != NULL) wcscpy(pRdpSettings->pSettings[i].Value.s, lpToken); } @@ -268,10 +269,7 @@ /* move past the type and value */ if (!bFound) - { - lpToken = wcstok(NULL, szSeps); - lpToken = wcstok(NULL, szSeps); - } + lpToken = wcstok(NULL, szNewline); /* move to next key */ lpToken = wcstok(NULL, szSeps); Modified: trunk/reactos/base/applications/mstsc/win32.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mstsc/wi…
============================================================================== --- trunk/reactos/base/applications/mstsc/win32.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/mstsc/win32.c [iso-8859-1] Wed Jan 18 13:09:18 2012 @@ -958,6 +958,29 @@ } +static INT +GetPortNumber(PCHAR szAddress) +{ + PCHAR szPort; + INT iPort = TCP_PORT_RDP; + + szPort = strtok(szAddress, ":"); + + if (szPort != NULL) + { + szPort = strtok(NULL, ":"); + + if (szPort != NULL) + { + iPort = atoi(szPort); + + if (iPort <= 0 || iPort > 0xFFFF) + iPort = TCP_PORT_RDP; + } + } + + return iPort; +} static BOOL ParseCommandLine(LPWSTR lpCmdLine, @@ -1051,8 +1074,9 @@ uni_to_str(szValue, GetStringFromSettings(pRdpSettings, L"full address")); + /* GetPortNumber also removes possible trailing port number from address */ + g_tcp_port_rdp = GetPortNumber(szValue); strcpy(g_servername, szValue); - //g_port = 3389; strcpy(g_username, ""); strcpy(g_password, ""); g_server_depth = GetIntegerFromSettings(pRdpSettings, L"session bpp");
12 years, 11 months
1
0
0
0
[akhaldi] 55002: [PORTCLS] * Fix some memory leaks. * Add some comments. * Fix broken PcNewResourceSublist which ignored the MaximumEntries parameter. * Add more checks.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Tue Jan 17 23:42:13 2012 New Revision: 55002 URL:
http://svn.reactos.org/svn/reactos?rev=55002&view=rev
Log: [PORTCLS] * Fix some memory leaks. * Add some comments. * Fix broken PcNewResourceSublist which ignored the MaximumEntries parameter. * Add more checks. Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/resource.cpp Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/resource.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/resource.cpp [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/resource.cpp [iso-8859-1] Tue Jan 17 23:42:13 2012 @@ -34,11 +34,9 @@ } IMP_IResourceList; -#ifdef BUILD_WDK - ULONG NTAPI NumberOfEntries(); -#endif - CResourceList(IUnknown * OuterUnknown) : m_OuterUnknown(OuterUnknown), m_PoolType(NonPagedPool), m_TranslatedResourceList(0), m_UntranslatedResourceList(0), m_NumberOfEntries(0) {} - virtual ~CResourceList() {} + + CResourceList(IUnknown * OuterUnknown) : m_OuterUnknown(OuterUnknown), m_PoolType(NonPagedPool), m_TranslatedResourceList(0), m_UntranslatedResourceList(0), m_NumberOfEntries(0), m_MaxEntries(0), m_Ref(0) {} + virtual ~CResourceList(); public: PUNKNOWN m_OuterUnknown; @@ -46,10 +44,24 @@ PCM_RESOURCE_LIST m_TranslatedResourceList; PCM_RESOURCE_LIST m_UntranslatedResourceList; ULONG m_NumberOfEntries; - + ULONG m_MaxEntries; LONG m_Ref; }; +CResourceList::~CResourceList() +{ + if (m_TranslatedResourceList) + { + /* Free resource list */ + FreeItem(m_TranslatedResourceList, TAG_PORTCLASS); + } + + if (m_UntranslatedResourceList) + { + /* Free resource list */ + FreeItem(m_UntranslatedResourceList, TAG_PORTCLASS); + } +} NTSTATUS NTAPI @@ -75,7 +87,7 @@ return STATUS_UNSUCCESSFUL; } -#if 1 + ULONG NTAPI CResourceList::NumberOfEntries() @@ -84,7 +96,6 @@ return m_NumberOfEntries; } -#endif ULONG NTAPI @@ -92,38 +103,26 @@ IN CM_RESOURCE_TYPE Type) { ULONG Index, Count = 0; - PCM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptor, UnPartialDescriptor; - - PC_ASSERT_IRQL_EQUAL(PASSIVE_LEVEL); - - if (!m_TranslatedResourceList) - { - // no resource list + PCM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptor; + + PC_ASSERT_IRQL_EQUAL(PASSIVE_LEVEL); + + /* Is there a resource list? */ + if (!m_UntranslatedResourceList) + { + /* No resource list provided */ return 0; } - PC_ASSERT(m_TranslatedResourceList->List[0].PartialResourceList.Count == m_UntranslatedResourceList->List[0].PartialResourceList.Count); - // I guess the translated and untranslated lists will be same length? - for (Index = 0; Index < m_TranslatedResourceList->List[0].PartialResourceList.Count; Index ++ ) - { - PartialDescriptor = &m_TranslatedResourceList->List[0].PartialResourceList.PartialDescriptors[Index]; - UnPartialDescriptor = &m_UntranslatedResourceList->List[0].PartialResourceList.PartialDescriptors[Index]; - DPRINT("Descriptor Type %u\n", PartialDescriptor->Type); + + for (Index = 0; Index < m_NumberOfEntries; Index ++ ) + { + + /* Get descriptor */ + PartialDescriptor = &m_UntranslatedResourceList->List[0].PartialResourceList.PartialDescriptors[Index]; if (PartialDescriptor->Type == Type) { - // Yay! Finally found one that matches! + /* Yay! Finally found one that matches! */ Count++; - } - - if (PartialDescriptor->Type == CmResourceTypeInterrupt) - { - DPRINT("Index %u TRANS Interrupt Number Affinity %x Level %u Vector %u Flags %x Share %x\n", Index, PartialDescriptor->u.Interrupt.Affinity, PartialDescriptor->u.Interrupt.Level, PartialDescriptor->u.Interrupt.Vector, PartialDescriptor->Flags, PartialDescriptor->ShareDisposition); - DPRINT("Index %u UNTRANS Interrupt Number Affinity %x Level %u Vector %u Flags %x Share %x\\n", Index, UnPartialDescriptor->u.Interrupt.Affinity, UnPartialDescriptor->u.Interrupt.Level, UnPartialDescriptor->u.Interrupt.Vector, UnPartialDescriptor->Flags, UnPartialDescriptor->ShareDisposition); - - } - else if (PartialDescriptor->Type == CmResourceTypePort) - { - DPRINT("Index %u TRANS Port Length %u Start %u %u Flags %x Share %x\n", Index, PartialDescriptor->u.Port.Length, PartialDescriptor->u.Port.Start.HighPart, PartialDescriptor->u.Port.Start.LowPart, PartialDescriptor->Flags, PartialDescriptor->ShareDisposition); - DPRINT("Index %u UNTRANS Port Length %u Start %u %u Flags %x Share %x\n", Index, UnPartialDescriptor->u.Port.Length, UnPartialDescriptor->u.Port.Start.HighPart, UnPartialDescriptor->u.Port.Start.LowPart, UnPartialDescriptor->Flags, UnPartialDescriptor->ShareDisposition); } } @@ -142,27 +141,33 @@ PC_ASSERT_IRQL_EQUAL(PASSIVE_LEVEL); + /* Is there a resource list? */ if (!m_TranslatedResourceList) { - // no resource list + /* No resource list */ return NULL; } - for (DescIndex = 0; DescIndex < m_TranslatedResourceList->List[0].PartialResourceList.Count; DescIndex ++ ) - { + for (DescIndex = 0; DescIndex < m_NumberOfEntries; DescIndex ++ ) + { + /* Get descriptor */ PartialDescriptor = &m_TranslatedResourceList->List[0].PartialResourceList.PartialDescriptors[DescIndex]; if (PartialDescriptor->Type == Type) { - // Yay! Finally found one that matches! + /* Found type, is it the requested index? */ if (Index == Count) { + /* Found */ return PartialDescriptor; } + + /* Need to continue search */ Count++; } } + /* No such descriptor */ return NULL; } @@ -177,26 +182,34 @@ PC_ASSERT_IRQL_EQUAL(PASSIVE_LEVEL); + /* Is there a resource list? */ if (!m_UntranslatedResourceList) { - // no resource list + /* Empty resource list */ return NULL; } - for (DescIndex = 0; DescIndex < m_UntranslatedResourceList->List[0].PartialResourceList.Count; DescIndex ++ ) - { + /* Search descriptors */ + for (DescIndex = 0; DescIndex < m_NumberOfEntries; DescIndex ++ ) + { + /* Get descriptor */ PartialDescriptor = &m_UntranslatedResourceList->List[0].PartialResourceList.PartialDescriptors[DescIndex]; if (PartialDescriptor->Type == Type) { - // Yay! Finally found one that matches! + /* Found type, is it the requested index? */ if (Index == Count) { + /* Found */ return PartialDescriptor; } + + /* Need to continue search */ Count++; } } + + /* No such descriptor */ return NULL; } @@ -206,68 +219,37 @@ IN PCM_PARTIAL_RESOURCE_DESCRIPTOR Translated, IN PCM_PARTIAL_RESOURCE_DESCRIPTOR Untranslated) { - PCM_RESOURCE_LIST NewUntranslatedResources, NewTranslatedResources; - ULONG NewTranslatedSize, NewUntranslatedSize, TranslatedSize, UntranslatedSize, ResourceCount; - - PC_ASSERT_IRQL_EQUAL(PASSIVE_LEVEL); - - // calculate translated resource list size - ResourceCount = m_TranslatedResourceList->List[0].PartialResourceList.Count; -#ifdef _MSC_VER - NewTranslatedSize = FIELD_OFFSET(CM_RESOURCE_LIST, List[0].PartialResourceList.PartialDescriptors[ResourceCount+1]); - TranslatedSize = FIELD_OFFSET(CM_RESOURCE_LIST, List[0].PartialResourceList.PartialDescriptors[ResourceCount]); -#else - NewTranslatedSize = sizeof(CM_RESOURCE_LIST) - sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR) + (ResourceCount+1) * sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR); - TranslatedSize = sizeof(CM_RESOURCE_LIST) - sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR) + (ResourceCount) * sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR); -#endif - NewTranslatedResources = (PCM_RESOURCE_LIST)AllocateItem(m_PoolType, NewTranslatedSize, TAG_PORTCLASS); - if (!NewTranslatedResources) - return STATUS_INSUFFICIENT_RESOURCES; - - - // calculate untranslated resouce list size - ResourceCount = m_UntranslatedResourceList->List[0].PartialResourceList.Count; - -#ifdef _MSC_VER - NewUntranslatedSize = FIELD_OFFSET(CM_RESOURCE_LIST, List[0].PartialResourceList.PartialDescriptors[ResourceCount+1]); - UntranslatedSize = FIELD_OFFSET(CM_RESOURCE_LIST, List[0].PartialResourceList.PartialDescriptors[ResourceCount]); -#else - NewUntranslatedSize = sizeof(CM_RESOURCE_LIST) - sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR) + (ResourceCount+1) * sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR); - UntranslatedSize = sizeof(CM_RESOURCE_LIST) - sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR) + (ResourceCount) * sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR); -#endif - - - // allocate untranslated resource list size - NewUntranslatedResources = (PCM_RESOURCE_LIST)AllocateItem(m_PoolType, NewUntranslatedSize, TAG_PORTCLASS); - if (!NewUntranslatedResources) - { - FreeItem(NewTranslatedResources, TAG_PORTCLASS); - return STATUS_INSUFFICIENT_RESOURCES; - } - - // now copy translated resource list - RtlMoveMemory(NewTranslatedResources, m_TranslatedResourceList, TranslatedSize); - RtlMoveMemory((PUCHAR)NewTranslatedResources + TranslatedSize, Translated, sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR)); - - // now copy untranslated resource list - RtlMoveMemory(NewUntranslatedResources, m_UntranslatedResourceList, UntranslatedSize); - RtlMoveMemory((PUCHAR)NewUntranslatedResources + UntranslatedSize, Untranslated, sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR)); - - // free old lists - FreeItem(m_TranslatedResourceList, TAG_PORTCLASS); - FreeItem(m_UntranslatedResourceList, TAG_PORTCLASS); - - // store new lists - m_UntranslatedResourceList = NewUntranslatedResources; - m_TranslatedResourceList = NewTranslatedResources; - - // increment descriptor count - NewUntranslatedResources->List[0].PartialResourceList.Count++; - NewTranslatedResources->List[0].PartialResourceList.Count++; - - // add entry count + PCM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptor; + + /* Sanity check */ + PC_ASSERT_IRQL_EQUAL(PASSIVE_LEVEL); + + + /* Is there still room for another entry */ + if (m_NumberOfEntries >= m_MaxEntries) + { + /* No more space */ + return STATUS_INSUFFICIENT_RESOURCES; + } + + /* Get free descriptor */ + PartialDescriptor = &m_UntranslatedResourceList->List[0].PartialResourceList.PartialDescriptors[m_NumberOfEntries]; + + /* Copy descriptor */ + RtlCopyMemory(PartialDescriptor, Untranslated, sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR)); + + /* Get free descriptor */ + PartialDescriptor = &m_TranslatedResourceList->List[0].PartialResourceList.PartialDescriptors[m_NumberOfEntries]; + + /* Copy descriptor */ + RtlCopyMemory(PartialDescriptor, Translated, sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR)); + + /* Add entry count */ m_NumberOfEntries++; - + m_UntranslatedResourceList->List[0].PartialResourceList.Count++; + m_TranslatedResourceList->List[0].PartialResourceList.Count++; + + /* Done */ return STATUS_SUCCESS; } @@ -282,16 +264,18 @@ PC_ASSERT_IRQL_EQUAL(PASSIVE_LEVEL); + /* Get entries from parent */ Translated = Parent->FindTranslatedEntry(Type, Index); Untranslated = Parent->FindUntranslatedEntry(Type, Index); + /* Are both found? */ if (Translated && Untranslated) { - // add entry from parent + /* Add entry from parent */ return AddEntry(Translated, Untranslated); } - // entry not found + /* Entry not found */ return STATUS_INVALID_PARAMETER; } @@ -325,99 +309,92 @@ IN PCM_RESOURCE_LIST UntranslatedResourceList) { PCM_RESOURCE_LIST NewUntranslatedResources, NewTranslatedResources; - ULONG NewTranslatedSize, NewUntranslatedSize, ResourceCount; + ULONG ResourceSize, ResourceCount; CResourceList* NewList; NTSTATUS Status; if (!TranslatedResourceList) { - // - // if the untranslated resource list is also not provided, it becomes an empty resource list - // + /* If the untranslated resource list is also not provided, it becomes an empty resource list */ if (UntranslatedResourceList) { - // invalid parameter mix + /* Invalid parameter mix */ return STATUS_INVALID_PARAMETER; } } else { - // - // if the translated resource list is also not provided, it becomes an empty resource list - // + /* If the translated resource list is also not provided, it becomes an empty resource list */ if (!UntranslatedResourceList) { - // invalid parameter mix + /* Invalid parameter mix */ return STATUS_INVALID_PARAMETER; } } + /* Allocate resource list */ NewList = new(PoolType, TAG_PORTCLASS)CResourceList(OuterUnknown); if (!NewList) return STATUS_INSUFFICIENT_RESOURCES; + /* Query resource list */ Status = NewList->QueryInterface(IID_IResourceList, (PVOID*)OutResourceList); - if (!NT_SUCCESS(Status)) { - // - // Ouch, FIX ME - // + /* Ouch, FIX ME */ delete NewList; return STATUS_INVALID_PARAMETER; } + /* Is there a resource list */ if (!TranslatedResourceList) { - // - // empty resource list - // + /* Empty resource list */ return STATUS_SUCCESS; } - // calculate translated resource list size - ResourceCount = TranslatedResourceList->List[0].PartialResourceList.Count; -#ifdef _MSC_VER - NewTranslatedSize = FIELD_OFFSET(CM_RESOURCE_LIST, List[0].PartialResourceList.PartialDescriptors[ResourceCount]); -#else - NewTranslatedSize = sizeof(CM_RESOURCE_LIST) - sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR) + (ResourceCount) * sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR); -#endif - - // store resource count - NewList->m_NumberOfEntries = ResourceCount; - - // calculate untranslated resouce list size + /* Sanity check */ + ASSERT(UntranslatedResourceList->List[0].PartialResourceList.Count == TranslatedResourceList->List[0].PartialResourceList.Count); + + /* Get resource count */ ResourceCount = UntranslatedResourceList->List[0].PartialResourceList.Count; #ifdef _MSC_VER - NewUntranslatedSize = FIELD_OFFSET(CM_RESOURCE_LIST, List[0].PartialResourceList.PartialDescriptors[ResourceCount]); + ResourceSize = FIELD_OFFSET(CM_RESOURCE_LIST, List[0].PartialResourceList.PartialDescriptors[ResourceCount]); #else - NewUntranslatedSize = sizeof(CM_RESOURCE_LIST) - sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR) + (ResourceCount) * sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR); + ResourceSize = sizeof(CM_RESOURCE_LIST) - sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR) + (ResourceCount) * sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR); #endif - // allocate translated resource list - NewTranslatedResources = (PCM_RESOURCE_LIST)AllocateItem(PoolType, NewTranslatedSize, TAG_PORTCLASS); + /* Allocate translated resource list */ + NewTranslatedResources = (PCM_RESOURCE_LIST)AllocateItem(PoolType, ResourceSize, TAG_PORTCLASS); if (!NewTranslatedResources) { + /* No memory */ delete NewList; return STATUS_INSUFFICIENT_RESOURCES; } - // allocate untranslated resource list - NewUntranslatedResources = (PCM_RESOURCE_LIST)AllocateItem(PoolType, NewUntranslatedSize, TAG_PORTCLASS); + /* Allocate untranslated resource list */ + NewUntranslatedResources = (PCM_RESOURCE_LIST)AllocateItem(PoolType, ResourceSize, TAG_PORTCLASS); if (!NewUntranslatedResources) { + /* No memory */ delete NewList; - return STATUS_INSUFFICIENT_RESOURCES; - } - - // copy resource lists - RtlCopyMemory(NewTranslatedResources, TranslatedResourceList, NewTranslatedSize); - RtlCopyMemory(NewUntranslatedResources, UntranslatedResourceList, NewUntranslatedSize); - - // store resource lists + FreeItem(NewTranslatedResources, TAG_PORTCLASS); + return STATUS_INSUFFICIENT_RESOURCES; + } + + /* Copy resource lists */ + RtlCopyMemory(NewTranslatedResources, TranslatedResourceList, ResourceSize); + RtlCopyMemory(NewUntranslatedResources, UntranslatedResourceList, ResourceSize); + + /* Init resource list */ NewList->m_TranslatedResourceList= NewTranslatedResources; NewList->m_UntranslatedResourceList = NewUntranslatedResources; - + NewList->m_NumberOfEntries = ResourceCount; + NewList->m_MaxEntries = ResourceCount; + NewList->m_PoolType = PoolType; + + /* Done */ return STATUS_SUCCESS; } @@ -431,53 +408,60 @@ IN PRESOURCELIST ParentList, IN ULONG MaximumEntries) { - CResourceList* NewList, *Parent; + CResourceList* NewList; + ULONG ResourceSize; if (!OutResourceList || !ParentList || !MaximumEntries) return STATUS_INVALID_PARAMETER; - Parent = (CResourceList*)ParentList; - - if (!Parent->m_TranslatedResourceList->List[0].PartialResourceList.Count || - !Parent->m_UntranslatedResourceList->List[0].PartialResourceList.Count) - { - // parent list can't be empty - return STATUS_INVALID_PARAMETER; - } - + /* Allocate new list */ NewList = new(PoolType, TAG_PORTCLASS) CResourceList(OuterUnknown); if (!NewList) return STATUS_INSUFFICIENT_RESOURCES; + /* Get resource size */ +#ifdef _MSC_VER + ResourceSize = FIELD_OFFSET(CM_RESOURCE_LIST, List[0].PartialResourceList.PartialDescriptors[MaximumEntries]); +#else + ResourceSize = sizeof(CM_RESOURCE_LIST) - sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR) + (MaximumEntries) * sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR); +#endif + + /* Allocate resource list */ NewList->m_TranslatedResourceList = (PCM_RESOURCE_LIST)AllocateItem(PoolType, sizeof(CM_RESOURCE_LIST), TAG_PORTCLASS); if (!NewList->m_TranslatedResourceList) { + /* No memory */ delete NewList; return STATUS_INSUFFICIENT_RESOURCES; } + /* Allocate resource list */ NewList->m_UntranslatedResourceList = (PCM_RESOURCE_LIST)AllocateItem(PoolType, sizeof(CM_RESOURCE_LIST), TAG_PORTCLASS); if (!NewList->m_UntranslatedResourceList) { + /* No memory */ delete NewList; return STATUS_INSUFFICIENT_RESOURCES; } - RtlCopyMemory(NewList->m_TranslatedResourceList, Parent->m_TranslatedResourceList, sizeof(CM_RESOURCE_LIST)); - RtlCopyMemory(NewList->m_UntranslatedResourceList, Parent->m_UntranslatedResourceList, sizeof(CM_RESOURCE_LIST)); - - // mark list as empty + /* Copy resource lists */ + RtlCopyMemory(NewList->m_TranslatedResourceList, ParentList->TranslatedList(), sizeof(CM_RESOURCE_LIST)); + RtlCopyMemory(NewList->m_UntranslatedResourceList, ParentList->UntranslatedList(), sizeof(CM_RESOURCE_LIST)); + + /* Resource list is empty */ + NewList->m_UntranslatedResourceList->List[0].PartialResourceList.Count = 0; NewList->m_TranslatedResourceList->List[0].PartialResourceList.Count = 0; - NewList->m_UntranslatedResourceList->List[0].PartialResourceList.Count = 0; - // store members + + /* Store members */ NewList->m_OuterUnknown = OuterUnknown; NewList->m_PoolType = PoolType; NewList->m_Ref = 1; NewList->m_NumberOfEntries = 0; - + NewList->m_MaxEntries = MaximumEntries; + + /* Store result */ *OutResourceList = (IResourceList*)NewList; - DPRINT("PcNewResourceSublist OutResourceList %p OuterUnknown %p ParentList %p\n", *OutResourceList, OuterUnknown, ParentList); + /* Done */ return STATUS_SUCCESS; } -
12 years, 11 months
1
0
0
0
[akhaldi] 55001: [DDK] * Add fltkernel.h.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Tue Jan 17 23:41:54 2012 New Revision: 55001 URL:
http://svn.reactos.org/svn/reactos?rev=55001&view=rev
Log: [DDK] * Add fltkernel.h. Added: trunk/reactos/include/ddk/fltkernel.h (with props) Added: trunk/reactos/include/ddk/fltkernel.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/fltkernel.h?re…
============================================================================== --- trunk/reactos/include/ddk/fltkernel.h (added) +++ trunk/reactos/include/ddk/fltkernel.h [iso-8859-1] Tue Jan 17 23:41:54 2012 @@ -1,0 +1,2849 @@ +/* + * fltkernel.h + * + * This file is part of the ReactOS DDK package. + * + * Contributors: + * Amine Khaldi (amine.khaldi(a)reactos.org) + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAIMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ +#pragma once + +#ifndef __FLTKERNEL__ +#define __FLTKERNEL__ + +#ifdef __cplusplus +extern "C" { +#endif + +#define FLT_MGR_BASELINE (((OSVER(NTDDI_VERSION) == NTDDI_WIN2K) && (SPVER(NTDDI_VERSION) >= SPVER(NTDDI_WIN2KSP4))) || \ + ((OSVER(NTDDI_VERSION) == NTDDI_WINXP) && (SPVER(NTDDI_VERSION) >= SPVER(NTDDI_WINXPSP2))) || \ + ((OSVER(NTDDI_VERSION) == NTDDI_WS03) && (SPVER(NTDDI_VERSION) >= SPVER(NTDDI_WS03SP1))) || \ + (NTDDI_VERSION >= NTDDI_VISTA)) + +#define FLT_MGR_AFTER_XPSP2 (((OSVER(NTDDI_VERSION) == NTDDI_WIN2K) && (SPVER(NTDDI_VERSION) >= SPVER(NTDDI_WIN2KSP4))) || \ + ((OSVER(NTDDI_VERSION) == NTDDI_WINXP) && (SPVER(NTDDI_VERSION) > SPVER(NTDDI_WINXPSP2))) || \ + ((OSVER(NTDDI_VERSION) == NTDDI_WS03) && (SPVER(NTDDI_VERSION) >= SPVER(NTDDI_WS03SP1))) || \ + (NTDDI_VERSION >= NTDDI_VISTA)) + +#define FLT_MGR_LONGHORN (NTDDI_VERSION >= NTDDI_VISTA) +#define FLT_MGR_WIN7 (NTDDI_VERSION >= NTDDI_WIN7) + +#include <ntifs.h> +#include <fltuserstructures.h> +#include <initguid.h> + +#if FLT_MGR_BASELINE + +#if FLT_MGR_LONGHORN +#define FLT_ASSERT(_e) NT_ASSERT(_e) +#define FLT_ASSERTMSG(_m, _e) NT_ASSERTMSG(_m, _e) +#else +#define FLT_ASSERT(_e) ASSERT(_e) +#define FLT_ASSERTMSG(_m, _e) ASSERTMSG(_m, _e) +#endif /* FLT_MGR_LONGHORN */ + +#define Add2Ptr(P,I) ((PVOID)((PUCHAR)(P) + (I))) +#define PtrOffset(B,O) ((ULONG)((ULONG_PTR)(O) - (ULONG_PTR)(B))) + +#define ROUND_TO_SIZE(_length, _alignment) \ + ((((ULONG_PTR)(_length)) + ((_alignment)-1)) & ~(ULONG_PTR) ((_alignment) - 1)) + +#define IS_ALIGNED(_pointer, _alignment) \ + ((((ULONG_PTR) (_pointer)) & ((_alignment) - 1)) == 0) + +#define IRP_MJ_ACQUIRE_FOR_SECTION_SYNCHRONIZATION ((UCHAR)-1) +#define IRP_MJ_RELEASE_FOR_SECTION_SYNCHRONIZATION ((UCHAR)-2) +#define IRP_MJ_ACQUIRE_FOR_MOD_WRITE ((UCHAR)-3) +#define IRP_MJ_RELEASE_FOR_MOD_WRITE ((UCHAR)-4) +#define IRP_MJ_ACQUIRE_FOR_CC_FLUSH ((UCHAR)-5) +#define IRP_MJ_RELEASE_FOR_CC_FLUSH ((UCHAR)-6) +#define IRP_MJ_FAST_IO_CHECK_IF_POSSIBLE ((UCHAR)-13) +#define IRP_MJ_NETWORK_QUERY_OPEN ((UCHAR)-14) +#define IRP_MJ_MDL_READ ((UCHAR)-15) +#define IRP_MJ_MDL_READ_COMPLETE ((UCHAR)-16) +#define IRP_MJ_PREPARE_MDL_WRITE ((UCHAR)-17) +#define IRP_MJ_MDL_WRITE_COMPLETE ((UCHAR)-18) +#define IRP_MJ_VOLUME_MOUNT ((UCHAR)-19) +#define IRP_MJ_VOLUME_DISMOUNT ((UCHAR)-20) +#define IRP_MJ_OPERATION_END ((UCHAR)0x80) +#define FLT_INTERNAL_OPERATION_COUNT 22 + +#define NULL_CONTEXT ((PFLT_CONTEXT)NULL) + +typedef struct _FLT_FILTER *PFLT_FILTER; +typedef struct _FLT_VOLUME *PFLT_VOLUME; +typedef struct _FLT_INSTANCE *PFLT_INSTANCE; +typedef struct _FLT_PORT *PFLT_PORT; + +typedef PVOID PFLT_CONTEXT; + +#if !FLT_MGR_LONGHORN +typedef struct _KTRANSACTION *PKTRANSACTION; +#endif + +#if !defined(_AMD64_) && !defined(_IA64_) && !defined(_ARM_) +#include "pshpack4.h" +#endif + +typedef union _FLT_PARAMETERS { + struct { + PIO_SECURITY_CONTEXT SecurityContext; + ULONG Options; + USHORT POINTER_ALIGNMENT FileAttributes; + USHORT ShareAccess; + ULONG POINTER_ALIGNMENT EaLength; + PVOID EaBuffer; + LARGE_INTEGER AllocationSize; + } Create; + struct { + PIO_SECURITY_CONTEXT SecurityContext; + ULONG Options; + USHORT POINTER_ALIGNMENT Reserved; + USHORT ShareAccess; + PVOID Parameters; + } CreatePipe; + struct { + PIO_SECURITY_CONTEXT SecurityContext; + ULONG Options; + USHORT POINTER_ALIGNMENT Reserved; + USHORT ShareAccess; + PVOID Parameters; + } CreateMailslot; + struct { + ULONG Length; + ULONG POINTER_ALIGNMENT Key; + LARGE_INTEGER ByteOffset; + PVOID ReadBuffer; + PMDL MdlAddress; + } Read; + struct { + ULONG Length; + ULONG POINTER_ALIGNMENT Key; + LARGE_INTEGER ByteOffset; + PVOID WriteBuffer; + PMDL MdlAddress; + } Write; + struct { + ULONG Length; + FILE_INFORMATION_CLASS POINTER_ALIGNMENT FileInformationClass; + PVOID InfoBuffer; + } QueryFileInformation; + struct { + ULONG Length; + FILE_INFORMATION_CLASS POINTER_ALIGNMENT FileInformationClass; + PFILE_OBJECT ParentOfTarget; + _ANONYMOUS_UNION union { + _ANONYMOUS_STRUCT struct { + BOOLEAN ReplaceIfExists; + BOOLEAN AdvanceOnly; + } DUMMYSTRUCTNAME; + ULONG ClusterCount; + HANDLE DeleteHandle; + } DUMMYUNIONNAME; + PVOID InfoBuffer; + } SetFileInformation; + struct { + ULONG Length; + PVOID EaList; + ULONG EaListLength; + ULONG POINTER_ALIGNMENT EaIndex; + PVOID EaBuffer; + PMDL MdlAddress; + } QueryEa; + struct { + ULONG Length; + PVOID EaBuffer; + PMDL MdlAddress; + } SetEa; + struct { + ULONG Length; + FS_INFORMATION_CLASS POINTER_ALIGNMENT FsInformationClass; + PVOID VolumeBuffer; + } QueryVolumeInformation; + struct { + ULONG Length; + FS_INFORMATION_CLASS POINTER_ALIGNMENT FsInformationClass; + PVOID VolumeBuffer; + } SetVolumeInformation; + union { + struct { + ULONG Length; + PUNICODE_STRING FileName; + FILE_INFORMATION_CLASS FileInformationClass; + ULONG POINTER_ALIGNMENT FileIndex; + PVOID DirectoryBuffer; + PMDL MdlAddress; + } QueryDirectory; + struct { + ULONG Length; + ULONG POINTER_ALIGNMENT CompletionFilter; + ULONG POINTER_ALIGNMENT Spare1; + ULONG POINTER_ALIGNMENT Spare2; + PVOID DirectoryBuffer; + PMDL MdlAddress; + } NotifyDirectory; + } DirectoryControl; + union { + struct { + PVPB Vpb; + PDEVICE_OBJECT DeviceObject; + } VerifyVolume; + struct { + ULONG OutputBufferLength; + ULONG POINTER_ALIGNMENT InputBufferLength; + ULONG POINTER_ALIGNMENT FsControlCode; + } Common; + struct { + ULONG OutputBufferLength; + ULONG POINTER_ALIGNMENT InputBufferLength; + ULONG POINTER_ALIGNMENT FsControlCode; + PVOID InputBuffer; + PVOID OutputBuffer; + PMDL OutputMdlAddress; + } Neither; + struct { + ULONG OutputBufferLength; + ULONG POINTER_ALIGNMENT InputBufferLength; + ULONG POINTER_ALIGNMENT FsControlCode; + PVOID SystemBuffer; + } Buffered; + struct { + ULONG OutputBufferLength; + ULONG POINTER_ALIGNMENT InputBufferLength; + ULONG POINTER_ALIGNMENT FsControlCode; + PVOID InputSystemBuffer; + PVOID OutputBuffer; + PMDL OutputMdlAddress; + } Direct; + } FileSystemControl; + union { + struct { + ULONG OutputBufferLength; + ULONG POINTER_ALIGNMENT InputBufferLength; + ULONG POINTER_ALIGNMENT IoControlCode; + } Common; + struct { + ULONG OutputBufferLength; + ULONG POINTER_ALIGNMENT InputBufferLength; + ULONG POINTER_ALIGNMENT IoControlCode; + PVOID InputBuffer; + PVOID OutputBuffer; + PMDL OutputMdlAddress; + } Neither; + struct { + ULONG OutputBufferLength; + ULONG POINTER_ALIGNMENT InputBufferLength; + ULONG POINTER_ALIGNMENT IoControlCode; + PVOID SystemBuffer; + } Buffered; + struct { + ULONG OutputBufferLength; + ULONG POINTER_ALIGNMENT InputBufferLength; + ULONG POINTER_ALIGNMENT IoControlCode; + PVOID InputSystemBuffer; + PVOID OutputBuffer; + PMDL OutputMdlAddress; + } Direct; + struct { + ULONG OutputBufferLength; + ULONG POINTER_ALIGNMENT InputBufferLength; + ULONG POINTER_ALIGNMENT IoControlCode; + PVOID InputBuffer; + PVOID OutputBuffer; + } FastIo; + } DeviceIoControl; + struct { + PLARGE_INTEGER Length; + ULONG POINTER_ALIGNMENT Key; + LARGE_INTEGER ByteOffset; + PEPROCESS ProcessId; + BOOLEAN FailImmediately; + BOOLEAN ExclusiveLock; + } LockControl; + struct { + SECURITY_INFORMATION SecurityInformation; + ULONG POINTER_ALIGNMENT Length; + PVOID SecurityBuffer; + PMDL MdlAddress; + } QuerySecurity; + struct { + SECURITY_INFORMATION SecurityInformation; + PSECURITY_DESCRIPTOR SecurityDescriptor; + } SetSecurity; + struct { + ULONG_PTR ProviderId; + PVOID DataPath; + ULONG BufferSize; + PVOID Buffer; + } WMI; + struct { + ULONG Length; + PSID StartSid; + PFILE_GET_QUOTA_INFORMATION SidList; + ULONG SidListLength; + PVOID QuotaBuffer; + PMDL MdlAddress; + } QueryQuota; + struct { + ULONG Length; + PVOID QuotaBuffer; + PMDL MdlAddress; + } SetQuota; + union { + struct { + PCM_RESOURCE_LIST AllocatedResources; + PCM_RESOURCE_LIST AllocatedResourcesTranslated; + } StartDevice; + struct { + DEVICE_RELATION_TYPE Type; + } QueryDeviceRelations; + struct { + CONST GUID *InterfaceType; + USHORT Size; + USHORT Version; + PINTERFACE Interface; + PVOID InterfaceSpecificData; + } QueryInterface; + struct { + PDEVICE_CAPABILITIES Capabilities; + } DeviceCapabilities; + struct { + PIO_RESOURCE_REQUIREMENTS_LIST IoResourceRequirementList; + } FilterResourceRequirements; + struct { + ULONG WhichSpace; + PVOID Buffer; + ULONG Offset; + ULONG POINTER_ALIGNMENT Length; + } ReadWriteConfig; + struct { + BOOLEAN Lock; + } SetLock; + struct { + BUS_QUERY_ID_TYPE IdType; + } QueryId; + struct { + DEVICE_TEXT_TYPE DeviceTextType; + LCID POINTER_ALIGNMENT LocaleId; + } QueryDeviceText; + struct { + BOOLEAN InPath; + BOOLEAN Reserved[3]; + DEVICE_USAGE_NOTIFICATION_TYPE POINTER_ALIGNMENT Type; + } UsageNotification; + } Pnp; + struct { + FS_FILTER_SECTION_SYNC_TYPE SyncType; + ULONG PageProtection; + } AcquireForSectionSynchronization; + struct { + PLARGE_INTEGER EndingOffset; + PERESOURCE *ResourceToRelease; + } AcquireForModifiedPageWriter; + struct { + PERESOURCE ResourceToRelease; + } ReleaseForModifiedPageWriter; + struct { + LARGE_INTEGER FileOffset; + ULONG Length; + ULONG POINTER_ALIGNMENT LockKey; + BOOLEAN POINTER_ALIGNMENT CheckForReadOperation; + } FastIoCheckIfPossible; + struct { + PIRP Irp; + PFILE_NETWORK_OPEN_INFORMATION NetworkInformation; + } NetworkQueryOpen; + struct { + LARGE_INTEGER FileOffset; + ULONG POINTER_ALIGNMENT Length; + ULONG POINTER_ALIGNMENT Key; + PMDL *MdlChain; + } MdlRead; + struct { + PMDL MdlChain; + } MdlReadComplete; + struct { + LARGE_INTEGER FileOffset; + ULONG POINTER_ALIGNMENT Length; + ULONG POINTER_ALIGNMENT Key; + PMDL *MdlChain; + } PrepareMdlWrite; + struct { + LARGE_INTEGER FileOffset; + PMDL MdlChain; + } MdlWriteComplete; + struct { + ULONG DeviceType; + } MountVolume; + struct { + PVOID Argument1; + PVOID Argument2; + PVOID Argument3; + PVOID Argument4; + PVOID Argument5; + LARGE_INTEGER Argument6; + } Others; +} FLT_PARAMETERS, *PFLT_PARAMETERS; + +#if !defined(_AMD64_) && !defined(_IA64_) && !defined(_ARM_) +#include "poppack.h" +#endif + +typedef struct _FLT_IO_PARAMETER_BLOCK { + ULONG IrpFlags; + UCHAR MajorFunction; + UCHAR MinorFunction; + UCHAR OperationFlags; + UCHAR Reserved; + PFILE_OBJECT TargetFileObject; + PFLT_INSTANCE TargetInstance; + FLT_PARAMETERS Parameters; +} FLT_IO_PARAMETER_BLOCK, *PFLT_IO_PARAMETER_BLOCK; + +#define FLTFL_CALLBACK_DATA_REISSUE_MASK 0x0000FFFF +#define FLTFL_CALLBACK_DATA_IRP_OPERATION 0x00000001 +#define FLTFL_CALLBACK_DATA_FAST_IO_OPERATION 0x00000002 +#define FLTFL_CALLBACK_DATA_FS_FILTER_OPERATION 0x00000004 +#define FLTFL_CALLBACK_DATA_SYSTEM_BUFFER 0x00000008 +#define FLTFL_CALLBACK_DATA_GENERATED_IO 0x00010000 +#define FLTFL_CALLBACK_DATA_REISSUED_IO 0x00020000 +#define FLTFL_CALLBACK_DATA_DRAINING_IO 0x00040000 +#define FLTFL_CALLBACK_DATA_POST_OPERATION 0x00080000 +#define FLTFL_CALLBACK_DATA_NEW_SYSTEM_BUFFER 0x00100000 +#define FLTFL_CALLBACK_DATA_DIRTY 0x80000000 + +#define FLT_SET_CALLBACK_DATA_DIRTY(Data) FltSetCallbackDataDirty(Data) +#define FLT_CLEAR_CALLBACK_DATA_DIRTY(Data) FltClearCallbackDataDirty(Data) +#define FLT_IS_CALLBACK_DATA_DIRTY(Data) FltIsCallbackDataDirty(Data) + +#define FLT_IS_IRP_OPERATION(Data) (FlagOn((Data)->Flags, FLTFL_CALLBACK_DATA_IRP_OPERATION)) +#define FLT_IS_FASTIO_OPERATION(Data) (FlagOn((Data)->Flags, FLTFL_CALLBACK_DATA_FAST_IO_OPERATION)) +#define FLT_IS_FS_FILTER_OPERATION(Data) (FlagOn((Data)->Flags, FLTFL_CALLBACK_DATA_FS_FILTER_OPERATION)) +#define FLT_IS_REISSUED_IO(Data) (FlagOn((Data)->Flags, FLTFL_CALLBACK_DATA_REISSUED_IO)) +#define FLT_IS_SYSTEM_BUFFER(Data) (FlagOn((Data)->Flags, FLTFL_CALLBACK_DATA_SYSTEM_BUFFER)) + +typedef USHORT FLT_CONTEXT_TYPE; + +#define FLT_VOLUME_CONTEXT 0x0001 +#define FLT_INSTANCE_CONTEXT 0x0002 +#define FLT_FILE_CONTEXT 0x0004 +#define FLT_STREAM_CONTEXT 0x0008 +#define FLT_STREAMHANDLE_CONTEXT 0x0010 +#define FLT_TRANSACTION_CONTEXT 0x0020 +#define FLT_CONTEXT_END 0xffff + +#define FLT_ALL_CONTEXTS (FLT_VOLUME_CONTEXT | FLT_INSTANCE_CONTEXT | \ + FLT_FILE_CONTEXT | FLT_STREAM_CONTEXT | \ + FLT_STREAMHANDLE_CONTEXT | FLT_TRANSACTION_CONTEXT) + +typedef ULONG FLT_CALLBACK_DATA_FLAGS; + +#if FLT_MGR_WIN7 +typedef ULONG FLT_ALLOCATE_CALLBACK_DATA_FLAGS; +#define FLT_ALLOCATE_CALLBACK_DATA_PREALLOCATE_ALL_MEMORY 0x00000001 +#endif /* FLT_MGR_WIN7 */ + +typedef struct _FLT_CALLBACK_DATA { + FLT_CALLBACK_DATA_FLAGS Flags; + PETHREAD CONST Thread; + PFLT_IO_PARAMETER_BLOCK CONST Iopb; + IO_STATUS_BLOCK IoStatus; + struct _FLT_TAG_DATA_BUFFER *TagData; + _ANONYMOUS_UNION union { + _ANONYMOUS_STRUCT struct { + LIST_ENTRY QueueLinks; + PVOID QueueContext[2]; + } DUMMYSTRUCTNAME; + PVOID FilterContext[4]; + } DUMMYUNIONNAME; + KPROCESSOR_MODE RequestorMode; +} FLT_CALLBACK_DATA, *PFLT_CALLBACK_DATA; + +typedef struct _FLT_RELATED_OBJECTS { + USHORT CONST Size; + USHORT CONST TransactionContext; + PFLT_FILTER CONST Filter; + PFLT_VOLUME CONST Volume; + PFLT_INSTANCE CONST Instance; + PFILE_OBJECT CONST FileObject; + PKTRANSACTION CONST Transaction; +} FLT_RELATED_OBJECTS, *PFLT_RELATED_OBJECTS, const *PCFLT_RELATED_OBJECTS; + +typedef struct _FLT_RELATED_CONTEXTS { + PFLT_CONTEXT VolumeContext; + PFLT_CONTEXT InstanceContext; + PFLT_CONTEXT FileContext; + PFLT_CONTEXT StreamContext; + PFLT_CONTEXT StreamHandleContext; + PFLT_CONTEXT TransactionContext; +} FLT_RELATED_CONTEXTS, *PFLT_RELATED_CONTEXTS; + +typedef VOID +(FLTAPI *PFLT_CONTEXT_CLEANUP_CALLBACK)( + _In_ PFLT_CONTEXT Context, + _In_ FLT_CONTEXT_TYPE ContextType); + +typedef PVOID +(FLTAPI *PFLT_CONTEXT_ALLOCATE_CALLBACK)( + _In_ POOL_TYPE PoolType, + _In_ SIZE_T Size, + _In_ FLT_CONTEXT_TYPE ContextType); + +typedef VOID +(FLTAPI *PFLT_CONTEXT_FREE_CALLBACK)( + _In_ PVOID Pool, + _In_ FLT_CONTEXT_TYPE ContextType); + +typedef USHORT FLT_CONTEXT_REGISTRATION_FLAGS; + +#define FLTFL_CONTEXT_REGISTRATION_NO_EXACT_SIZE_MATCH 0x0001 + +#define FLT_VARIABLE_SIZED_CONTEXTS ((SIZE_T)-1) + +typedef struct _FLT_CONTEXT_REGISTRATION { + FLT_CONTEXT_TYPE ContextType; + FLT_CONTEXT_REGISTRATION_FLAGS Flags; + PFLT_CONTEXT_CLEANUP_CALLBACK ContextCleanupCallback; + SIZE_T Size; + ULONG PoolTag; + PFLT_CONTEXT_ALLOCATE_CALLBACK ContextAllocateCallback; + PFLT_CONTEXT_FREE_CALLBACK ContextFreeCallback; + PVOID Reserved1; +} FLT_CONTEXT_REGISTRATION, *PFLT_CONTEXT_REGISTRATION, const *PCFLT_CONTEXT_REGISTRATION; + +typedef ULONG FLT_INSTANCE_SETUP_FLAGS; + +#define FLTFL_INSTANCE_SETUP_AUTOMATIC_ATTACHMENT 0x00000001 +#define FLTFL_INSTANCE_SETUP_MANUAL_ATTACHMENT 0x00000002 +#define FLTFL_INSTANCE_SETUP_NEWLY_MOUNTED_VOLUME 0x00000004 + +#if FLT_MGR_LONGHORN + +#define FLTFL_INSTANCE_SETUP_DETACHED_VOLUME 0x00000008 + +#define FLT_MAX_TRANSACTION_NOTIFICATIONS (TRANSACTION_NOTIFY_PREPREPARE | \ + TRANSACTION_NOTIFY_PREPARE | \ + TRANSACTION_NOTIFY_COMMIT | \ + TRANSACTION_NOTIFY_ROLLBACK | \ + TRANSACTION_NOTIFY_COMMIT_FINALIZE) + +#endif /* FLT_MGR_LONGHORN */ + +typedef NTSTATUS +(FLTAPI *PFLT_INSTANCE_SETUP_CALLBACK)( + _In_ PCFLT_RELATED_OBJECTS FltObjects, + _In_ FLT_INSTANCE_SETUP_FLAGS Flags, + _In_ DEVICE_TYPE VolumeDeviceType, + _In_ FLT_FILESYSTEM_TYPE VolumeFilesystemType); + +typedef ULONG FLT_INSTANCE_QUERY_TEARDOWN_FLAGS; + +typedef NTSTATUS +(FLTAPI *PFLT_INSTANCE_QUERY_TEARDOWN_CALLBACK)( + _In_ PCFLT_RELATED_OBJECTS FltObjects, + _In_ FLT_INSTANCE_QUERY_TEARDOWN_FLAGS Flags); + +typedef ULONG FLT_INSTANCE_TEARDOWN_FLAGS; + +#define FLTFL_INSTANCE_TEARDOWN_MANUAL 0x00000001 +#define FLTFL_INSTANCE_TEARDOWN_FILTER_UNLOAD 0x00000002 +#define FLTFL_INSTANCE_TEARDOWN_MANDATORY_FILTER_UNLOAD 0x00000004 +#define FLTFL_INSTANCE_TEARDOWN_VOLUME_DISMOUNT 0x00000008 +#define FLTFL_INSTANCE_TEARDOWN_INTERNAL_ERROR 0x00000010 + +typedef VOID +(FLTAPI *PFLT_INSTANCE_TEARDOWN_CALLBACK)( + _In_ PCFLT_RELATED_OBJECTS FltObjects, + _In_ FLT_INSTANCE_TEARDOWN_FLAGS Reason); + +typedef enum _FLT_PREOP_CALLBACK_STATUS { + FLT_PREOP_SUCCESS_WITH_CALLBACK, + FLT_PREOP_SUCCESS_NO_CALLBACK, + FLT_PREOP_PENDING, + FLT_PREOP_DISALLOW_FASTIO, + FLT_PREOP_COMPLETE, + FLT_PREOP_SYNCHRONIZE +} FLT_PREOP_CALLBACK_STATUS, *PFLT_PREOP_CALLBACK_STATUS; + +typedef FLT_PREOP_CALLBACK_STATUS +(FLTAPI *PFLT_PRE_OPERATION_CALLBACK)( + _Inout_ PFLT_CALLBACK_DATA Data, + _In_ PCFLT_RELATED_OBJECTS FltObjects, + _Outptr_result_maybenull_ PVOID *CompletionContext); + +typedef enum _FLT_POSTOP_CALLBACK_STATUS { + FLT_POSTOP_FINISHED_PROCESSING, + FLT_POSTOP_MORE_PROCESSING_REQUIRED +} FLT_POSTOP_CALLBACK_STATUS, *PFLT_POSTOP_CALLBACK_STATUS; + +typedef ULONG FLT_POST_OPERATION_FLAGS; + +#define FLTFL_POST_OPERATION_DRAINING 0x00000001 + +typedef FLT_POSTOP_CALLBACK_STATUS +(FLTAPI *PFLT_POST_OPERATION_CALLBACK)( + _Inout_ PFLT_CALLBACK_DATA Data, + _In_ PCFLT_RELATED_OBJECTS FltObjects, + _In_opt_ PVOID CompletionContext, + _In_ FLT_POST_OPERATION_FLAGS Flags); + +typedef ULONG FLT_OPERATION_REGISTRATION_FLAGS; + +#define FLTFL_OPERATION_REGISTRATION_SKIP_PAGING_IO 0x00000001 +#define FLTFL_OPERATION_REGISTRATION_SKIP_CACHED_IO 0x00000002 +#define FLTFL_OPERATION_REGISTRATION_SKIP_NON_DASD_IO 0x00000004 + +typedef struct _FLT_OPERATION_REGISTRATION { + UCHAR MajorFunction; + FLT_OPERATION_REGISTRATION_FLAGS Flags; + PFLT_PRE_OPERATION_CALLBACK PreOperation; + PFLT_POST_OPERATION_CALLBACK PostOperation; + PVOID Reserved1; +} FLT_OPERATION_REGISTRATION, *PFLT_OPERATION_REGISTRATION; + +typedef struct _FLT_TAG_DATA_BUFFER { + ULONG FileTag; + USHORT TagDataLength; + USHORT UnparsedNameLength; + _ANONYMOUS_UNION union { + struct { + USHORT SubstituteNameOffset; + USHORT SubstituteNameLength; + USHORT PrintNameOffset; + USHORT PrintNameLength; + ULONG Flags; + WCHAR PathBuffer[1]; + } SymbolicLinkReparseBuffer; + struct { + USHORT SubstituteNameOffset; + USHORT SubstituteNameLength; + USHORT PrintNameOffset; + USHORT PrintNameLength; + WCHAR PathBuffer[1]; + } MountPointReparseBuffer; + struct { + UCHAR DataBuffer[1]; + } GenericReparseBuffer; + struct { + GUID TagGuid; + UCHAR DataBuffer[1]; + } GenericGUIDReparseBuffer; + } DUMMYUNIONNAME; +} FLT_TAG_DATA_BUFFER, *PFLT_TAG_DATA_BUFFER; + +#define FLT_TAG_DATA_BUFFER_HEADER_SIZE FIELD_OFFSET(FLT_TAG_DATA_BUFFER, GenericReparseBuffer) + +typedef ULONG FLT_FILTER_UNLOAD_FLAGS; + +#define FLTFL_FILTER_UNLOAD_MANDATORY 0x00000001 + +typedef NTSTATUS +(FLTAPI *PFLT_FILTER_UNLOAD_CALLBACK)( + FLT_FILTER_UNLOAD_FLAGS Flags); + +typedef struct _FLT_NAME_CONTROL { + UNICODE_STRING Name; +} FLT_NAME_CONTROL, *PFLT_NAME_CONTROL; + +typedef ULONG FLT_FILE_NAME_OPTIONS; + +typedef NTSTATUS +(FLTAPI *PFLT_GENERATE_FILE_NAME)( + _In_ PFLT_INSTANCE Instance, + _In_ PFILE_OBJECT FileObject, + _In_opt_ PFLT_CALLBACK_DATA CallbackData, + _In_ FLT_FILE_NAME_OPTIONS NameOptions, + _Out_ PBOOLEAN CacheFileNameInformation, + _Out_ PFLT_NAME_CONTROL FileName); + +typedef ULONG FLT_NORMALIZE_NAME_FLAGS; + +#define FLTFL_NORMALIZE_NAME_CASE_SENSITIVE 0x01 +#define FLTFL_NORMALIZE_NAME_DESTINATION_FILE_NAME 0x02 + +typedef NTSTATUS +(FLTAPI *PFLT_NORMALIZE_NAME_COMPONENT)( + _In_ PFLT_INSTANCE Instance, + _In_ PCUNICODE_STRING ParentDirectory, + _In_ USHORT VolumeNameLength, + _In_ PCUNICODE_STRING Component, + _Out_writes_bytes_(ExpandComponentNameLength) PFILE_NAMES_INFORMATION ExpandComponentName, + _In_ ULONG ExpandComponentNameLength, + _In_ FLT_NORMALIZE_NAME_FLAGS Flags, + _Inout_ PVOID *NormalizationContext); + +typedef NTSTATUS +(FLTAPI *PFLT_NORMALIZE_NAME_COMPONENT_EX)( + _In_ PFLT_INSTANCE Instance, + _In_ PFILE_OBJECT FileObject, + _In_ PCUNICODE_STRING ParentDirectory, + _In_ USHORT VolumeNameLength, + _In_ PCUNICODE_STRING Component, + _Out_writes_bytes_(ExpandComponentNameLength) PFILE_NAMES_INFORMATION ExpandComponentName, + _In_ ULONG ExpandComponentNameLength, + _In_ FLT_NORMALIZE_NAME_FLAGS Flags, + _Inout_ PVOID *NormalizationContext); + +typedef VOID +(FLTAPI *PFLT_NORMALIZE_CONTEXT_CLEANUP)( + _In_opt_ PVOID *NormalizationContext); + +#if FLT_MGR_LONGHORN +typedef NTSTATUS +(FLTAPI *PFLT_TRANSACTION_NOTIFICATION_CALLBACK)( + _In_ PCFLT_RELATED_OBJECTS FltObjects, + _In_ PFLT_CONTEXT TransactionContext, + _In_ ULONG NotificationMask); +#endif /* FLT_MGR_LONGHORN */ + +#define FLT_REGISTRATION_VERSION_0200 0x0200 +#define FLT_REGISTRATION_VERSION_0201 0x0201 +#define FLT_REGISTRATION_VERSION_0202 0x0202 +#define FLT_REGISTRATION_VERSION_0203 0x0203 + +#if FLT_MGR_LONGHORN +#define FLT_REGISTRATION_VERSION FLT_REGISTRATION_VERSION_0202 +#else +#define FLT_REGISTRATION_VERSION FLT_REGISTRATION_VERSION_0200 +#endif + +typedef ULONG FLT_REGISTRATION_FLAGS; + +#define FLTFL_REGISTRATION_DO_NOT_SUPPORT_SERVICE_STOP 0x00000001 +#define FLTFL_REGISTRATION_SUPPORT_NPFS_MSFS 0x00000002 + +typedef struct _FLT_REGISTRATION { + USHORT Size; + USHORT Version; + FLT_REGISTRATION_FLAGS Flags; + CONST FLT_CONTEXT_REGISTRATION *ContextRegistration; + CONST FLT_OPERATION_REGISTRATION *OperationRegistration; + PFLT_FILTER_UNLOAD_CALLBACK FilterUnloadCallback; + PFLT_INSTANCE_SETUP_CALLBACK InstanceSetupCallback; + PFLT_INSTANCE_QUERY_TEARDOWN_CALLBACK InstanceQueryTeardownCallback; + PFLT_INSTANCE_TEARDOWN_CALLBACK InstanceTeardownStartCallback; + PFLT_INSTANCE_TEARDOWN_CALLBACK InstanceTeardownCompleteCallback; + PFLT_GENERATE_FILE_NAME GenerateFileNameCallback; + PFLT_NORMALIZE_NAME_COMPONENT NormalizeNameComponentCallback; + PFLT_NORMALIZE_CONTEXT_CLEANUP NormalizeContextCleanupCallback; +#if FLT_MGR_LONGHORN + PFLT_TRANSACTION_NOTIFICATION_CALLBACK TransactionNotificationCallback; + PFLT_NORMALIZE_NAME_COMPONENT_EX NormalizeNameComponentExCallback; +#endif /* FLT_MGR_LONGHORN */ +} FLT_REGISTRATION, *PFLT_REGISTRATION; + +typedef VOID +(FLTAPI *PFLT_COMPLETED_ASYNC_IO_CALLBACK)( + _In_ PFLT_CALLBACK_DATA CallbackData, + _In_ PFLT_CONTEXT Context); + +typedef ULONG FLT_IO_OPERATION_FLAGS; + +#define FLTFL_IO_OPERATION_NON_CACHED 0x00000001 +#define FLTFL_IO_OPERATION_PAGING 0x00000002 +#define FLTFL_IO_OPERATION_DO_NOT_UPDATE_BYTE_OFFSET 0x00000004 + +#if FLT_MGR_LONGHORN +#define FLTFL_IO_OPERATION_SYNCHRONOUS_PAGING 0x00000008 +#endif + +typedef VOID +(FLTAPI *PFLT_GET_OPERATION_STATUS_CALLBACK)( + _In_ PCFLT_RELATED_OBJECTS FltObjects, + _In_ PFLT_IO_PARAMETER_BLOCK IopbSnapshot, + _In_ NTSTATUS OperationStatus, + _In_opt_ PVOID RequesterContext); + +typedef ULONG FLT_FILE_NAME_OPTIONS; + +#define FLT_VALID_FILE_NAME_FORMATS 0x000000ff + +#define FLT_FILE_NAME_NORMALIZED 0x01 +#define FLT_FILE_NAME_OPENED 0x02 +#define FLT_FILE_NAME_SHORT 0x03 + +#define FltGetFileNameFormat( _NameOptions ) ((_NameOptions) & FLT_VALID_FILE_NAME_FORMATS) + +#define FLT_VALID_FILE_NAME_QUERY_METHODS 0x0000ff00 + +#define FLT_FILE_NAME_QUERY_DEFAULT 0x0100 +#define FLT_FILE_NAME_QUERY_CACHE_ONLY 0x0200 +#define FLT_FILE_NAME_QUERY_FILESYSTEM_ONLY 0x0300 +#define FLT_FILE_NAME_QUERY_ALWAYS_ALLOW_CACHE_LOOKUP 0x0400 + +#define FltGetFileNameQueryMethod( _NameOptions ) ((_NameOptions) & FLT_VALID_FILE_NAME_QUERY_METHODS) + +#define FLT_VALID_FILE_NAME_FLAGS 0xff000000 + +#define FLT_FILE_NAME_REQUEST_FROM_CURRENT_PROVIDER 0x01000000 +#define FLT_FILE_NAME_DO_NOT_CACHE 0x02000000 + +#if FLT_MGR_AFTER_XPSP2 +#define FLT_FILE_NAME_ALLOW_QUERY_ON_REPARSE 0x04000000 +#endif + +typedef USHORT FLT_FILE_NAME_PARSED_FLAGS; + +#define FLTFL_FILE_NAME_PARSED_FINAL_COMPONENT 0x0001 +#define FLTFL_FILE_NAME_PARSED_EXTENSION 0x0002 +#define FLTFL_FILE_NAME_PARSED_STREAM 0x0004 +#define FLTFL_FILE_NAME_PARSED_PARENT_DIR 0x0008 + +typedef struct _FLT_FILE_NAME_INFORMATION { + USHORT Size; + FLT_FILE_NAME_PARSED_FLAGS NamesParsed; + FLT_FILE_NAME_OPTIONS Format; + UNICODE_STRING Name; + UNICODE_STRING Volume; + UNICODE_STRING Share; + UNICODE_STRING Extension; + UNICODE_STRING Stream; + UNICODE_STRING FinalComponent; + UNICODE_STRING ParentDir; +} FLT_FILE_NAME_INFORMATION, *PFLT_FILE_NAME_INFORMATION; + +typedef enum _FLT_SET_CONTEXT_OPERATION { + FLT_SET_CONTEXT_REPLACE_IF_EXISTS, + FLT_SET_CONTEXT_KEEP_IF_EXISTS +} FLT_SET_CONTEXT_OPERATION, *PFLT_SET_CONTEXT_OPERATION; + +typedef struct _FLT_VOLUME_PROPERTIES { + DEVICE_TYPE DeviceType; + ULONG DeviceCharacteristics; + ULONG DeviceObjectFlags; + ULONG AlignmentRequirement; + USHORT SectorSize; + USHORT Reserved0; + UNICODE_STRING FileSystemDriverName; + UNICODE_STRING FileSystemDeviceName; + UNICODE_STRING RealDeviceName; +} FLT_VOLUME_PROPERTIES, *PFLT_VOLUME_PROPERTIES; + +#define FLT_PORT_CONNECT 0x0001 +#define FLT_PORT_ALL_ACCESS (FLT_PORT_CONNECT | STANDARD_RIGHTS_ALL) + +typedef NTSTATUS +(FLTAPI *PFLT_MESSAGE_NOTIFY)( + _In_opt_ PVOID PortCookie, + _In_reads_bytes_opt_(InputBufferLength) PVOID InputBuffer, + _In_ ULONG InputBufferLength, + _Out_writes_bytes_to_opt_(OutputBufferLength,*ReturnOutputBufferLength) PVOID OutputBuffer, + _In_ ULONG OutputBufferLength, + _Out_ PULONG ReturnOutputBufferLength); + +typedef NTSTATUS +(FLTAPI *PFLT_CONNECT_NOTIFY)( + _In_ PFLT_PORT ClientPort, + _In_opt_ PVOID ServerPortCookie, + _In_reads_bytes_opt_(SizeOfContext) PVOID ConnectionContext, + _In_ ULONG SizeOfContext, + _Outptr_result_maybenull_ PVOID *ConnectionPortCookie); + +typedef VOID +(FLTAPI *PFLT_DISCONNECT_NOTIFY)( + _In_opt_ PVOID ConnectionCookie); + +typedef VOID +(FLTAPI *PFLT_COMPLETE_CANCELED_CALLBACK)( + _In_ PFLT_CALLBACK_DATA CallbackData); + +typedef struct _FLT_DEFERRED_IO_WORKITEM *PFLT_DEFERRED_IO_WORKITEM; +typedef struct _FLT_GENERIC_WORKITEM *PFLT_GENERIC_WORKITEM; + +typedef VOID +(FLTAPI *PFLT_DEFERRED_IO_WORKITEM_ROUTINE)( + _In_ PFLT_DEFERRED_IO_WORKITEM FltWorkItem, + _In_ PFLT_CALLBACK_DATA CallbackData, + _In_opt_ PVOID Context); + +typedef VOID +(FLTAPI *PFLT_GENERIC_WORKITEM_ROUTINE)( + _In_ PFLT_GENERIC_WORKITEM FltWorkItem, + _In_ PVOID FltObject, + _In_opt_ PVOID Context); + +typedef IO_CSQ_IRP_CONTEXT FLT_CALLBACK_DATA_QUEUE_IO_CONTEXT, *PFLT_CALLBACK_DATA_QUEUE_IO_CONTEXT; + +typedef struct _FLT_CALLBACK_DATA_QUEUE FLT_CALLBACK_DATA_QUEUE, *PFLT_CALLBACK_DATA_QUEUE; + +typedef NTSTATUS +(FLTAPI *PFLT_CALLBACK_DATA_QUEUE_INSERT_IO)( + _Inout_ PFLT_CALLBACK_DATA_QUEUE Cbdq, + _In_ PFLT_CALLBACK_DATA Cbd, + _In_opt_ PVOID InsertContext); + +typedef VOID +(FLTAPI *PFLT_CALLBACK_DATA_QUEUE_REMOVE_IO)( + _Inout_ PFLT_CALLBACK_DATA_QUEUE Cbdq, + _In_ PFLT_CALLBACK_DATA Cbd); + +typedef PFLT_CALLBACK_DATA +(FLTAPI *PFLT_CALLBACK_DATA_QUEUE_PEEK_NEXT_IO)( + _In_ PFLT_CALLBACK_DATA_QUEUE Cbdq, + _In_opt_ PFLT_CALLBACK_DATA Cbd, + _In_opt_ PVOID PeekContext); + +typedef VOID +(FLTAPI *PFLT_CALLBACK_DATA_QUEUE_ACQUIRE)( + _Inout_ PFLT_CALLBACK_DATA_QUEUE Cbdq, + _Out_opt_ PKIRQL Irql); + +typedef VOID +(FLTAPI *PFLT_CALLBACK_DATA_QUEUE_RELEASE)( + _Inout_ PFLT_CALLBACK_DATA_QUEUE Cbdq, + _In_opt_ KIRQL Irql); + +typedef VOID +(FLTAPI *PFLT_CALLBACK_DATA_QUEUE_COMPLETE_CANCELED_IO)( + _Inout_ PFLT_CALLBACK_DATA_QUEUE Cbdq, + _Inout_ PFLT_CALLBACK_DATA Cbd); + +typedef enum _FLT_CALLBACK_DATA_QUEUE_FLAGS FLT_CALLBACK_DATA_QUEUE_FLAGS; + +typedef struct _FLT_CALLBACK_DATA_QUEUE { + IO_CSQ Csq; + FLT_CALLBACK_DATA_QUEUE_FLAGS Flags; + PFLT_INSTANCE Instance; + PFLT_CALLBACK_DATA_QUEUE_INSERT_IO InsertIo; + PFLT_CALLBACK_DATA_QUEUE_REMOVE_IO RemoveIo; + PFLT_CALLBACK_DATA_QUEUE_PEEK_NEXT_IO PeekNextIo; + PFLT_CALLBACK_DATA_QUEUE_ACQUIRE Acquire; + PFLT_CALLBACK_DATA_QUEUE_RELEASE Release; + PFLT_CALLBACK_DATA_QUEUE_COMPLETE_CANCELED_IO CompleteCanceledIo; +} FLT_CALLBACK_DATA_QUEUE, *PFLT_CALLBACK_DATA_QUEUE; + +typedef NTSTATUS +(*PFLT_COMPLETE_LOCK_CALLBACK_DATA_ROUTINE)( + _In_opt_ PVOID Context, + _In_ PFLT_CALLBACK_DATA CallbackData); + +typedef VOID +(FLTAPI *PFLTOPLOCK_WAIT_COMPLETE_ROUTINE)( + _In_ PFLT_CALLBACK_DATA CallbackData, + _In_opt_ PVOID Context); + +typedef VOID +(FLTAPI *PFLTOPLOCK_PREPOST_CALLBACKDATA_ROUTINE)( + _In_ PFLT_CALLBACK_DATA CallbackData, + _In_opt_ PVOID Context); + +VOID +FLTAPI +FltSetCallbackDataDirty( + _Inout_ PFLT_CALLBACK_DATA Data); + +VOID +FLTAPI +FltClearCallbackDataDirty( + _Inout_ PFLT_CALLBACK_DATA Data); + +BOOLEAN +FLTAPI +FltIsCallbackDataDirty( + _In_ PFLT_CALLBACK_DATA Data); + +_Must_inspect_result_ +BOOLEAN +FLTAPI +FltDoCompletionProcessingWhenSafe( + _In_ PFLT_CALLBACK_DATA Data, + _In_ PCFLT_RELATED_OBJECTS FltObjects, + _In_opt_ PVOID CompletionContext, + _In_ FLT_POST_OPERATION_FLAGS Flags, + _In_ PFLT_POST_OPERATION_CALLBACK SafePostCallback, + _Out_ PFLT_POSTOP_CALLBACK_STATUS RetPostOperationStatus); + +_Must_inspect_result_ +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +FLTAPI +FltCheckAndGrowNameControl( + _Inout_ PFLT_NAME_CONTROL NameCtrl, + _In_ USHORT NewSize); + +_Must_inspect_result_ +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +FLTAPI +FltPurgeFileNameInformationCache( + _In_ PFLT_INSTANCE Instance, + _In_opt_ PFILE_OBJECT FileObject); + +_Must_inspect_result_ +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +FLTAPI +FltRegisterFilter( + _In_ PDRIVER_OBJECT Driver, + _In_ CONST FLT_REGISTRATION *Registration, + _Outptr_ PFLT_FILTER *RetFilter); + +_IRQL_requires_max_(APC_LEVEL) +VOID +FLTAPI +FltUnregisterFilter( + _In_ PFLT_FILTER Filter); + +_Must_inspect_result_ +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +FLTAPI +FltStartFiltering( + _In_ PFLT_FILTER Filter); + +_Must_inspect_result_ +_IRQL_requires_max_(APC_LEVEL) +PVOID +FLTAPI +FltGetRoutineAddress( + _In_ PCSTR FltMgrRoutineName); + +_When_(CallbackStatus==FLT_PREOP_COMPLETE, _IRQL_requires_max_(DISPATCH_LEVEL)) +_When_(CallbackStatus!=FLT_PREOP_COMPLETE, _IRQL_requires_max_(APC_LEVEL)) +VOID +FLTAPI +FltCompletePendedPreOperation( + _In_ PFLT_CALLBACK_DATA CallbackData, + _In_ FLT_PREOP_CALLBACK_STATUS CallbackStatus, + _In_opt_ PVOID Context); + +_IRQL_requires_max_(DISPATCH_LEVEL) +VOID +FLTAPI +FltCompletePendedPostOperation( + _In_ PFLT_CALLBACK_DATA CallbackData); + +_Must_inspect_result_ +_IRQL_requires_max_(DISPATCH_LEVEL) +NTSTATUS +FLTAPI +FltRequestOperationStatusCallback( + _In_ PFLT_CALLBACK_DATA Data, + _In_ PFLT_GET_OPERATION_STATUS_CALLBACK CallbackRoutine, + _In_opt_ PVOID RequesterContext); + +_When_((PoolType==NonPagedPoolNx), _IRQL_requires_max_(DISPATCH_LEVEL)) +_When_((PoolType!=NonPagedPoolNx), _IRQL_requires_max_(APC_LEVEL)) +PVOID +FLTAPI +FltAllocatePoolAlignedWithTag( + _In_ PFLT_INSTANCE Instance, + _In_ POOL_TYPE PoolType, + _In_ SIZE_T NumberOfBytes, + _In_ ULONG Tag); + +_IRQL_requires_max_(DISPATCH_LEVEL) +VOID +FLTAPI +FltFreePoolAlignedWithTag( + _In_ PFLT_INSTANCE Instance, + _In_ PVOID Buffer, + _In_ ULONG Tag); + +_Must_inspect_result_ +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +FLTAPI +FltGetFileNameInformation( + _In_ PFLT_CALLBACK_DATA CallbackData, + _In_ FLT_FILE_NAME_OPTIONS NameOptions, + _Outptr_ PFLT_FILE_NAME_INFORMATION *FileNameInformation); + +_Must_inspect_result_ +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +FLTAPI +FltGetFileNameInformationUnsafe( + _In_ PFILE_OBJECT FileObject, + _In_opt_ PFLT_INSTANCE Instance, + _In_ FLT_FILE_NAME_OPTIONS NameOptions, + _Outptr_ PFLT_FILE_NAME_INFORMATION *FileNameInformation); + +_IRQL_requires_max_(APC_LEVEL) +VOID +FLTAPI +FltReleaseFileNameInformation( + _In_ PFLT_FILE_NAME_INFORMATION FileNameInformation); + +_IRQL_requires_max_(APC_LEVEL) +VOID +FLTAPI +FltReferenceFileNameInformation( + _In_ PFLT_FILE_NAME_INFORMATION FileNameInformation); + +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +FLTAPI +FltParseFileName( + _In_ PCUNICODE_STRING FileName, + _Inout_opt_ PUNICODE_STRING Extension, + _Inout_opt_ PUNICODE_STRING Stream, + _Inout_opt_ PUNICODE_STRING FinalComponent); + +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +FLTAPI +FltParseFileNameInformation( + _Inout_ PFLT_FILE_NAME_INFORMATION FileNameInformation); + +_Must_inspect_result_ +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +FLTAPI +FltGetTunneledName( + _In_ PFLT_CALLBACK_DATA CallbackData, + _In_ PFLT_FILE_NAME_INFORMATION FileNameInformation, + _Outptr_result_maybenull_ PFLT_FILE_NAME_INFORMATION *RetTunneledFileNameInformation); + +_Must_inspect_result_ +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +FLTAPI +FltGetVolumeName( + _In_ PFLT_VOLUME Volume, + _Inout_opt_ PUNICODE_STRING VolumeName, + _Out_opt_ PULONG BufferSizeNeeded); + +_Must_inspect_result_ +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +FLTAPI +FltGetDestinationFileNameInformation( + _In_ PFLT_INSTANCE Instance, + _In_ PFILE_OBJECT FileObject, + _In_opt_ HANDLE RootDirectory, + _In_reads_bytes_(FileNameLength) PWSTR FileName, + _In_ ULONG FileNameLength, + _In_ FLT_FILE_NAME_OPTIONS NameOptions, + _Outptr_ PFLT_FILE_NAME_INFORMATION *RetFileNameInformation); + +_Must_inspect_result_ +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +FLTAPI +FltIsDirectory( + _In_ PFILE_OBJECT FileObject, + _In_ PFLT_INSTANCE Instance, + _Out_ PBOOLEAN IsDirectory); + +_Must_inspect_result_ +_IRQL_requires_max_(PASSIVE_LEVEL) +NTSTATUS +FLTAPI +FltLoadFilter( + _In_ PCUNICODE_STRING FilterName); + +_Must_inspect_result_ +_IRQL_requires_max_(PASSIVE_LEVEL) +NTSTATUS +FLTAPI +FltUnloadFilter( + _In_ PCUNICODE_STRING FilterName); + +_Must_inspect_result_ +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +FLTAPI +FltAttachVolume( + _Inout_ PFLT_FILTER Filter, + _Inout_ PFLT_VOLUME Volume, + _In_opt_ PCUNICODE_STRING InstanceName, + _Outptr_opt_result_maybenull_ PFLT_INSTANCE *RetInstance); + +_Must_inspect_result_ +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +FLTAPI +FltAttachVolumeAtAltitude( + _Inout_ PFLT_FILTER Filter, + _Inout_ PFLT_VOLUME Volume, + _In_ PCUNICODE_STRING Altitude, + _In_opt_ PCUNICODE_STRING InstanceName, + _Outptr_opt_result_maybenull_ PFLT_INSTANCE *RetInstance); + +_Must_inspect_result_ +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +FLTAPI +FltDetachVolume( + _Inout_ PFLT_FILTER Filter, + _Inout_ PFLT_VOLUME Volume, + _In_opt_ PCUNICODE_STRING InstanceName); + +_Must_inspect_result_ +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +FLTAPI +FltAllocateCallbackData( + _In_ PFLT_INSTANCE Instance, + _In_opt_ PFILE_OBJECT FileObject, + _Outptr_ PFLT_CALLBACK_DATA *RetNewCallbackData); + +_IRQL_requires_max_(DISPATCH_LEVEL) +VOID +FLTAPI +FltFreeCallbackData( + _In_ PFLT_CALLBACK_DATA CallbackData); + +_IRQL_requires_max_(APC_LEVEL) +VOID +FLTAPI +FltReuseCallbackData( + _Inout_ PFLT_CALLBACK_DATA CallbackData); + +_When_(FlagOn(CallbackData->Iopb->IrpFlags, IRP_PAGING_IO), _IRQL_requires_max_(APC_LEVEL)) +_When_(!FlagOn(CallbackData->Iopb->IrpFlags, IRP_PAGING_IO), _IRQL_requires_max_(PASSIVE_LEVEL)) +VOID +FLTAPI +FltPerformSynchronousIo( + _Inout_ PFLT_CALLBACK_DATA CallbackData); + +_Must_inspect_result_ +_When_( FlagOn(CallbackData->Iopb->IrpFlags, IRP_PAGING_IO), _IRQL_requires_max_(APC_LEVEL)) +_When_( !FlagOn(CallbackData->Iopb->IrpFlags, IRP_PAGING_IO), _IRQL_requires_max_(PASSIVE_LEVEL)) +NTSTATUS +FLTAPI +FltPerformAsynchronousIo( + _Inout_ PFLT_CALLBACK_DATA CallbackData, + _In_ PFLT_COMPLETED_ASYNC_IO_CALLBACK CallbackRoutine, + _In_ PVOID CallbackContext); + +_Must_inspect_result_ +_IRQL_requires_max_(PASSIVE_LEVEL) +NTSTATUS +FLTAPI +FltCreateFile( + _In_ PFLT_FILTER Filter, + _In_opt_ PFLT_INSTANCE Instance, + _Out_ PHANDLE FileHandle, + _In_ ACCESS_MASK DesiredAccess, + _In_ POBJECT_ATTRIBUTES ObjectAttributes, + _Out_ PIO_STATUS_BLOCK IoStatusBlock, + _In_opt_ PLARGE_INTEGER AllocationSize, + _In_ ULONG FileAttributes, + _In_ ULONG ShareAccess, + _In_ ULONG CreateDisposition, + _In_ ULONG CreateOptions, + _In_reads_bytes_opt_(EaLength)PVOID EaBuffer, + _In_ ULONG EaLength, + _In_ ULONG Flags); + +_Must_inspect_result_ +_IRQL_requires_max_(PASSIVE_LEVEL) +_When_((Flags|FLTFL_IO_OPERATION_PAGING|FLTFL_IO_OPERATION_SYNCHRONOUS_PAGING),_IRQL_requires_max_(APC_LEVEL)) +NTSTATUS +FLTAPI +FltReadFile( + _In_ PFLT_INSTANCE InitiatingInstance, + _In_ PFILE_OBJECT FileObject, + _In_opt_ PLARGE_INTEGER ByteOffset, + _In_ ULONG Length, + _Out_writes_bytes_to_(Length,*BytesRead) PVOID Buffer, + _In_ FLT_IO_OPERATION_FLAGS Flags, + _Out_opt_ PULONG BytesRead, + _In_opt_ PFLT_COMPLETED_ASYNC_IO_CALLBACK CallbackRoutine, + _In_opt_ PVOID CallbackContext); + +_Must_inspect_result_ +_IRQL_requires_max_(PASSIVE_LEVEL) +NTSTATUS +FLTAPI +FltTagFile( + _In_ PFLT_INSTANCE InitiatingInstance, + _In_ PFILE_OBJECT FileObject, + _In_ ULONG FileTag, + _In_opt_ GUID *Guid, + _In_reads_bytes_(DataBufferLength) PVOID DataBuffer, + _In_ USHORT DataBufferLength); + +_Must_inspect_result_ +_IRQL_requires_max_(PASSIVE_LEVEL) +NTSTATUS +FLTAPI +FltUntagFile( + _In_ PFLT_INSTANCE InitiatingInstance, + _In_ PFILE_OBJECT FileObject, + _In_ ULONG FileTag, + _In_opt_ GUID *Guid); + +_Must_inspect_result_ +_IRQL_requires_max_(PASSIVE_LEVEL) +_When_((Flags|FLTFL_IO_OPERATION_PAGING|FLTFL_IO_OPERATION_SYNCHRONOUS_PAGING),_IRQL_requires_max_(APC_LEVEL)) +NTSTATUS +FLTAPI +FltWriteFile( + _In_ PFLT_INSTANCE InitiatingInstance, + _In_ PFILE_OBJECT FileObject, + _In_opt_ PLARGE_INTEGER ByteOffset, + _In_ ULONG Length, + _In_reads_bytes_(Length) PVOID Buffer, + _In_ FLT_IO_OPERATION_FLAGS Flags, + _Out_opt_ PULONG BytesWritten, + _In_opt_ PFLT_COMPLETED_ASYNC_IO_CALLBACK CallbackRoutine, + _In_opt_ PVOID CallbackContext); + +_Must_inspect_result_ +_IRQL_requires_max_(PASSIVE_LEVEL) +NTSTATUS +FLTAPI +FltQueryInformationFile( + _In_ PFLT_INSTANCE Instance, + _In_ PFILE_OBJECT FileObject, + _Out_writes_bytes_to_(Length,*LengthReturned) PVOID FileInformation, + _In_ ULONG Length, + _In_ FILE_INFORMATION_CLASS FileInformationClass, + _Out_opt_ PULONG LengthReturned); + +_Must_inspect_result_ +_IRQL_requires_max_(PASSIVE_LEVEL) +NTSTATUS +FLTAPI +FltSetInformationFile( + _In_ PFLT_INSTANCE Instance, + _In_ PFILE_OBJECT FileObject, + _In_reads_bytes_(Length) PVOID FileInformation, + _In_ ULONG Length, + _In_ FILE_INFORMATION_CLASS FileInformationClass); + +_Must_inspect_result_ +_IRQL_requires_max_(PASSIVE_LEVEL) +NTSTATUS +FLTAPI +FltQueryVolumeInformationFile( + _In_ PFLT_INSTANCE Instance, + _In_ PFILE_OBJECT FileObject, + _Out_writes_bytes_to_(Length,*LengthReturned) PVOID FsInformation, + _In_ ULONG Length, + _In_ FS_INFORMATION_CLASS FsInformationClass, + _Out_opt_ PULONG LengthReturned); + +_Must_inspect_result_ +_IRQL_requires_max_(PASSIVE_LEVEL) +NTSTATUS +FLTAPI +FltQuerySecurityObject( + _In_ PFLT_INSTANCE Instance, + _In_ PFILE_OBJECT FileObject, + _In_ SECURITY_INFORMATION SecurityInformation, + _Inout_updates_bytes_opt_(Length) PSECURITY_DESCRIPTOR SecurityDescriptor, + _In_ ULONG Length, + _Out_opt_ PULONG LengthNeeded); + +_Must_inspect_result_ +_IRQL_requires_max_(PASSIVE_LEVEL) +NTSTATUS +FLTAPI +FltSetSecurityObject( + _In_ PFLT_INSTANCE Instance, + _In_ PFILE_OBJECT FileObject, + _In_ SECURITY_INFORMATION SecurityInformation, + _In_ PSECURITY_DESCRIPTOR SecurityDescriptor); + +_Must_inspect_result_ +_IRQL_requires_max_(PASSIVE_LEVEL) +NTSTATUS +FLTAPI +FltFlushBuffers( + _In_ PFLT_INSTANCE Instance, + _In_ PFILE_OBJECT FileObject); + +_Must_inspect_result_ +_IRQL_requires_max_(PASSIVE_LEVEL) +NTSTATUS +FLTAPI +FltFsControlFile( + _In_ PFLT_INSTANCE Instance, + _In_ PFILE_OBJECT FileObject, + _In_ ULONG FsControlCode, + _In_reads_bytes_opt_(InputBufferLength) PVOID InputBuffer, + _In_ ULONG InputBufferLength, + _Out_writes_bytes_to_opt_(OutputBufferLength,*LengthReturned) PVOID OutputBuffer, + _In_ ULONG OutputBufferLength, + _Out_opt_ PULONG LengthReturned); + +_Must_inspect_result_ +_IRQL_requires_max_(PASSIVE_LEVEL) +NTSTATUS +FLTAPI +FltDeviceIoControlFile( + _In_ PFLT_INSTANCE Instance, + _In_ PFILE_OBJECT FileObject, + _In_ ULONG IoControlCode, + _In_reads_bytes_opt_(InputBufferLength) PVOID InputBuffer, + _In_ ULONG InputBufferLength, + _Out_writes_bytes_to_opt_(OutputBufferLength,*LengthReturned) PVOID OutputBuffer, + _In_ ULONG OutputBufferLength, + _Out_opt_ PULONG LengthReturned); + +_Must_inspect_result_ +_When_(FlagOn(CallbackData->Iopb->IrpFlags, IRP_PAGING_IO), _IRQL_requires_max_(APC_LEVEL)) +_When_(!FlagOn(CallbackData->Iopb->IrpFlags, IRP_PAGING_IO), _IRQL_requires_max_(PASSIVE_LEVEL)) +VOID +FLTAPI +FltReissueSynchronousIo( + _In_ PFLT_INSTANCE InitiatingInstance, + _In_ PFLT_CALLBACK_DATA CallbackData); + +_IRQL_requires_max_(PASSIVE_LEVEL) +NTSTATUS +FLTAPI +FltClose( + _In_ HANDLE FileHandle); + +_IRQL_requires_max_(PASSIVE_LEVEL) +VOID +FLTAPI +FltCancelFileOpen( + _In_ PFLT_INSTANCE Instance, + _In_ PFILE_OBJECT FileObject); + +_Must_inspect_result_ +_IRQL_requires_max_(PASSIVE_LEVEL) +NTSTATUS +FLTAPI +FltCreateSystemVolumeInformationFolder( + _In_ PFLT_INSTANCE Instance); + +_IRQL_requires_max_(APC_LEVEL) +BOOLEAN +FLTAPI +FltSupportsFileContexts( + _In_ PFILE_OBJECT FileObject); + +_IRQL_requires_max_(APC_LEVEL) +BOOLEAN +FLTAPI +FltSupportsStreamContexts( + _In_ PFILE_OBJECT FileObject); + +_IRQL_requires_max_(APC_LEVEL) +BOOLEAN +FLTAPI +FltSupportsStreamHandleContexts( + _In_ PFILE_OBJECT FileObject); + +_Must_inspect_result_ +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +FLTAPI +FltAllocateContext( + _In_ PFLT_FILTER Filter, + _In_ FLT_CONTEXT_TYPE ContextType, + _In_ SIZE_T ContextSize, + _In_ POOL_TYPE PoolType, + _Outptr_result_bytebuffer_(ContextSize) PFLT_CONTEXT *ReturnedContext); + +_IRQL_requires_max_(APC_LEVEL) +VOID +FLTAPI +FltGetContexts( + _In_ PCFLT_RELATED_OBJECTS FltObjects, + _In_ FLT_CONTEXT_TYPE DesiredContexts, + _Out_ PFLT_RELATED_CONTEXTS Contexts); + +_IRQL_requires_max_(APC_LEVEL) +VOID +FLTAPI +FltReleaseContexts( + _In_ PFLT_RELATED_CONTEXTS Contexts); + +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +FLTAPI +FltSetVolumeContext( + _In_ PFLT_VOLUME Volume, + _In_ FLT_SET_CONTEXT_OPERATION Operation, + _In_ PFLT_CONTEXT NewContext, + _Outptr_opt_result_maybenull_ PFLT_CONTEXT *OldContext); + +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +FLTAPI +FltSetInstanceContext( + _In_ PFLT_INSTANCE Instance, + _In_ FLT_SET_CONTEXT_OPERATION Operation, + _In_ PFLT_CONTEXT NewContext, + _Outptr_opt_result_maybenull_ PFLT_CONTEXT *OldContext); + +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +FLTAPI +FltSetFileContext( + _In_ PFLT_INSTANCE Instance, + _In_ PFILE_OBJECT FileObject, + _In_ FLT_SET_CONTEXT_OPERATION Operation, + _In_ PFLT_CONTEXT NewContext, + _Outptr_opt_result_maybenull_ PFLT_CONTEXT *OldContext); + +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +FLTAPI +FltSetStreamContext( + _In_ PFLT_INSTANCE Instance, + _In_ PFILE_OBJECT FileObject, + _In_ FLT_SET_CONTEXT_OPERATION Operation, + _In_ PFLT_CONTEXT NewContext, + _Outptr_opt_result_maybenull_ PFLT_CONTEXT *OldContext); + +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +FLTAPI +FltSetStreamHandleContext( + _In_ PFLT_INSTANCE Instance, + _In_ PFILE_OBJECT FileObject, + _In_ FLT_SET_CONTEXT_OPERATION Operation, + _In_ PFLT_CONTEXT NewContext, + _Outptr_opt_result_maybenull_ PFLT_CONTEXT *OldContext); + +_IRQL_requires_max_(APC_LEVEL) +VOID +FLTAPI +FltDeleteContext( + _In_ PFLT_CONTEXT Context); + +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +FLTAPI +FltDeleteVolumeContext( + _In_ PFLT_FILTER Filter, + _In_ PFLT_VOLUME Volume, + _Outptr_opt_result_maybenull_ PFLT_CONTEXT *OldContext); + +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +FLTAPI +FltDeleteInstanceContext( + _In_ PFLT_INSTANCE Instance, + _Outptr_opt_result_maybenull_ PFLT_CONTEXT *OldContext); + +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +FLTAPI +FltDeleteFileContext( + _In_ PFLT_INSTANCE Instance, + _In_ PFILE_OBJECT FileObject, + _Outptr_opt_result_maybenull_ PFLT_CONTEXT *OldContext); + +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +FLTAPI +FltDeleteStreamContext( + _In_ PFLT_INSTANCE Instance, + _In_ PFILE_OBJECT FileObject, + _Outptr_opt_result_maybenull_ PFLT_CONTEXT *OldContext); + +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +FLTAPI +FltDeleteStreamHandleContext( + _In_ PFLT_INSTANCE Instance, + _In_ PFILE_OBJECT FileObject, + _Outptr_opt_result_maybenull_ PFLT_CONTEXT *OldContext); + +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +FLTAPI +FltGetVolumeContext( + _In_ PFLT_FILTER Filter, + _In_ PFLT_VOLUME Volume, + _Outptr_ PFLT_CONTEXT *Context); + +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +FLTAPI +FltGetInstanceContext( + _In_ PFLT_INSTANCE Instance, + _Outptr_ PFLT_CONTEXT *Context); + +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +FLTAPI +FltGetFileContext( + _In_ PFLT_INSTANCE Instance, + _In_ PFILE_OBJECT FileObject, + _Outptr_ PFLT_CONTEXT *Context); + +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +FLTAPI +FltGetStreamContext( + _In_ PFLT_INSTANCE Instance, + _In_ PFILE_OBJECT FileObject, + _Outptr_ PFLT_CONTEXT *Context); + +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +FLTAPI +FltGetStreamHandleContext( + _In_ PFLT_INSTANCE Instance, + _In_ PFILE_OBJECT FileObject, + _Outptr_ PFLT_CONTEXT *Context); + +_IRQL_requires_max_(DISPATCH_LEVEL) +VOID +FLTAPI +FltReferenceContext( + _In_ PFLT_CONTEXT Context); + +_IRQL_requires_max_(DISPATCH_LEVEL) +VOID +FLTAPI +FltReleaseContext( + _In_ PFLT_CONTEXT Context); + +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +FLTAPI +FltGetFilterFromName( + _In_ PCUNICODE_STRING FilterName, + _Outptr_ PFLT_FILTER *RetFilter); + +_IRQL_requires_max_(PASSIVE_LEVEL) +NTSTATUS +FLTAPI +FltGetVolumeFromName( + _In_ PFLT_FILTER Filter, + _In_ PCUNICODE_STRING VolumeName, + _Outptr_ PFLT_VOLUME *RetVolume); + +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +FLTAPI +FltGetVolumeInstanceFromName( + _In_opt_ PFLT_FILTER Filter, + _In_ PFLT_VOLUME Volume, + _In_opt_ PCUNICODE_STRING InstanceName, + _Outptr_ PFLT_INSTANCE *RetInstance); + +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +FLTAPI +FltGetVolumeFromInstance( + _In_ PFLT_INSTANCE Instance, + _Outptr_ PFLT_VOLUME *RetVolume); + +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +FLTAPI +FltGetFilterFromInstance( + _In_ PFLT_INSTANCE Instance, + _Outptr_ PFLT_FILTER *RetFilter); + +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +FLTAPI +FltGetVolumeFromFileObject( + _In_ PFLT_FILTER Filter, + _In_ PFILE_OBJECT FileObject, + _Outptr_ PFLT_VOLUME *RetVolume); + +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +FLTAPI +FltGetVolumeFromDeviceObject( + _In_ PFLT_FILTER Filter, + _In_ PDEVICE_OBJECT DeviceObject, + _Outptr_ PFLT_VOLUME *RetVolume); + +_IRQL_requires_max_(DISPATCH_LEVEL) +NTSTATUS +FLTAPI +FltGetDeviceObject( + _In_ PFLT_VOLUME Volume, + _Outptr_ PDEVICE_OBJECT *DeviceObject); + +_IRQL_requires_max_(DISPATCH_LEVEL) +NTSTATUS +FLTAPI +FltGetDiskDeviceObject( + _In_ PFLT_VOLUME Volume, + _Outptr_ PDEVICE_OBJECT *DiskDeviceObject); + +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +FLTAPI +FltGetLowerInstance( + _In_ PFLT_INSTANCE CurrentInstance, + _Outptr_ PFLT_INSTANCE *LowerInstance); + +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +FLTAPI +FltGetUpperInstance( + _In_ PFLT_INSTANCE CurrentInstance, + _Outptr_ PFLT_INSTANCE *UpperInstance); + +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +FLTAPI +FltGetTopInstance( + _In_ PFLT_VOLUME Volume, + _Outptr_ PFLT_INSTANCE *Instance); + +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +FLTAPI +FltGetBottomInstance( + _In_ PFLT_VOLUME Volume, + _Outptr_ PFLT_INSTANCE *Instance); + +LONG +FLTAPI +FltCompareInstanceAltitudes( + _In_ PFLT_INSTANCE Instance1, + _In_ PFLT_INSTANCE Instance2); + +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +FLTAPI +FltGetFilterInformation( + _In_ PFLT_FILTER Filter, + _In_ FILTER_INFORMATION_CLASS InformationClass, + _Out_writes_bytes_to_opt_(BufferSize, *BytesReturned) PVOID Buffer, + _In_ ULONG BufferSize, + _Out_ PULONG BytesReturned); + +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +FLTAPI +FltGetInstanceInformation( + _In_ PFLT_INSTANCE Instance, + _In_ INSTANCE_INFORMATION_CLASS InformationClass, + _Out_writes_bytes_to_opt_(BufferSize,*BytesReturned) PVOID Buffer, + _In_ ULONG BufferSize, + _Out_ PULONG BytesReturned); + +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +FLTAPI +FltGetVolumeProperties( + _In_ PFLT_VOLUME Volume, + _Out_writes_bytes_to_opt_(VolumePropertiesLength,*LengthReturned) PFLT_VOLUME_PROPERTIES VolumeProperties, + _In_ ULONG VolumePropertiesLength, + _Out_ PULONG LengthReturned); + +_Must_inspect_result_ +_IRQL_requires_max_(PASSIVE_LEVEL) +NTSTATUS +FLTAPI +FltIsVolumeWritable( + _In_ PVOID FltObject, + _Out_ PBOOLEAN IsWritable); + +_Must_inspect_result_ +_IRQL_requires_max_(PASSIVE_LEVEL) +NTSTATUS +FLTAPI +FltGetVolumeGuidName( + _In_ PFLT_VOLUME Volume, + _Out_ PUNICODE_STRING VolumeGuidName, + _Out_opt_ PULONG BufferSizeNeeded); + +_Must_inspect_result_ +_IRQL_requires_max_(PASSIVE_LEVEL) +NTSTATUS +FLTAPI +FltQueryVolumeInformation( + _In_ PFLT_INSTANCE Instance, + _Out_ PIO_STATUS_BLOCK Iosb, + _Out_writes_bytes_(Length) PVOID FsInformation, + _In_ ULONG Length, + _In_ FS_INFORMATION_CLASS FsInformationClass); + +_Must_inspect_result_ +_IRQL_requires_max_(PASSIVE_LEVEL) +NTSTATUS +FLTAPI +FltSetVolumeInformation( + _In_ PFLT_INSTANCE Instance, + _Out_ PIO_STATUS_BLOCK Iosb, + _Out_writes_bytes_(Length) PVOID FsInformation, + _In_ ULONG Length, + _In_ FS_INFORMATION_CLASS FsInformationClass); + +_Must_inspect_result_ +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +FLTAPI +FltEnumerateFilters( + _Out_writes_to_opt_(FilterListSize,*NumberFiltersReturned) PFLT_FILTER *FilterList, + _In_ ULONG FilterListSize, + _Out_ PULONG NumberFiltersReturned); + +_Must_inspect_result_ +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +FLTAPI +FltEnumerateVolumes( + _In_ PFLT_FILTER Filter, + _Out_writes_to_opt_(VolumeListSize,*NumberVolumesReturned) PFLT_VOLUME *VolumeList, + _In_ ULONG VolumeListSize, + _Out_ PULONG NumberVolumesReturned); + +_Must_inspect_result_ +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +FLTAPI +FltEnumerateInstances( + _In_opt_ PFLT_VOLUME Volume, + _In_opt_ PFLT_FILTER Filter, + _Out_writes_to_opt_(InstanceListSize,*NumberInstancesReturned) PFLT_INSTANCE *InstanceList, + _In_ ULONG InstanceListSize, + _Out_ PULONG NumberInstancesReturned); + +_Must_inspect_result_ +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +FLTAPI +FltEnumerateFilterInformation( + _In_ ULONG Index, + _In_ FILTER_INFORMATION_CLASS InformationClass, + _Out_writes_bytes_to_opt_(BufferSize,*BytesReturned) PVOID Buffer, + _In_ ULONG BufferSize, + _Out_ PULONG BytesReturned); + +_Must_inspect_result_ +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +FLTAPI +FltEnumerateInstanceInformationByFilter( + _In_ PFLT_FILTER Filter, + _In_ ULONG Index, + _In_ INSTANCE_INFORMATION_CLASS InformationClass, + _Out_writes_bytes_to_opt_(BufferSize,*BytesReturned) PVOID Buffer, + _In_ ULONG BufferSize, + _Out_ PULONG BytesReturned); + +_Must_inspect_result_ +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +FLTAPI +FltEnumerateInstanceInformationByVolume( + _In_ PFLT_VOLUME Volume, + _In_ ULONG Index, + _In_ INSTANCE_INFORMATION_CLASS InformationClass, + _Out_writes_bytes_to_opt_(BufferSize,*BytesReturned) PVOID Buffer, + _In_ ULONG BufferSize, + _Out_ PULONG BytesReturned); + +_Must_inspect_result_ +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +FLTAPI +FltEnumerateVolumeInformation( + _In_ PFLT_FILTER Filter, + _In_ ULONG Index, + _In_ FILTER_VOLUME_INFORMATION_CLASS InformationClass, + _Out_writes_bytes_to_opt_(BufferSize,*BytesReturned) PVOID Buffer, + _In_ ULONG BufferSize, + _Out_ PULONG BytesReturned); + +_Must_inspect_result_ +_IRQL_requires_max_(DISPATCH_LEVEL) +NTSTATUS +FLTAPI +FltObjectReference( + _Inout_ PVOID FltObject); + +_IRQL_requires_max_(DISPATCH_LEVEL) +VOID +FLTAPI +FltObjectDereference( + _Inout_ PVOID FltObject); + +_Must_inspect_result_ +_IRQL_requires_max_(PASSIVE_LEVEL) +NTSTATUS +FLTAPI +FltCreateCommunicationPort( + _In_ PFLT_FILTER Filter, + _Outptr_ PFLT_PORT *ServerPort, + _In_ POBJECT_ATTRIBUTES ObjectAttributes, + _In_opt_ PVOID ServerPortCookie, + _In_ PFLT_CONNECT_NOTIFY ConnectNotifyCallback, + _In_ PFLT_DISCONNECT_NOTIFY DisconnectNotifyCallback, + _In_opt_ PFLT_MESSAGE_NOTIFY MessageNotifyCallback, + _In_ LONG MaxConnections); + +_IRQL_requires_max_(PASSIVE_LEVEL) +VOID +FLTAPI +FltCloseCommunicationPort( + _In_ PFLT_PORT ServerPort); + +_IRQL_requires_max_(PASSIVE_LEVEL) +VOID +FLTAPI +FltCloseClientPort( + _In_ PFLT_FILTER Filter, + _Outptr_ PFLT_PORT *ClientPort); + +_Must_inspect_result_ +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +FLTAPI +FltSendMessage( + _In_ PFLT_FILTER Filter, + _In_ PFLT_PORT *ClientPort, + _In_reads_bytes_(SenderBufferLength) PVOID SenderBuffer, + _In_ ULONG SenderBufferLength, + _Out_writes_bytes_opt_(*ReplyLength) PVOID ReplyBuffer, + _Inout_opt_ PULONG ReplyLength, + _In_opt_ PLARGE_INTEGER Timeout); + +_Must_inspect_result_ +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +FLTAPI +FltBuildDefaultSecurityDescriptor( + _Outptr_ PSECURITY_DESCRIPTOR *SecurityDescriptor, + _In_ ACCESS_MASK DesiredAccess); + +_IRQL_requires_max_(APC_LEVEL) +VOID +FLTAPI +FltFreeSecurityDescriptor( + _In_ PSECURITY_DESCRIPTOR SecurityDescriptor); + +_Must_inspect_result_ +_IRQL_requires_max_(DISPATCH_LEVEL) +BOOLEAN +FLTAPI +FltCancelIo( + _In_ PFLT_CALLBACK_DATA CallbackData); + +_IRQL_requires_max_(DISPATCH_LEVEL) +NTSTATUS +FLTAPI +FltSetCancelCompletion( + _In_ PFLT_CALLBACK_DATA CallbackData, + _In_ PFLT_COMPLETE_CANCELED_CALLBACK CanceledCallback); + +_Must_inspect_result_ +_IRQL_requires_max_(DISPATCH_LEVEL) +NTSTATUS +FLTAPI +FltClearCancelCompletion( + _In_ PFLT_CALLBACK_DATA CallbackData); + +BOOLEAN +FLTAPI +FltIsIoCanceled( + _In_ PFLT_CALLBACK_DATA CallbackData); + +_Must_inspect_result_ +_IRQL_requires_max_(DISPATCH_LEVEL) +PFLT_DEFERRED_IO_WORKITEM +FLTAPI +FltAllocateDeferredIoWorkItem(VOID); + +_IRQL_requires_max_(DISPATCH_LEVEL) +VOID +FLTAPI +FltFreeDeferredIoWorkItem( + _In_ PFLT_DEFERRED_IO_WORKITEM FltWorkItem); + +_Must_inspect_result_ +_IRQL_requires_max_(DISPATCH_LEVEL) +PFLT_GENERIC_WORKITEM +FLTAPI +FltAllocateGenericWorkItem(VOID); + +_IRQL_requires_max_(DISPATCH_LEVEL) +VOID +FLTAPI +FltFreeGenericWorkItem( + _In_ PFLT_GENERIC_WORKITEM FltWorkItem); + +_Must_inspect_result_ +_IRQL_requires_max_(DISPATCH_LEVEL) +NTSTATUS +FLTAPI +FltQueueDeferredIoWorkItem( + _In_ PFLT_DEFERRED_IO_WORKITEM FltWorkItem, + _In_ PFLT_CALLBACK_DATA Data, + _In_ PFLT_DEFERRED_IO_WORKITEM_ROUTINE WorkerRoutine, + _In_ WORK_QUEUE_TYPE QueueType, + _In_ PVOID Context); + +_Must_inspect_result_ +_IRQL_requires_max_(DISPATCH_LEVEL) +NTSTATUS +FLTAPI +FltQueueGenericWorkItem( + _In_ PFLT_GENERIC_WORKITEM FltWorkItem, + _In_ PVOID FltObject, + _In_ PFLT_GENERIC_WORKITEM_ROUTINE WorkerRoutine, + _In_ WORK_QUEUE_TYPE QueueType, + _In_opt_ PVOID Context); + +_Must_inspect_result_ +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +FLTAPI +FltLockUserBuffer( + _In_ PFLT_CALLBACK_DATA CallbackData); + +NTSTATUS +FLTAPI +FltDecodeParameters( + _In_ PFLT_CALLBACK_DATA CallbackData, + _Outptr_opt_ PMDL **MdlAddressPointer, + _Outptr_opt_result_bytebuffer_(**Length) PVOID **Buffer, + _Outptr_opt_ PULONG *Length, + _Out_opt_ LOCK_OPERATION *DesiredAccess); + +PMDL +FASTCALL +FltGetSwappedBufferMdlAddress( + _In_ PFLT_CALLBACK_DATA CallbackData); + +VOID +FASTCALL +FltRetainSwappedBufferMdlAddress( + _In_ PFLT_CALLBACK_DATA CallbackData); + +NTSTATUS +FLTAPI +FltCbdqInitialize( + _In_ PFLT_INSTANCE Instance, + _Inout_ PFLT_CALLBACK_DATA_QUEUE Cbdq, + _In_ PFLT_CALLBACK_DATA_QUEUE_INSERT_IO CbdqInsertIo, + _In_ PFLT_CALLBACK_DATA_QUEUE_REMOVE_IO CbdqRemoveIo, + _In_ PFLT_CALLBACK_DATA_QUEUE_PEEK_NEXT_IO CbdqPeekNextIo, + _In_ PFLT_CALLBACK_DATA_QUEUE_ACQUIRE CbdqAcquire, + _In_ PFLT_CALLBACK_DATA_QUEUE_RELEASE CbdqRelease, + _In_ PFLT_CALLBACK_DATA_QUEUE_COMPLETE_CANCELED_IO CbdqCompleteCanceledIo); + +VOID +FLTAPI +FltCbdqEnable( + _Inout_ PFLT_CALLBACK_DATA_QUEUE Cbdq); + +VOID +FLTAPI +FltCbdqDisable( + _Inout_ PFLT_CALLBACK_DATA_QUEUE Cbdq); + +_Must_inspect_result_ +NTSTATUS +FLTAPI +FltCbdqInsertIo( + _Inout_ PFLT_CALLBACK_DATA_QUEUE Cbdq, + _In_ PFLT_CALLBACK_DATA Cbd, + _In_opt_ PFLT_CALLBACK_DATA_QUEUE_IO_CONTEXT Context, + _In_opt_ PVOID InsertContext); + +_Must_inspect_result_ +PFLT_CALLBACK_DATA +FLTAPI +FltCbdqRemoveIo( + _Inout_ PFLT_CALLBACK_DATA_QUEUE Cbdq, + _In_ PFLT_CALLBACK_DATA_QUEUE_IO_CONTEXT Context); + +_Must_inspect_result_ +PFLT_CALLBACK_DATA +FLTAPI +FltCbdqRemoveNextIo( + _Inout_ PFLT_CALLBACK_DATA_QUEUE Cbdq, + _In_opt_ PVOID PeekContext); + +_IRQL_requires_max_(APC_LEVEL) +VOID +FLTAPI +FltInitializeOplock( + _Out_ POPLOCK Oplock); + +_IRQL_requires_max_(APC_LEVEL) +VOID +FLTAPI +FltUninitializeOplock( + _In_ POPLOCK Oplock); + +_Must_inspect_result_ +_IRQL_requires_max_(APC_LEVEL) +FLT_PREOP_CALLBACK_STATUS +FLTAPI +FltOplockFsctrl( + _In_ POPLOCK Oplock, + _In_ PFLT_CALLBACK_DATA CallbackData, + _In_ ULONG OpenCount); + +_Must_inspect_result_ +_IRQL_requires_max_(APC_LEVEL) +FLT_PREOP_CALLBACK_STATUS +FLTAPI +FltCheckOplock( + _In_ POPLOCK Oplock, + _In_ PFLT_CALLBACK_DATA CallbackData, + _In_opt_ PVOID Context, + _In_opt_ PFLTOPLOCK_WAIT_COMPLETE_ROUTINE WaitCompletionRoutine, + _In_opt_ PFLTOPLOCK_PREPOST_CALLBACKDATA_ROUTINE PrePostCallbackDataRoutine); + +_IRQL_requires_max_(APC_LEVEL) +BOOLEAN +FLTAPI +FltOplockIsFastIoPossible( + _In_ POPLOCK Oplock); + +_IRQL_requires_max_(APC_LEVEL) +BOOLEAN +FLTAPI +FltCurrentBatchOplock( + _In_ POPLOCK Oplock); + +VOID +FLTAPI +FltInitializeFileLock( + _Out_ PFILE_LOCK FileLock); + +VOID +FLTAPI +FltUninitializeFileLock( + _In_ PFILE_LOCK FileLock); + +_Must_inspect_result_ +_IRQL_requires_max_(APC_LEVEL) +PFILE_LOCK +FLTAPI +FltAllocateFileLock( + _In_opt_ PFLT_COMPLETE_LOCK_CALLBACK_DATA_ROUTINE CompleteLockCallbackDataRoutine, + _In_opt_ PUNLOCK_ROUTINE UnlockRoutine); + +_IRQL_requires_max_(APC_LEVEL) +VOID +FLTAPI +FltFreeFileLock( + _In_ PFILE_LOCK FileLock); + +_Must_inspect_result_ +_IRQL_requires_max_(APC_LEVEL) +FLT_PREOP_CALLBACK_STATUS +FLTAPI +FltProcessFileLock( + _In_ PFILE_LOCK FileLock, + _In_ PFLT_CALLBACK_DATA CallbackData, + _In_opt_ PVOID Context); + +_Must_inspect_result_ +_IRQL_requires_max_(APC_LEVEL) +BOOLEAN +FLTAPI +FltCheckLockForReadAccess( + _In_ PFILE_LOCK FileLock, + _In_ PFLT_CALLBACK_DATA CallbackData); + +_Must_inspect_result_ +_IRQL_requires_max_(APC_LEVEL) +BOOLEAN +FLTAPI +FltCheckLockForWriteAccess( + _In_ PFILE_LOCK FileLock, + _In_ PFLT_CALLBACK_DATA CallbackData); + +_Acquires_lock_(_Global_critical_region_) +_IRQL_requires_max_(APC_LEVEL) +VOID +FLTAPI +FltAcquireResourceExclusive( + _Inout_ _Requires_lock_not_held_(*_Curr_) _Acquires_lock_(*_Curr_) PERESOURCE Resource); + +_Acquires_lock_(_Global_critical_region_) +_IRQL_requires_max_(APC_LEVEL) +VOID +FLTAPI +FltAcquireResourceShared( + _Inout_ _Requires_lock_not_held_(*_Curr_) _Acquires_lock_(*_Curr_) PERESOURCE Resource); + +_Releases_lock_(_Global_critical_region_) +_IRQL_requires_max_(DISPATCH_LEVEL) +VOID +FLTAPI +FltReleaseResource( + _Inout_ _Requires_lock_held_(*_Curr_) _Releases_lock_(*_Curr_) PERESOURCE Resource); + +_IRQL_requires_max_(APC_LEVEL) +VOID +FLTAPI +FltInitializePushLock( + _Out_ PEX_PUSH_LOCK PushLock); + +_IRQL_requires_max_(APC_LEVEL) +VOID +FLTAPI +FltDeletePushLock( + _In_ PEX_PUSH_LOCK PushLock); + +_Acquires_lock_(_Global_critical_region_) +_IRQL_requires_max_(APC_LEVEL) +VOID +FLTAPI +FltAcquirePushLockExclusive( + _Inout_ _Requires_lock_not_held_(*_Curr_) _Acquires_lock_(*_Curr_) PEX_PUSH_LOCK PushLock); + +_Acquires_lock_(_Global_critical_region_) +_IRQL_requires_max_(APC_LEVEL) +VOID +FLTAPI +FltAcquirePushLockShared( + _Inout_ _Requires_lock_not_held_(*_Curr_) _Acquires_lock_(*_Curr_) PEX_PUSH_LOCK PushLock); + +_Releases_lock_(_Global_critical_region_) +_IRQL_requires_max_(APC_LEVEL) +VOID +FLTAPI +FltReleasePushLock( + _Inout_ _Requires_lock_held_(*_Curr_) _Releases_lock_(*_Curr_) PEX_PUSH_LOCK PushLock); + +BOOLEAN +FLTAPI +FltIsOperationSynchronous( + _In_ PFLT_CALLBACK_DATA CallbackData); + +_IRQL_requires_max_(DISPATCH_LEVEL) +BOOLEAN +FLTAPI +FltIs32bitProcess( + _In_opt_ PFLT_CALLBACK_DATA CallbackData); + +_IRQL_requires_max_(DISPATCH_LEVEL) +PEPROCESS +FLTAPI +FltGetRequestorProcess( + _In_ PFLT_CALLBACK_DATA CallbackData); + +_IRQL_requires_max_(DISPATCH_LEVEL) +ULONG +FLTAPI +FltGetRequestorProcessId( + _In_ PFLT_CALLBACK_DATA CallbackData); + +_IRQL_requires_max_(APC_LEVEL) +VOID +FLTAPI +FltNotifyFilterChangeDirectory( + _Inout_ PNOTIFY_SYNC NotifySync, + _Inout_ PLIST_ENTRY NotifyList, + _In_ PVOID FsContext, + _In_ PSTRING FullDirectoryName, + _In_ BOOLEAN WatchTree, + _In_ BOOLEAN IgnoreBuffer, + _In_ ULONG CompletionFilter, + _In_ PFLT_CALLBACK_DATA NotifyCallbackData, + _In_opt_ PCHECK_FOR_TRAVERSE_ACCESS TraverseCallback, + _In_opt_ PSECURITY_SUBJECT_CONTEXT SubjectContext, + _In_opt_ PFILTER_REPORT_CHANGE FilterCallback); + +PCHAR +FLTAPI +FltGetIrpName( + _In_ UCHAR IrpMajorCode); + +#if FLT_MGR_AFTER_XPSP2 + +_Must_inspect_result_ +_IRQL_requires_max_(PASSIVE_LEVEL) +NTSTATUS +FLTAPI +FltCreateFileEx( + _In_ PFLT_FILTER Filter, + _In_opt_ PFLT_INSTANCE Instance, + _Out_ PHANDLE FileHandle, + _Outptr_opt_ PFILE_OBJECT *FileObject, + _In_ ACCESS_MASK DesiredAccess, + _In_ POBJECT_ATTRIBUTES ObjectAttributes, + _Out_ PIO_STATUS_BLOCK IoStatusBlock, + _In_opt_ PLARGE_INTEGER AllocationSize, + _In_ ULONG FileAttributes, + _In_ ULONG ShareAccess, + _In_ ULONG CreateDisposition, + _In_ ULONG CreateOptions, + _In_reads_bytes_opt_(EaLength) PVOID EaBuffer, + _In_ ULONG EaLength, + _In_ ULONG Flags); + +_Must_inspect_result_ +_IRQL_requires_max_(PASSIVE_LEVEL) +NTSTATUS +FLTAPI +FltOpenVolume( + _In_ PFLT_INSTANCE Instance, + _Out_ PHANDLE VolumeHandle, + _Outptr_opt_ PFILE_OBJECT *VolumeFileObject); + +_Must_inspect_result_ +_IRQL_requires_max_(PASSIVE_LEVEL) +NTSTATUS +FLTAPI +FltQueryEaFile( + _In_ PFLT_INSTANCE Instance, + _In_ PFILE_OBJECT FileObject, + _Out_writes_bytes_to_(Length,*LengthReturned) PVOID ReturnedEaData, + _In_ ULONG Length, + _In_ BOOLEAN ReturnSingleEntry, + _In_reads_bytes_opt_(EaListLength) PVOID EaList, + _In_ ULONG EaListLength, + _In_opt_ PULONG EaIndex, + _In_ BOOLEAN RestartScan, + _Out_opt_ PULONG LengthReturned); + +_Must_inspect_result_ +_IRQL_requires_max_(PASSIVE_LEVEL) +NTSTATUS +FLTAPI +FltSetEaFile( + _In_ PFLT_INSTANCE Instance, + _In_ PFILE_OBJECT FileObject, + _In_reads_bytes_(Length) PVOID EaBuffer, + _In_ ULONG Length); + +#endif /* FLT_MGR_AFTER_XPSP2 */ + +#if FLT_MGR_LONGHORN + +_Must_inspect_result_ +_IRQL_requires_max_(PASSIVE_LEVEL) +NTSTATUS +FLTAPI +FltCreateFileEx2( + _In_ PFLT_FILTER Filter, + _In_opt_ PFLT_INSTANCE Instance, + _Out_ PHANDLE FileHandle, + _Outptr_opt_ PFILE_OBJECT *FileObject, + _In_ ACCESS_MASK DesiredAccess, + _In_ POBJECT_ATTRIBUTES ObjectAttributes, + _Out_ PIO_STATUS_BLOCK IoStatusBlock, + _In_opt_ PLARGE_INTEGER AllocationSize, + _In_ ULONG FileAttributes, + _In_ ULONG ShareAccess, + _In_ ULONG CreateDisposition, + _In_ ULONG CreateOptions, + _In_reads_bytes_opt_(EaLength) PVOID EaBuffer, + _In_ ULONG EaLength, + _In_ ULONG Flags, + _In_opt_ PIO_DRIVER_CREATE_CONTEXT DriverContext); + +_Must_inspect_result_ +_IRQL_requires_max_(PASSIVE_LEVEL) +NTSTATUS +FLTAPI +FltQueryDirectoryFile( + _In_ PFLT_INSTANCE Instance, + _In_ PFILE_OBJECT FileObject, + _Out_writes_bytes_(Length) PVOID FileInformation, + _In_ ULONG Length, + _In_ FILE_INFORMATION_CLASS FileInformationClass, + _In_ BOOLEAN ReturnSingleEntry, + _In_opt_ PUNICODE_STRING FileName, + _In_ BOOLEAN RestartScan, + _Out_opt_ PULONG LengthReturned); + +_IRQL_requires_max_(APC_LEVEL) +BOOLEAN +FLTAPI +FltSupportsFileContextsEx( + _In_ PFILE_OBJECT FileObject, + _In_opt_ PFLT_INSTANCE Instance); + +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +FLTAPI +FltSetTransactionContext( + _In_ PFLT_INSTANCE Instance, + _In_ PKTRANSACTION Transaction, + _In_ FLT_SET_CONTEXT_OPERATION Operation, + _In_ PFLT_CONTEXT NewContext, + _Outptr_opt_ PFLT_CONTEXT *OldContext); + +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +FLTAPI +FltDeleteTransactionContext( + _In_ PFLT_INSTANCE Instance, + _In_ PKTRANSACTION Transaction, + _Outptr_opt_ PFLT_CONTEXT *OldContext); + +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +FLTAPI +FltGetTransactionContext( + _In_ PFLT_INSTANCE Instance, + _In_ PKTRANSACTION Transaction, + _Outptr_ PFLT_CONTEXT *Context); + +_IRQL_requires_max_(APC_LEVEL) +BOOLEAN +FLTAPI +FltIsFltMgrVolumeDeviceObject( + _In_ PDEVICE_OBJECT DeviceObject); + +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +FLTAPI +FltGetVolumeInformation( + _In_ PFLT_VOLUME Volume, + _In_ FILTER_VOLUME_INFORMATION_CLASS InformationClass, + _Out_writes_bytes_to_opt_(BufferSize,*BytesReturned) PVOID Buffer, + _In_ ULONG BufferSize, + _Out_ PULONG BytesReturned); + +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +FLTAPI +FltGetFileSystemType( + _In_ PVOID FltObject, + _Out_ PFLT_FILESYSTEM_TYPE FileSystemType); + +_Must_inspect_result_ +_IRQL_requires_max_(PASSIVE_LEVEL) +NTSTATUS +FLTAPI +FltIsVolumeSnapshot( + _In_ PVOID FltObject, + _Out_ PBOOLEAN IsSnapshotVolume); + +_Must_inspect_result_ +_When_(((CallbackData!=NULL) && FLT_IS_IRP_OPERATION(CallbackData)), _IRQL_requires_max_(PASSIVE_LEVEL)) +_When_((!((CallbackData!=NULL) && FLT_IS_IRP_OPERATION(CallbackData))), _IRQL_requires_max_(APC_LEVEL)) +NTSTATUS +FLTAPI +FltCancellableWaitForSingleObject( + _In_ PVOID Object, + _In_opt_ PLARGE_INTEGER Timeout, + _In_opt_ PFLT_CALLBACK_DATA CallbackData); + +_Must_inspect_result_ +_When_(((CallbackData!=NULL) && FLT_IS_IRP_OPERATION(CallbackData)), _IRQL_requires_max_(PASSIVE_LEVEL)) +_When_((!((CallbackData!=NULL) && FLT_IS_IRP_OPERATION(CallbackData))), _IRQL_requires_max_(APC_LEVEL)) +NTSTATUS +FLTAPI +FltCancellableWaitForMultipleObjects( + _In_ ULONG Count, + _In_reads_(Count) PVOID ObjectArray[], + _In_ WAIT_TYPE WaitType, + _In_opt_ PLARGE_INTEGER Timeout, + _In_opt_ PKWAIT_BLOCK WaitBlockArray, + _In_ PFLT_CALLBACK_DATA CallbackData); + +_IRQL_requires_max_(DISPATCH_LEVEL) +HANDLE +FLTAPI +FltGetRequestorProcessIdEx( + _In_ PFLT_CALLBACK_DATA CallbackData); + +_Must_inspect_result_ +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +FLTAPI +FltEnlistInTransaction( + _In_ PFLT_INSTANCE Instance, + _In_ PKTRANSACTION Transaction, + _In_ PFLT_CONTEXT TransactionContext, + _In_ NOTIFICATION_MASK NotificationMask); + +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +FLTAPI +FltRollbackEnlistment( + _In_ PFLT_INSTANCE Instance, + _In_ PKTRANSACTION Transaction, + _In_opt_ PFLT_CONTEXT TransactionContext); + +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +FLTAPI +FltPrePrepareComplete( + _In_ PFLT_INSTANCE Instance, + _In_ PKTRANSACTION Transaction, + _In_opt_ PFLT_CONTEXT TransactionContext); + +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +FLTAPI +FltPrepareComplete( + _In_ PFLT_INSTANCE Instance, + _In_ PKTRANSACTION Transaction, + _In_opt_ PFLT_CONTEXT TransactionContext); + +_IRQL_requires_max_(PASSIVE_LEVEL) +NTSTATUS +FLTAPI +FltCommitComplete( + _In_ PFLT_INSTANCE Instance, + _In_ PKTRANSACTION Transaction, + _In_opt_ PFLT_CONTEXT TransactionContext); + +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +FLTAPI +FltCommitFinalizeComplete( + _In_ PFLT_INSTANCE Instance, + _In_ PKTRANSACTION Transaction, + _In_opt_ PFLT_CONTEXT TransactionContext); + +_IRQL_requires_max_(PASSIVE_LEVEL) +NTSTATUS +FLTAPI +FltRollbackComplete( + _In_ PFLT_INSTANCE Instance, + _In_ PKTRANSACTION Transaction, + _In_opt_ PFLT_CONTEXT TransactionContext); + +_Must_inspect_result_ +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +FLTAPI +FltAllocateExtraCreateParameterList( + _In_ PFLT_FILTER Filter, + _In_ FSRTL_ALLOCATE_ECPLIST_FLAGS Flags, + _Outptr_ PECP_LIST *EcpList); + +_Must_inspect_result_ +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +FLTAPI +FltAllocateExtraCreateParameter( + _In_ PFLT_FILTER Filter, + _In_ LPCGUID EcpType, + ULONG SizeOfContext, + _In_ FSRTL_ALLOCATE_ECP_FLAGS Flags, + _In_opt_ PFSRTL_EXTRA_CREATE_PARAMETER_CLEANUP_CALLBACK CleanupCallback, + _In_ ULONG PoolTag, + _Outptr_ PVOID *EcpContext); + +_IRQL_requires_max_(APC_LEVEL) +VOID +FLTAPI +FltInitExtraCreateParameterLookasideList( + _In_ PFLT_FILTER Filter, + _Inout_ PVOID Lookaside, + _In_ FSRTL_ECP_LOOKASIDE_FLAGS Flags, + _In_ SIZE_T Size, + _In_ ULONG Tag); + +_IRQL_requires_max_(APC_LEVEL) +VOID +FLTAPI +FltDeleteExtraCreateParameterLookasideList( + _In_ PFLT_FILTER Filter, + _Inout_ PVOID Lookaside, + _In_ FSRTL_ECP_LOOKASIDE_FLAGS Flags); + +_Must_inspect_result_ +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +FLTAPI +FltAllocateExtraCreateParameterFromLookasideList( + _In_ PFLT_FILTER Filter, + _In_ LPCGUID EcpType, + _In_ ULONG SizeOfContext, + _In_ FSRTL_ALLOCATE_ECP_FLAGS Flags, + _In_opt_ PFSRTL_EXTRA_CREATE_PARAMETER_CLEANUP_CALLBACK CleanupCallback, + _Inout_ PVOID LookasideList, + _Outptr_ PVOID *EcpContext); + +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +FLTAPI +FltInsertExtraCreateParameter( + _In_ PFLT_FILTER Filter, + _Inout_ PECP_LIST EcpList, + _Inout_ PVOID EcpContext); + +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +FLTAPI +FltFindExtraCreateParameter( + _In_ PFLT_FILTER Filter, + _In_ PECP_LIST EcpList, + _In_ LPCGUID EcpType, + _Outptr_opt_ PVOID *EcpContext, + _Out_opt_ ULONG *EcpContextSize); + +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +FLTAPI +FltRemoveExtraCreateParameter( + _In_ PFLT_FILTER Filter, + _Inout_ PECP_LIST EcpList, + _In_ LPCGUID EcpType, + _Outptr_ PVOID *EcpContext, + _Out_opt_ ULONG *EcpContextSize); + +_IRQL_requires_max_(APC_LEVEL) +VOID +FLTAPI +FltFreeExtraCreateParameterList( + _In_ PFLT_FILTER Filter, + _In_ PECP_LIST EcpList); + +_IRQL_requires_max_(APC_LEVEL) +VOID +FLTAPI +FltFreeExtraCreateParameter( + _In_ PFLT_FILTER Filter, + _In_ PVOID EcpContext); + +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +FLTAPI +FltGetEcpListFromCallbackData( + _In_ PFLT_FILTER Filter, + _In_ PFLT_CALLBACK_DATA CallbackData, + _Outptr_result_maybenull_ PECP_LIST *EcpList); + +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +FLTAPI +FltSetEcpListIntoCallbackData( + _In_ PFLT_FILTER Filter, + _In_ PFLT_CALLBACK_DATA CallbackData, + _In_ PECP_LIST EcpList); + +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +FLTAPI +FltGetNextExtraCreateParameter( + _In_ PFLT_FILTER Filter, + _In_ PECP_LIST EcpList, + _In_opt_ PVOID CurrentEcpContext, + _Out_opt_ LPGUID NextEcpType, + _Outptr_opt_ PVOID *NextEcpContext, + _Out_opt_ ULONG *NextEcpContextSize); + +_IRQL_requires_max_(APC_LEVEL) +VOID +FLTAPI +FltAcknowledgeEcp( + _In_ PFLT_FILTER Filter, + _In_ PVOID EcpContext); + +_IRQL_requires_max_(APC_LEVEL) +BOOLEAN +FLTAPI +FltIsEcpAcknowledged( + _In_ PFLT_FILTER Filter, + _In_ PVOID EcpContext); + +_IRQL_requires_max_(APC_LEVEL) +BOOLEAN +FLTAPI +FltIsEcpFromUserMode( + _In_ PFLT_FILTER Filter, + _In_ PVOID EcpContext); + +_IRQL_requires_max_(DISPATCH_LEVEL) +NTSTATUS +FLTAPI +FltRetrieveIoPriorityInfo( + _In_opt_ PFLT_CALLBACK_DATA Data, + _In_opt_ PFILE_OBJECT FileObject, + _In_opt_ PETHREAD Thread, + _Inout_ PIO_PRIORITY_INFO PriorityInfo); + +_IRQL_requires_max_(DISPATCH_LEVEL) +NTSTATUS +FLTAPI +FltApplyPriorityInfoThread( + _In_ PIO_PRIORITY_INFO InputPriorityInfo, + _Out_opt_ PIO_PRIORITY_INFO OutputPriorityInfo, + _In_ PETHREAD Thread); + +_IRQL_requires_max_(DISPATCH_LEVEL) +IO_PRIORITY_HINT +FLTAPI +FltGetIoPriorityHint( + _In_ PFLT_CALLBACK_DATA Data); + +_IRQL_requires_max_(DISPATCH_LEVEL) +IO_PRIORITY_HINT +FLTAPI +FltGetIoPriorityHintFromCallbackData( + _In_ PFLT_CALLBACK_DATA Data); + +_IRQL_requires_max_(DISPATCH_LEVEL) +NTSTATUS +FLTAPI +FltSetIoPriorityHintIntoCallbackData( + _In_ PFLT_CALLBACK_DATA Data, + _In_ IO_PRIORITY_HINT PriorityHint); + +_IRQL_requires_max_(DISPATCH_LEVEL) +IO_PRIORITY_HINT +FLTAPI +FltGetIoPriorityHintFromFileObject( + _In_ PFILE_OBJECT FileObject); + +_Must_inspect_result_ +_IRQL_requires_max_(DISPATCH_LEVEL) +NTSTATUS +FLTAPI +FltSetIoPriorityHintIntoFileObject( + _In_ PFILE_OBJECT FileObject, + _In_ IO_PRIORITY_HINT PriorityHint); + +_IRQL_requires_max_(DISPATCH_LEVEL) +IO_PRIORITY_HINT +FLTAPI +FltGetIoPriorityHintFromThread( + _In_ PETHREAD Thread); + +_IRQL_requires_max_(DISPATCH_LEVEL) +NTSTATUS +FLTAPI +FltSetIoPriorityHintIntoThread( + _In_ PETHREAD Thread, + _In_ IO_PRIORITY_HINT PriorityHint); + +#endif /* FLT_MGR_LONGHORN */ + +#if FLT_MGR_WIN7 + +_Must_inspect_result_ +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +FLTAPI +FltAllocateCallbackDataEx( + _In_ PFLT_INSTANCE Instance, + _In_opt_ PFILE_OBJECT FileObject, + _In_ FLT_ALLOCATE_CALLBACK_DATA_FLAGS Flags, + _Outptr_ PFLT_CALLBACK_DATA *RetNewCallbackData); + +_Must_inspect_result_ +_IRQL_requires_max_(DPC_LEVEL) +PVOID +FLTAPI +FltGetNewSystemBufferAddress( + _In_ PFLT_CALLBACK_DATA CallbackData); + +_Must_inspect_result_ +_IRQL_requires_max_(APC_LEVEL) +FLT_PREOP_CALLBACK_STATUS +FLTAPI +FltCheckOplockEx( + _In_ POPLOCK Oplock, + _In_ PFLT_CALLBACK_DATA CallbackData, + _In_ ULONG Flags, + _In_opt_ PVOID Context, + _In_opt_ PFLTOPLOCK_WAIT_COMPLETE_ROUTINE WaitCompletionRoutine, + _In_opt_ PFLTOPLOCK_PREPOST_CALLBACKDATA_ROUTINE PrePostCallbackDataRoutine); + +_IRQL_requires_max_(APC_LEVEL) +BOOLEAN +FLTAPI +FltCurrentOplock( + _In_ POPLOCK Oplock); + +_IRQL_requires_max_(APC_LEVEL) +BOOLEAN +FLTAPI +FltCurrentOplockH( + _In_ POPLOCK Oplock); + +_IRQL_requires_max_(APC_LEVEL) +FLT_PREOP_CALLBACK_STATUS +FLTAPI +FltOplockBreakH( + _In_ POPLOCK Oplock, + _In_ PFLT_CALLBACK_DATA CallbackData, + _In_ ULONG Flags, + _In_opt_ PVOID Context, + _In_opt_ PFLTOPLOCK_WAIT_COMPLETE_ROUTINE WaitCompletionRoutine, + _In_opt_ PFLTOPLOCK_PREPOST_CALLBACKDATA_ROUTINE PrePostCallbackDataRoutine); + +_IRQL_requires_max_(APC_LEVEL) +FLT_PREOP_CALLBACK_STATUS +FLTAPI +FltOplockBreakToNone( + _In_ POPLOCK Oplock, + _In_ PFLT_CALLBACK_DATA CallbackData, + _In_opt_ PVOID Context, + _In_opt_ PFLTOPLOCK_WAIT_COMPLETE_ROUTINE WaitCompletionRoutine, + _In_opt_ PFLTOPLOCK_PREPOST_CALLBACKDATA_ROUTINE PrePostCallbackDataRoutine); + +_IRQL_requires_max_(APC_LEVEL) +FLT_PREOP_CALLBACK_STATUS +FLTAPI +FltOplockBreakToNoneEx( + _In_ POPLOCK Oplock, + _In_ PFLT_CALLBACK_DATA CallbackData, + _In_ ULONG Flags, + _In_opt_ PVOID Context, + _In_opt_ PFLTOPLOCK_WAIT_COMPLETE_ROUTINE WaitCompletionRoutine, + _In_opt_ PFLTOPLOCK_PREPOST_CALLBACKDATA_ROUTINE PrePostCallbackDataRoutine); + +_IRQL_requires_max_(APC_LEVEL) +BOOLEAN +FLTAPI +FltOplockIsSharedRequest( + _In_ PFLT_CALLBACK_DATA CallbackData); + +_Must_inspect_result_ +_IRQL_requires_max_(APC_LEVEL) +FLT_PREOP_CALLBACK_STATUS +FLTAPI +FltOplockFsctrlEx( + _In_ POPLOCK Oplock, + _In_ PFLT_CALLBACK_DATA CallbackData, + _In_ ULONG OpenCount, + _In_ ULONG Flags); + +BOOLEAN +FLTAPI +FltOplockKeysEqual( + _In_opt_ PFILE_OBJECT Fo1, + _In_opt_ PFILE_OBJECT Fo2); + +_Must_inspect_result_ +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +FLTAPI +FltGetRequestorSessionId( + _In_ PFLT_CALLBACK_DATA CallbackData, + _Out_ PULONG SessionId); + +_IRQL_requires_max_(DISPATCH_LEVEL) +NTSTATUS +FLTAPI +FltAdjustDeviceStackSizeForIoRedirection( + _In_ PFLT_INSTANCE SourceInstance, + _In_ PFLT_INSTANCE TargetInstance, + _Out_opt_ PBOOLEAN SourceDeviceStackSizeModified); + +_IRQL_requires_max_(DISPATCH_LEVEL) +NTSTATUS +FLTAPI +FltIsIoRedirectionAllowed( + _In_ PFLT_INSTANCE SourceInstance, + _In_ PFLT_INSTANCE TargetInstance, + _Out_ PBOOLEAN RedirectionAllowed); + +_IRQL_requires_max_(DISPATCH_LEVEL) +NTSTATUS +FLTAPI +FltIsIoRedirectionAllowedForOperation( + _In_ PFLT_CALLBACK_DATA Data, + _In_ PFLT_INSTANCE TargetInstance, + _Out_ PBOOLEAN RedirectionAllowedThisIo, + _Out_opt_ PBOOLEAN RedirectionAllowedAllIo); + +#endif /* FLT_MGR_WIN7 */ + +#endif /* FLT_MGR_BASELINE */ + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* __FLTKERNEL__ */ Propchange: trunk/reactos/include/ddk/fltkernel.h ------------------------------------------------------------------------------ svn:eol-style = native
12 years, 11 months
1
0
0
0
[cgutman] 55000: - Merge the remaining portion of the wlan-bringup branch - ReactOS now supports open and WEP encrypted networks (both ad-hoc and infrastructure) (WPA(2) will be supported later) - ...
by cgutman@svn.reactos.org
Author: cgutman Date: Tue Jan 17 23:11:28 2012 New Revision: 55000 URL:
http://svn.reactos.org/svn/reactos?rev=55000&view=rev
Log: - Merge the remaining portion of the wlan-bringup branch - ReactOS now supports open and WEP encrypted networks (both ad-hoc and infrastructure) (WPA(2) will be supported later) - Use the wlanconf tool to configure the WLAN adapter (after installing the XP driver for your WLAN adapter) - "wlanconf -c <SSID>" connects to an infrastructure network. Adding the "-a" option connects to (or creates) an ad-hoc network. Adding "-w <WEP>" will enable WEP encryption using the supplied key. - "wlanconf -s" will scan and display a list of the surrounding networks and various attributes like signal strength, SSID, BSSID, network mode, and supported rates - "wlanconf" will display the current WLAN configuration details if the adapter is connected - The DHCP service will detect network changes and refresh its state accordingly when associating with a new wireless network Added: trunk/reactos/base/applications/network/wlanconf/ - copied from r54998, branches/wlan-bringup/base/applications/network/wlanconf/ trunk/reactos/drivers/network/ndisuio/ - copied from r54998, branches/wlan-bringup/drivers/network/ndisuio/ trunk/reactos/include/reactos/drivers/ndisuio/ - copied from r54998, branches/wlan-bringup/include/reactos/drivers/ndisuio/ Modified: trunk/reactos/ (props changed) trunk/reactos/base/applications/network/CMakeLists.txt trunk/reactos/base/applications/network/network.rbuild trunk/reactos/boot/bootdata/hivesys_i386.inf trunk/reactos/boot/bootdata/packages/reactos.dff trunk/reactos/drivers/network/CMakeLists.txt trunk/reactos/drivers/network/directory.rbuild trunk/reactos/include/psdk/ntddndis.h Propchange: trunk/reactos/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Tue Jan 17 23:11:28 2012 @@ -10,4 +10,4 @@ /branches/ros-amd64-bringup/reactos:34711-34712,34741,34743,34770,34780-34782,34803,34812,34839,34842,34864,34870,34874,34877,34908-34909,34917,34965,35323-35324,35347-35348,35361,35436,35509,35515,35588,35655,35683,35739,35746,35762,35771,35777,35781,35789,35805,35823,35827,35902,35904-35906,35942,35947-35949,35952-35953,35966,36011-36013,36172,36360,36380,36388-36389,36393,36397,36443,36445,36475,36502-36503,36505,36570,36614,36852,36898-36899,36930,36936,36949,36951,36958,36961,36964,36969,36972,36987-36988,36990,36992,37019,37322-37323,37333-37334,37434,37472,37475,37536,37820-37821,37868-37869,37873,37990-37991,38013-38014,38092,38100,38148-38151,38264-38265,38268,38355,39151,39333,39335,39345,39639,40120,40122-40123,40125,40127-40128,40155,40247,40324,40608,40753,40926-40928,40986-40987,40989,40991,40993,40995-40996,41000-41001,41027-41030,41044-41045,41047-41050,41052,41070,41082-41086,41097-41098,41101,41449,41479-41480,41483-41485,41499-41500,41502,41531,41536,41540,41546-41547,41549,43080,43426,43451,43454,43506,43566,43574,43598,43600-43602,43604-43605,43677,43682,43757,43775,43836,43838-43840,43852,43857-43858,43860,43905-43907,43952,43954,43965,43969,43979,43981,43992,44002,44036-44037,44039-44040,44044-44045,44053,44065,44095,44123,44143-44144,44205,44238,44257,44259,44294,44338-44339,44385,44389,44391,44426,44460,44467-44468,44470-44471,44499,44501,44503-44504,44506,44510-44512,44521,44523-44526,44530,44540,44601,44634,44639,44772,44818,45124,45126-45127,45430,46394,46404,46478,46511,46523-46524,46526,46534-46535,46537-46539,46589,46805,46868,47472,47846-47847,47878,47882 /branches/shell32_new-bringup:51893-53652,53661,53700 /branches/tcp-rewrite-branch:48720,48840-48841,49424-49426,49454 -/branches/wlan-bringup:54895-54896,54899,54912-54913,54915-54916,54929-54930,54932-54934,54939,54941-54942,54944-54947,54980 +/branches/wlan-bringup:54809-54998 Modified: trunk/reactos/base/applications/network/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/network/…
============================================================================== --- trunk/reactos/base/applications/network/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/base/applications/network/CMakeLists.txt [iso-8859-1] Tue Jan 17 23:11:28 2012 @@ -14,3 +14,5 @@ endif() add_subdirectory(tracert) add_subdirectory(whois) +add_subdirectory(wlanconf) + Modified: trunk/reactos/base/applications/network/network.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/network/…
============================================================================== --- trunk/reactos/base/applications/network/network.rbuild [iso-8859-1] (original) +++ trunk/reactos/base/applications/network/network.rbuild [iso-8859-1] Tue Jan 17 23:11:28 2012 @@ -40,4 +40,7 @@ <directory name="whois"> <xi:include href="whois/whois.rbuild" /> </directory> + <directory name="wlanconf"> + <xi:include href="wlanconf/wlanconf.rbuild" /> + </directory> </group> Modified: trunk/reactos/boot/bootdata/hivesys_i386.inf URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/hivesys_i386…
============================================================================== --- trunk/reactos/boot/bootdata/hivesys_i386.inf [iso-8859-1] (original) +++ trunk/reactos/boot/bootdata/hivesys_i386.inf [iso-8859-1] Tue Jan 17 23:11:28 2012 @@ -1398,6 +1398,13 @@ HKLM,"SYSTEM\CurrentControlSet\Services\NMIDebug","ImagePath",0x00020000,"system32\drivers\nmidebug.sys" HKLM,"SYSTEM\CurrentControlSet\Services\NMIDebug","Start",0x00010001,0x00000000 HKLM,"SYSTEM\CurrentControlSet\Services\NMIDebug","Type",0x00010001,0x00000001 + +; NDIS User I/O driver (FIXME: Should be installed via INF and started on demand) +HKLM,"SYSTEM\CurrentControlSet\Services\Ndisuio","ErrorControl",0x00010001,0x00000001 +HKLM,"SYSTEM\CurrentControlSet\Services\Ndisuio","Group",0x00000000,"NDIS" +HKLM,"SYSTEM\CurrentControlSet\Services\Ndisuio","ImagePath",0x00020000,"system32\drivers\ndisuio.sys" +HKLM,"SYSTEM\CurrentControlSet\Services\Ndisuio","Start",0x00010001,0x00000001 +HKLM,"SYSTEM\CurrentControlSet\Services\Ndisuio","Type",0x00010001,0x00000001 ; Packet driver HKLM,"SYSTEM\CurrentControlSet\Services\Packet","ErrorControl",0x00010001,0x00000001 @@ -1629,7 +1636,7 @@ HKLM,"SYSTEM\CurrentControlSet\Services\WlanSvc","Group",0x00000000,"TDI" HKLM,"SYSTEM\CurrentControlSet\Services\WlanSvc","ImagePath",0x00020000,"%SystemRoot%\system32\wlansvc.exe" HKLM,"SYSTEM\CurrentControlSet\Services\WlanSvc","ObjectName",0x00000000,"LocalSystem" -HKLM,"SYSTEM\CurrentControlSet\Services\WlanSvc","Start",0x00010001,0x00000003 +HKLM,"SYSTEM\CurrentControlSet\Services\WlanSvc","Start",0x00010001,0x00000002 HKLM,"SYSTEM\CurrentControlSet\Services\WlanSvc","Type",0x00010001,0x00000110 ; Simple TCP services Modified: trunk/reactos/boot/bootdata/packages/reactos.dff URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/packages/rea…
============================================================================== --- trunk/reactos/boot/bootdata/packages/reactos.dff [iso-8859-1] (original) +++ trunk/reactos/boot/bootdata/packages/reactos.dff [iso-8859-1] Tue Jan 17 23:11:28 2012 @@ -76,6 +76,7 @@ base\applications\network\telnet\telnet.exe 1 base\applications\network\tracert\tracert.exe 1 base\applications\network\whois\whois.exe 1 +base\applications\network\wlanconf\wlanconf.exe 1 base\applications\notepad\notepad.exe 1 base\applications\rapps\rapps.exe 1 base\applications\regedit\regedit.exe 4 @@ -532,6 +533,7 @@ drivers\network\tdi\tdi.sys 2 drivers\network\dd\ne2000\ne2000.sys 2 drivers\network\dd\pcnet\pcnet.sys 2 +drivers\network\ndisuio\ndisuio.sys 2 drivers\serial\serenum\serenum.sys 2 drivers\serial\serial\serial.sys 2 Modified: trunk/reactos/drivers/network/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/CMakeLists…
============================================================================== --- trunk/reactos/drivers/network/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/drivers/network/CMakeLists.txt [iso-8859-1] Tue Jan 17 23:11:28 2012 @@ -2,5 +2,6 @@ add_subdirectory(afd) add_subdirectory(dd) add_subdirectory(ndis) +add_subdirectory(ndisuio) add_subdirectory(tcpip) add_subdirectory(tdi) Modified: trunk/reactos/drivers/network/directory.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/directory.…
============================================================================== --- trunk/reactos/drivers/network/directory.rbuild [iso-8859-1] (original) +++ trunk/reactos/drivers/network/directory.rbuild [iso-8859-1] Tue Jan 17 23:11:28 2012 @@ -10,6 +10,9 @@ <directory name="ndis"> <xi:include href="ndis/ndis.rbuild" /> </directory> +<directory name="ndisuio"> + <xi:include href="ndisuio/ndisuio.rbuild" /> +</directory> <directory name="tcpip"> <xi:include href="tcpip/tcpip.rbuild" /> </directory> Modified: trunk/reactos/include/psdk/ntddndis.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/ntddndis.h?re…
============================================================================== --- trunk/reactos/include/psdk/ntddndis.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/ntddndis.h [iso-8859-1] Tue Jan 17 23:11:28 2012 @@ -41,6 +41,22 @@ NdisDeviceStateD3, NdisDeviceStateMaximum } NDIS_DEVICE_POWER_STATE, *PNDIS_DEVICE_POWER_STATE; + +typedef enum _NDIS_802_11_WEP_STATUS +{ + Ndis802_11WEPEnabled, + Ndis802_11WEPDisabled, + Ndis802_11WEPKeyAbsent, + Ndis802_11WEPNotSupported +} NDIS_802_11_WEP_STATUS, *PNDIS_802_11_WEP_STATUS; + +typedef enum _NDIS_802_11_AUTHENTICATION_MODE +{ + Ndis802_11AuthModeOpen, + Ndis802_11AuthModeShared, + Ndis802_11AuthModeAutoSwitch, + Ndis802_11AuthModeMax +} NDIS_802_11_AUTHENTICATION_MODE, *PNDIS_802_11_AUTHENTICATION_MODE; typedef enum _NDIS_802_11_NETWORK_INFRASTRUCTURE { @@ -116,6 +132,14 @@ ULONG NumberOfItems; NDIS_WLAN_BSSID Bssid[1]; } NDIS_802_11_BSSID_LIST, *PNDIS_802_11_BSSID_LIST; + +typedef struct _NDIS_802_11_WEP +{ + ULONG Length; + ULONG KeyIndex; + ULONG KeyLength; + UCHAR KeyMaterial[1]; +} NDIS_802_11_WEP, *PNDIS_802_11_WEP; typedef struct _NDIS_PM_WAKE_UP_CAPABILITIES { NDIS_DEVICE_POWER_STATE MinMagicPacketWakeUp; @@ -265,8 +289,34 @@ #define OID_802_3_XMIT_TIMES_CRS_LOST 0x01020206 #define OID_802_3_XMIT_LATE_COLLISIONS 0x01020207 -#define OID_802_11_BSSID_LIST 0x0D010217 -#define OID_802_11_BSSID_LIST_SCAN 0x0D01011A +/* IEEE 802.11 (WLAN) OIDs */ +#define OID_802_11_BSSID 0x0D010101 +#define OID_802_11_SSID 0x0D010102 +#define OID_802_11_NETWORK_TYPES_SUPPORTED 0x0D010203 +#define OID_802_11_NETWORK_TYPE_IN_USE 0x0D010204 +#define OID_802_11_TX_POWER_LEVEL 0x0D010205 +#define OID_802_11_RSSI 0x0D010206 +#define OID_802_11_RSSI_TRIGGER 0x0D010207 +#define OID_802_11_INFRASTRUCTURE_MODE 0x0D010108 +#define OID_802_11_FRAGMENTATION_THRESHOLD 0x0D010209 +#define OID_802_11_RTS_THRESHOLD 0x0D01020A +#define OID_802_11_NUMBER_OF_ANTENNAS 0x0D01020B +#define OID_802_11_RX_ANTENNA_SELECTED 0x0D01020C +#define OID_802_11_TX_ANTENNA_SELECTED 0x0D01020D +#define OID_802_11_SUPPORTED_RATES 0x0D01020E +#define OID_802_11_DESIRED_RATES 0x0D010210 +#define OID_802_11_CONFIGURATION 0x0D010211 +#define OID_802_11_STATISTICS 0x0D020212 +#define OID_802_11_ADD_WEP 0x0D010113 +#define OID_802_11_REMOVE_WEP 0x0D010114 +#define OID_802_11_DISASSOCIATE 0x0D010115 +#define OID_802_11_POWER_MODE 0x0D010216 +#define OID_802_11_BSSID_LIST 0x0D010217 +#define OID_802_11_AUTHENTICATION_MODE 0x0D010118 +#define OID_802_11_PRIVACY_FILTER 0x0D010119 +#define OID_802_11_BSSID_LIST_SCAN 0x0D01011A +#define OID_802_11_WEP_STATUS 0x0D01011B +#define OID_802_11_RELOAD_DEFAULTS 0x0D01011C /* OID_GEN_MINIPORT_INFO constants */ #define NDIS_MINIPORT_BUS_MASTER 0x00000001
12 years, 11 months
1
0
0
0
[akhaldi] 54999: * Introduce support for compilers with /analyze support in _PREFAST_ mode. * Allow Cameron to enjoy the next revision.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Tue Jan 17 23:10:16 2012 New Revision: 54999 URL:
http://svn.reactos.org/svn/reactos?rev=54999&view=rev
Log: * Introduce support for compilers with /analyze support in _PREFAST_ mode. * Allow Cameron to enjoy the next revision. Modified: trunk/reactos/cmake/msvc.cmake Modified: trunk/reactos/cmake/msvc.cmake URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/cmake/msvc.cmake?rev=54999…
============================================================================== --- trunk/reactos/cmake/msvc.cmake [iso-8859-1] (original) +++ trunk/reactos/cmake/msvc.cmake [iso-8859-1] Tue Jan 17 23:10:16 2012 @@ -63,15 +63,20 @@ endif() if(_PREFAST_) - message("PREFAST enabled!") - set(CMAKE_C_COMPILE_OBJECT "prefast cl ${CMAKE_START_TEMP_FILE} ${CMAKE_CL_NOLOGO} <FLAGS> <DEFINES> /Fo<OBJECT> -c <SOURCE>${CMAKE_END_TEMP_FILE}" + if(MSVC_VERSION EQUAL 1600 OR MSVC_VERSION GREATER 1600) + add_compile_flags("/analyze") + else() + message("PREFAST enabled!") + set(CMAKE_C_COMPILE_OBJECT "prefast cl ${CMAKE_START_TEMP_FILE} ${CMAKE_CL_NOLOGO} <FLAGS> <DEFINES> /Fo<OBJECT> -c <SOURCE>${CMAKE_END_TEMP_FILE}" "prefast LIST") - set(CMAKE_CXX_COMPILE_OBJECT "prefast cl ${CMAKE_START_TEMP_FILE} ${CMAKE_CL_NOLOGO} <FLAGS> <DEFINES> /TP /Fo<OBJECT> -c <SOURCE>${CMAKE_END_TEMP_FILE}" + set(CMAKE_CXX_COMPILE_OBJECT "prefast cl ${CMAKE_START_TEMP_FILE} ${CMAKE_CL_NOLOGO} <FLAGS> <DEFINES> /TP /Fo<OBJECT> -c <SOURCE>${CMAKE_END_TEMP_FILE}" "prefast LIST") - set(CMAKE_C_LINK_EXECUTABLE + set(CMAKE_C_LINK_EXECUTABLE "cl ${CMAKE_CL_NOLOGO} <OBJECTS> ${CMAKE_START_TEMP_FILE} <FLAGS> /Fe<TARGET> -link /implib:<TARGET_IMPLIB> /version:<TARGET_VERSION_MAJOR>.<TARGET_VERSION_MINOR> <CMAKE_C_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES>${CMAKE_END_TEMP_FILE}") - set(CMAKE_CXX_LINK_EXECUTABLE + set(CMAKE_CXX_LINK_EXECUTABLE "cl ${CMAKE_CL_NOLOGO} <OBJECTS> ${CMAKE_START_TEMP_FILE} <FLAGS> /Fe<TARGET> -link /implib:<TARGET_IMPLIB> /version:<TARGET_VERSION_MAJOR>.<TARGET_VERSION_MINOR> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES>${CMAKE_END_TEMP_FILE}") + endif() + endif() set(CMAKE_RC_CREATE_SHARED_LIBRARY ${CMAKE_C_CREATE_SHARED_LIBRARY})
12 years, 11 months
1
0
0
0
[rharabien] 54998: [NETSHELL] - Display proper icons in network connections folder
by rharabien@svn.reactos.org
Author: rharabien Date: Tue Jan 17 22:33:11 2012 New Revision: 54998 URL:
http://svn.reactos.org/svn/reactos?rev=54998&view=rev
Log: [NETSHELL] - Display proper icons in network connections folder Modified: trunk/reactos/dll/win32/netshell/shfldr_netconnect.c Modified: trunk/reactos/dll/win32/netshell/shfldr_netconnect.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netshell/shfldr_…
============================================================================== --- trunk/reactos/dll/win32/netshell/shfldr_netconnect.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/netshell/shfldr_netconnect.c [iso-8859-1] Tue Jan 17 22:33:11 2012 @@ -83,7 +83,6 @@ { return (LPIContextMenuImpl)((char *)iface - FIELD_OFFSET(IContextMenuImpl, lpVtblExtractIconW)); } - static __inline LPIContextMenuImpl impl_from_IObjectWithSite(IObjectWithSite *iface) { @@ -1176,19 +1175,28 @@ *pwFlags = 0; if (!GetModuleFileNameW(netshell_hInstance, szIconFile, cchMax)) + { + ERR("GetModuleFileNameW failed\n"); return E_FAIL; + } val = _ILGetValueStruct(This->apidl); if (!val) + { + ERR("_ILGetValueStruct failed\n"); return E_FAIL; + } if (INetConnection_GetProperties(val->pItem, &pProperties) != NOERROR) + { + ERR("INetConnection_GetProperties failed\n"); return E_FAIL; + } if (pProperties->Status == NCS_CONNECTED || pProperties->Status == NCS_CONNECTING) - *piIndex = IDI_NET_IDLE; + *piIndex = -IDI_NET_IDLE; else - *piIndex = IDI_NET_OFF; + *piIndex = -IDI_NET_OFF; NcFreeNetconProperties(pProperties);
12 years, 11 months
1
0
0
0
← Newer
1
...
33
34
35
36
37
38
39
...
56
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
Results per page:
10
25
50
100
200