ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
September 2020
----- 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
25 participants
382 discussions
Start a n
N
ew thread
[reactos] 01/01: [KSECDD] Fix RtlEncryptMemory and improve test
by Timo Kreuzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=ab43f8698085764deaca8…
commit ab43f8698085764deaca857c831afde40a084d35 Author: Timo Kreuzer <timo.kreuzer(a)reactos.org> AuthorDate: Sun Sep 13 19:58:06 2020 +0200 Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org> CommitDate: Fri Sep 25 09:39:51 2020 +0200 [KSECDD] Fix RtlEncryptMemory and improve test --- drivers/crypto/ksecdd/crypt.c | 28 +++++- .../rostests/apitests/advapi32/RtlEncryptMemory.c | 104 +++++++++++++++++++-- 2 files changed, 122 insertions(+), 10 deletions(-) diff --git a/drivers/crypto/ksecdd/crypt.c b/drivers/crypto/ksecdd/crypt.c index ab639346b45..0a2a41e991f 100644 --- a/drivers/crypto/ksecdd/crypt.c +++ b/drivers/crypto/ksecdd/crypt.c @@ -27,6 +27,18 @@ typedef struct _KSEC_LOGON_DATA LUID LogonId; } KSEC_LOGON_DATA, *PKSEC_LOGON_DATA; +#if 0 +void PrintKeyData(PUCHAR KeyData) +{ + ULONG i; + for (i = 0; i < 32; i++) + { + DbgPrint("%02X", KeyData[i]); + } + DbgPrint("\n"); +} +#endif + VOID NTAPI KsecInitializeEncryptionSupport ( @@ -80,6 +92,8 @@ KsecGetKeyData ( if (OptionFlags == RTL_ENCRYPT_OPTION_SAME_PROCESS) { + /* Hash some process specific data to generate the key */ + RtlZeroMemory(&ProcessData, sizeof(ProcessData)); ProcessData.Process = CurrentProcess; ProcessData.ProcessId = CurrentProcess->UniqueProcessId; ProcessData.CreateTime = PsGetProcessCreateTimeQuadPart(CurrentProcess); @@ -87,14 +101,26 @@ KsecGetKeyData ( MD5Update(&Md5Contexts[0], (PVOID)&ProcessData, sizeof(ProcessData)); MD5Update(&Md5Contexts[1], (PVOID)&ProcessData, sizeof(ProcessData)); } - else // if (OptionFlags == RTL_ENCRYPT_OPTION_SAME_LOGON) + else if (OptionFlags == RTL_ENCRYPT_OPTION_SAME_LOGON) { + /* Hash the logon id to generate the key */ + RtlZeroMemory(&LogonData, sizeof(LogonData)); Token = PsReferencePrimaryToken(CurrentProcess); SeQueryAuthenticationIdToken(Token, &LogonData.LogonId); PsDereferencePrimaryToken(Token); MD5Update(&Md5Contexts[0], (PVOID)&LogonData, sizeof(LogonData)); MD5Update(&Md5Contexts[1], (PVOID)&LogonData, sizeof(LogonData)); } + else if (OptionFlags == RTL_ENCRYPT_OPTION_CROSS_PROCESS) + { + /* Use the original MD5s to generate the global key */ + NOTHING; + } + else + { + /* Must not pass anything else */ + ASSERT(FALSE); + } /* Finalize the MD5s */ MD5Final(&Md5Contexts[0]); diff --git a/modules/rostests/apitests/advapi32/RtlEncryptMemory.c b/modules/rostests/apitests/advapi32/RtlEncryptMemory.c index 8cc5036962a..81f27bb5185 100644 --- a/modules/rostests/apitests/advapi32/RtlEncryptMemory.c +++ b/modules/rostests/apitests/advapi32/RtlEncryptMemory.c @@ -9,26 +9,112 @@ #include <ntsecapi.h> -START_TEST(RtlEncryptMemory) +static const CHAR TestData[32] = "This is some test Message!!!"; + +void TestEncrypt(ULONG OptionFlags) { - static const CHAR TestData[32] = "This is some test Message!!!"; - CHAR Buffer[32]; + CHAR DECLSPEC_ALIGN(8) Buffer[32]; NTSTATUS Status; - /* Size must be aligned to 8 bytes */ - Status = RtlEncryptMemory(Buffer, 7, RTL_ENCRYPT_OPTION_SAME_PROCESS); + /* Size must be aligned to 8 bytes (aka RTL_ENCRYPT_MEMORY_SIZE) */ + RtlCopyMemory(Buffer, TestData, sizeof(Buffer)); + Status = RtlEncryptMemory(Buffer, 7, OptionFlags); ok_ntstatus(Status, STATUS_INVALID_PARAMETER); - /* Buffer must not be aligned to 8 bytes */ - Status = RtlEncryptMemory(&Buffer[1], 8, RTL_ENCRYPT_OPTION_SAME_PROCESS); + /* Buffer can be unaligned */ + RtlCopyMemory(Buffer, TestData, sizeof(Buffer)); + Status = RtlEncryptMemory(&Buffer[1], 8, OptionFlags); + ok_ntstatus(Status, STATUS_SUCCESS); + Status = RtlDecryptMemory(&Buffer[1], 8, OptionFlags); ok_ntstatus(Status, STATUS_SUCCESS); + ok(RtlEqualMemory(Buffer, TestData, sizeof(Buffer)) == 1, + "OptionFlags=%lu, Buffer='%s', TestData='%s'\n", + OptionFlags, Buffer, TestData); RtlCopyMemory(Buffer, TestData, sizeof(Buffer)); - Status = RtlEncryptMemory(Buffer, sizeof(Buffer), RTL_ENCRYPT_OPTION_SAME_PROCESS); + Status = RtlEncryptMemory(Buffer, sizeof(Buffer), OptionFlags); ok_ntstatus(Status, STATUS_SUCCESS); ok_int(RtlEqualMemory(Buffer, TestData, sizeof(Buffer)), 0); - Status = RtlDecryptMemory(Buffer, sizeof(Buffer), RTL_ENCRYPT_OPTION_SAME_PROCESS); + Status = RtlDecryptMemory(Buffer, sizeof(Buffer), OptionFlags); ok_ntstatus(Status, STATUS_SUCCESS); ok_int(RtlEqualMemory(Buffer, TestData, sizeof(Buffer)), 1); +} + +void TestCrossProcessDecrypt(PSTR Param) +{ + UCHAR Buffer[32] = { 0 }; + ULONG OptionFlags; + PSTR StrData; + ULONG i; + NTSTATUS Status; + + OptionFlags = Param[3] == '1' ? RTL_ENCRYPT_OPTION_CROSS_PROCESS : RTL_ENCRYPT_OPTION_SAME_LOGON; + + /* Convert the HEX string to binary ('-cp<1|2>:<data>') */ + StrData = Param + 5; + for (i = 0; i < sizeof(Buffer); i++) + { + UINT x; + sscanf(&StrData[2 * i], "%02X", &x); + Buffer[i] = (UCHAR)x; + } + + /* Decrypt the data */ + Status = RtlDecryptMemory(Buffer, sizeof(Buffer), OptionFlags); + ok_ntstatus(Status, STATUS_SUCCESS); + ok_int(RtlEqualMemory(Buffer, TestData, sizeof(Buffer)), 1); +} + +void TestCrossProcessEncrypt(ULONG OptionFlags) +{ + UCHAR Buffer[32]; + CHAR CmdLine[MAX_PATH]; + PSTR StrBuffer; + NTSTATUS Status; + ULONG i; + INT result; + + /* Encrypt the test string */ + RtlCopyMemory(Buffer, TestData, sizeof(Buffer)); + Status = RtlEncryptMemory(Buffer, sizeof(Buffer), OptionFlags); + ok_ntstatus(Status, STATUS_SUCCESS); + + /* Start building a command line */ + sprintf(CmdLine, "advapi32_apitest.exe RtlEncryptMemory -cp%lu:", OptionFlags); + StrBuffer = CmdLine + strlen(CmdLine); + + /* Convert encrypted data into a hex string */ + for (i = 0; i < sizeof(Buffer); i++) + { + sprintf(&StrBuffer[2 * i], "%02X", Buffer[i]); + } + + result = system(CmdLine); + ok_int(result, 0); +} + +START_TEST(RtlEncryptMemory) +{ + CHAR Buffer[8] = { 0 }; + PSTR CommandLine, Param; + NTSTATUS Status; + + /* Check recursive call */ + CommandLine = GetCommandLineA(); + Param = strstr(CommandLine, "-cp"); + if (Param != NULL) + { + TestCrossProcessDecrypt(Param); + return; + } + + TestEncrypt(RTL_ENCRYPT_OPTION_SAME_PROCESS); + TestEncrypt(RTL_ENCRYPT_OPTION_CROSS_PROCESS); + TestEncrypt(RTL_ENCRYPT_OPTION_SAME_LOGON); + + Status = RtlEncryptMemory(Buffer, sizeof(Buffer), 4); + ok_ntstatus(Status, STATUS_INVALID_PARAMETER); + TestCrossProcessEncrypt(RTL_ENCRYPT_OPTION_CROSS_PROCESS); + TestCrossProcessEncrypt(RTL_ENCRYPT_OPTION_SAME_LOGON); }
4 years, 3 months
1
0
0
0
[reactos] 01/01: [SHELL32] Call SHAutoComplete on 'Run' dialog
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=ed02f41af5a6013916bf3…
commit ed02f41af5a6013916bf37d749042bfae6b61bb2 Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Fri Sep 25 15:59:30 2020 +0900 Commit: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> CommitDate: Fri Sep 25 15:59:30 2020 +0900 [SHELL32] Call SHAutoComplete on 'Run' dialog CORE-9281 --- dll/win32/shell32/dialogs/dialogs.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/dll/win32/shell32/dialogs/dialogs.cpp b/dll/win32/shell32/dialogs/dialogs.cpp index 3d584480cf7..aa71de0b1f4 100644 --- a/dll/win32/shell32/dialogs/dialogs.cpp +++ b/dll/win32/shell32/dialogs/dialogs.cpp @@ -500,6 +500,8 @@ static void EnableOkButtonFromEditContents(HWND hwnd) static INT_PTR CALLBACK RunDlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { RUNFILEDLGPARAMS *prfdp = (RUNFILEDLGPARAMS *)GetWindowLongPtrW(hwnd, DWLP_USER); + HWND hwndCombo, hwndEdit; + COMBOBOXINFO ComboInfo; switch (message) { @@ -538,9 +540,16 @@ static INT_PTR CALLBACK RunDlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARA // SendMessageW(hwnd, WM_SETICON, ICON_SMALL, (LPARAM)prfdp->hIcon); SendMessageW(GetDlgItem(hwnd, IDC_RUNDLG_ICON), STM_SETICON, (WPARAM)prfdp->hIcon, 0); - FillList(GetDlgItem(hwnd, IDC_RUNDLG_EDITPATH), NULL, 0, (prfdp->uFlags & RFF_NODEFAULT) == 0); + hwndCombo = GetDlgItem(hwnd, IDC_RUNDLG_EDITPATH); + FillList(hwndCombo, NULL, 0, (prfdp->uFlags & RFF_NODEFAULT) == 0); EnableOkButtonFromEditContents(hwnd); - SetFocus(GetDlgItem(hwnd, IDC_RUNDLG_EDITPATH)); + + ComboInfo.cbSize = sizeof(ComboInfo); + GetComboBoxInfo(hwndCombo, &ComboInfo); + hwndEdit = ComboInfo.hwndItem; + SHAutoComplete(hwndEdit, SHACF_FILESYSTEM | SHACF_FILESYS_ONLY | SHACF_URLALL); + + SetFocus(hwndCombo); return TRUE; case WM_COMMAND:
4 years, 3 months
1
0
0
0
[reactos] 01/01: [COMCTL32] IP Address controls follow-up of #3212 (3f30b1e)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=0a8fb87d845482db5909f…
commit 0a8fb87d845482db5909fe9034e0d5ebac8c5b3c Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Fri Sep 25 15:32:58 2020 +0900 Commit: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> CommitDate: Fri Sep 25 15:32:58 2020 +0900 [COMCTL32] IP Address controls follow-up of #3212 (3f30b1e) The rightest field didn't work Left arrow key. CORE-3479 --- dll/win32/comctl32/ipaddress.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/dll/win32/comctl32/ipaddress.c b/dll/win32/comctl32/ipaddress.c index 9f1b2c08c38..ece99e9a5d7 100644 --- a/dll/win32/comctl32/ipaddress.c +++ b/dll/win32/comctl32/ipaddress.c @@ -453,9 +453,6 @@ static BOOL IPADDRESS_GotoNextField (const IPADDRESS_INFO *infoPtr, int cur, int end = -1; SendMessageW(next->EditHwnd, EM_SETSEL, start, end); } -#ifdef __REACTOS__ - SetFocus(next->EditHwnd); -#endif return TRUE; } @@ -599,8 +596,9 @@ IPADDRESS_SubclassProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) #ifdef __REACTOS__ case WM_GETDLGCODE: { - LRESULT ret = DefWindowProcW(hwnd, uMsg, wParam, lParam); - return ret | DLGC_WANTTAB; + LRESULT result = CallWindowProcW(part->OrigProc, hwnd, uMsg, wParam, lParam); + result |= DLGC_WANTALLKEYS | DLGC_WANTCHARS | DLGC_WANTTAB; + return result; } #endif }
4 years, 3 months
1
0
0
0
[reactos] 01/01: [SETUP][MMSYS][SHELL32] Adding missing French translation (and update existing ones) (#3232)
by Kyle Katarn
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b9754fa5d6a1e32aca49a…
commit b9754fa5d6a1e32aca49abeaf1576cff57988591 Author: Kyle Katarn <contact(a)kcsoftwares.com> AuthorDate: Fri Sep 25 01:39:31 2020 +0200 Commit: GitHub <noreply(a)github.com> CommitDate: Fri Sep 25 01:39:31 2020 +0200 [SETUP][MMSYS][SHELL32] Adding missing French translation (and update existing ones) (#3232) Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito(a)reactos.org> --- base/setup/reactos/lang/fr-FR.rc | 130 +++++++++++++++++++-------------------- dll/cpl/mmsys/lang/fr-FR.rc | 6 +- dll/win32/shell32/lang/fr-FR.rc | 2 +- 3 files changed, 69 insertions(+), 69 deletions(-) diff --git a/base/setup/reactos/lang/fr-FR.rc b/base/setup/reactos/lang/fr-FR.rc index cb6c0bf7365..fe38ddcf1ac 100644 --- a/base/setup/reactos/lang/fr-FR.rc +++ b/base/setup/reactos/lang/fr-FR.rc @@ -15,11 +15,11 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYS CAPTION "Installation de ReactOS" FONT 8, "MS Shell Dlg" BEGIN - AUTORADIOBUTTON "Install ReactOS", IDC_INSTALL, 7, 7, 277, 10, WS_GROUP | WS_TABSTOP - LTEXT "Install a new copy of ReactOS. This option does not keep your files, settings and programs. You can make changes to disks and partitions.", IDC_INSTALLTEXT, 18, 18, 269, 25, NOT WS_GROUP - AUTORADIOBUTTON "Update or repair an installed ReactOS", IDC_UPDATE, 7, 50, 277, 10 - LTEXT "Update or repair an installed copy of ReactOS. This option keeps your files, settings and programs. This option is only available if ReactOS is already installed on this computer.", IDC_UPDATETEXT, 18, 61, 269, 30, NOT WS_GROUP - LTEXT "Click Next to setup the devices.", IDC_STATIC, 7, 1280, 297, 8 + AUTORADIOBUTTON "Installer ReactOS", IDC_INSTALL, 7, 7, 277, 10, WS_GROUP | WS_TABSTOP + LTEXT "Installer une nouvelle copie de ReactOS. Cette option ne conservera pas vos données, paramètres et programmes. Vous pouvez effectuer des modifications sur les disques et les partitions.", IDC_INSTALLTEXT, 18, 18, 269, 25, NOT WS_GROUP + AUTORADIOBUTTON "Mettre à jour ou réparer ReactOS", IDC_UPDATE, 7, 50, 277, 10 + LTEXT "Mettre à jour ou réparer une copie existante de ReactOS. Cette option conserve vos données, paramètres et programmes. Cette option est seulement disponible si ReactOS est déjà installé sur cet ordinateur.", IDC_UPDATETEXT, 18, 61, 269, 30, NOT WS_GROUP + LTEXT "Appuyer sur Suivant pour configurer les périphériques.", IDC_STATIC, 7, 1280, 297, 8 END IDD_UPDATEREPAIRPAGE DIALOGEX 0, 0, 317, 143 @@ -27,10 +27,10 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYS CAPTION "Installation de ReactOS" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "The ReactOS Setup can upgrade one of the available ReactOS installations listed below, or, if a ReactOS installation is damaged, the Setup program can attempt to repair it.", IDC_STATIC, 6, 6, 300, 18 + LTEXT "L'installation de ReactOS peut mettre à niveau les installations disponibles de ReactOS listées ci-dessous, ou, si une installation de ReactOS est endommagée, l'installation peut essayer de la réparer.", IDC_STATIC, 6, 6, 300, 18 CONTROL "", IDC_NTOSLIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | WS_BORDER | WS_TABSTOP, 6, 30, 303, 90 - PUSHBUTTON "&Do not upgrade", IDC_SKIPUPGRADE, 230, 128, 80, 14 - LTEXT "Click Next to upgrade the selected OS installation, or on 'Do not upgrade' to continue a new installation without upgrading.", IDC_STATIC, 7, 124, 222, 16 + PUSHBUTTON "&Ne pas mettre à jour", IDC_SKIPUPGRADE, 230, 128, 80, 14 + LTEXT "Appuyer sur Suivant pour mettre à niveau l'installation sélectionnée, ou sur 'Ne pas mettre à niveau' pour continuer une nouvelle installation.", IDC_STATIC, 7, 124, 222, 16 END IDD_DEVICEPAGE DIALOGEX 0, 0, 317, 143 @@ -38,13 +38,13 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYS CAPTION "Installation de ReactOS" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Computer:", IDC_STATIC, 20, 15, 80, 10 + LTEXT "Ordinateur :", IDC_STATIC, 20, 15, 80, 10 CONTROL "", IDC_COMPUTER, "ComboBox", WS_VSCROLL | WS_TABSTOP | CBS_DROPDOWNLIST, 100, 15, 180, 80 - LTEXT "Display:", IDC_STATIC, 20, 35, 80, 10 + LTEXT "Affichage :", IDC_STATIC, 20, 35, 80, 10 CONTROL "", IDC_DISPLAY, "ComboBox", WS_VSCROLL | WS_TABSTOP | CBS_DROPDOWNLIST, 100, 35, 180, 80 - LTEXT "Keyboard:", IDC_STATIC, 20, 55, 80, 10 + LTEXT "Clavier :", IDC_STATIC, 20, 55, 80, 10 CONTROL "", IDC_KEYBOARD, "ComboBox", WS_VSCROLL | WS_TABSTOP | CBS_DROPDOWNLIST, 100, 55, 180, 80 - LTEXT "Click Next to continue setup on the installation device.", IDC_STATIC, 7, 128, 297, 8 + LTEXT "Appuyer sur Suivant pour continuer l'installation.", IDC_STATIC, 7, 128, 297, 8 END IDD_DRIVEPAGE DIALOGEX 0, 0, 317, 143 @@ -53,42 +53,42 @@ CAPTION "Installation de ReactOS" FONT 8, "MS Shell Dlg" BEGIN CONTROL "", IDC_PARTITION, "SysTreeList32", WS_BORDER | WS_VISIBLE | WS_TABSTOP | LVS_REPORT | LVS_SINGLESEL, 7, 7, 303, 112 - PUSHBUTTON "&Create", IDC_PARTCREATE, 7, 122, 50, 15 - PUSHBUTTON "&Delete", IDC_PARTDELETE, 63, 122, 50, 15 - PUSHBUTTON "D&river", IDC_DEVICEDRIVER, 174, 122, 50, 15, WS_DISABLED - PUSHBUTTON "&Advanced Options...", IDC_PARTMOREOPTS, 230, 122, 80, 15 + PUSHBUTTON "&Créer", IDC_PARTCREATE, 7, 122, 50, 15 + PUSHBUTTON "&Supprimer", IDC_PARTDELETE, 63, 122, 50, 15 + PUSHBUTTON "&Pilote", IDC_DEVICEDRIVER, 174, 122, 50, 15, WS_DISABLED + PUSHBUTTON "&Options avancées...", IDC_PARTMOREOPTS, 230, 122, 80, 15 // LTEXT "Click Next to check the summary.", IDC_STATIC, 10, 180, 277, 20 END IDD_PARTITION DIALOGEX 0, 0, 145, 90 STYLE DS_SHELLFONT | WS_VISIBLE | WS_CAPTION -CAPTION "Create Partition" +CAPTION "Créer une partition" FONT 8, "MS Shell Dlg" BEGIN CONTROL "", IDC_UPDOWN1, "msctls_updown32", WS_VISIBLE, 104, 22, 9, 13 - CONTROL "Create and format partition", IDC_STATIC, "Button", BS_GROUPBOX, 7, 5, 129, 57 - LTEXT "Size:", IDC_STATIC, 13, 24, 27, 9 + CONTROL "Créer et formatter une partition", IDC_STATIC, "Button", BS_GROUPBOX, 7, 5, 129, 57 + LTEXT "Taille :", IDC_STATIC, 13, 24, 27, 9 EDITTEXT IDC_PARTSIZE, 58, 22, 47, 13, WS_VISIBLE | WS_TABSTOP - LTEXT "GB", IDC_UNIT, 117, 24, 14, 9 - LTEXT "File System:", IDC_STATIC, 13, 46, 42, 9 + LTEXT "Go", IDC_UNIT, 117, 24, 14, 9 + LTEXT "Système de fichier :", IDC_STATIC, 13, 46, 42, 9 CONTROL "", IDC_FSTYPE, "ComboBox", WS_VISIBLE | WS_TABSTOP | CBS_DROPDOWNLIST, 58, 42, 73, 50 PUSHBUTTON "&OK", IDOK, 35, 68, 47, 15, WS_VISIBLE | WS_TABSTOP - PUSHBUTTON "&Cancel", IDCANCEL, 87, 68, 47, 15, WS_VISIBLE | WS_TABSTOP + PUSHBUTTON "&Annuler", IDCANCEL, 87, 68, 47, 15, WS_VISIBLE | WS_TABSTOP END IDD_BOOTOPTIONS DIALOGEX 0, 0, 305, 116 STYLE DS_SHELLFONT | WS_VISIBLE | WS_CAPTION -CAPTION "Advanced Partition Settings" +CAPTION "Paramètres de partition avancés" FONT 8, "MS Shell Dlg" BEGIN - CONTROL "Installation folder", IDC_STATIC, "Button", BS_GROUPBOX, 4, 1, 298, 30 + CONTROL "Dossier d'installation", IDC_STATIC, "Button", BS_GROUPBOX, 4, 1, 298, 30 EDITTEXT IDC_PATH, 10, 11, 278, 13, WS_VISIBLE - CONTROL "Boot loader installation", IDC_STATIC, "Button", BS_GROUPBOX, 4, 36, 298, 52 - CONTROL "Install boot loader on the hard disk (MBR and VBR)", IDC_INSTFREELDR, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP, 10, 46, 278, 11 - CONTROL "Install boot loader on the hard disk (VBR only)", IDC_INSTVBRONLY, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP, 10, 57, 278, 11 - CONTROL "No installation of bootloader", IDC_NOINSTFREELDR, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP | WS_DISABLED, 10, 68, 278, 11 + CONTROL "Installation du chargeur de démarrage", IDC_STATIC, "Button", BS_GROUPBOX, 4, 36, 298, 52 + CONTROL "Installer le chargeur de démarrage sur le disque dur (MBR et VBR)", IDC_INSTFREELDR, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP, 10, 46, 278, 11 + CONTROL "Installer le chargeur de démarrage sur le disque dur (VBR uniquement)", IDC_INSTVBRONLY, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP, 10, 57, 278, 11 + CONTROL "Ne pas installer le chargeur de démarrage", IDC_NOINSTFREELDR, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP | WS_DISABLED, 10, 68, 278, 11 PUSHBUTTON "&OK", IDOK, 180, 94, 50, 15, WS_TABSTOP | WS_VISIBLE - PUSHBUTTON "&Cancel", IDCANCEL, 240, 94, 50, 15, WS_TABSTOP | WS_VISIBLE + PUSHBUTTON "&Annuler", IDCANCEL, 240, 94, 50, 15, WS_TABSTOP | WS_VISIBLE END IDD_SUMMARYPAGE DIALOGEX 0, 0, 317, 143 @@ -96,25 +96,25 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYS CAPTION "Installation de ReactOS" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Installation type:", IDC_STATIC, 18, 5, 74, 11 + LTEXT "Type d'installation :", IDC_STATIC, 18, 5, 74, 11 EDITTEXT IDC_INSTALLTYPE, 95, 4, 210, 13, ES_READONLY | ES_AUTOHSCROLL | WS_VISIBLE | NOT WS_BORDER | NOT WS_TABSTOP - LTEXT "Installation source:", IDC_STATIC, 18, 17, 74, 11 + LTEXT "Source d'installation :", IDC_STATIC, 18, 17, 74, 11 EDITTEXT IDC_INSTALLSOURCE, 95, 16, 210, 13, ES_READONLY | ES_AUTOHSCROLL | WS_VISIBLE | NOT WS_BORDER | NOT WS_TABSTOP - LTEXT "Architecture:", IDC_STATIC, 18, 29, 74, 11 + LTEXT "Architecture :", IDC_STATIC, 18, 29, 74, 11 EDITTEXT IDC_ARCHITECTURE, 95, 28, 210, 13, ES_READONLY | ES_AUTOHSCROLL | WS_VISIBLE | NOT WS_BORDER | NOT WS_TABSTOP - LTEXT "Computer:", IDC_STATIC, 18, 41, 74, 11 + LTEXT "Ordinateur :", IDC_STATIC, 18, 41, 74, 11 EDITTEXT IDC_COMPUTER, 95, 40, 210, 13, ES_READONLY | ES_AUTOHSCROLL | WS_VISIBLE | NOT WS_BORDER | NOT WS_TABSTOP - LTEXT "Display:", IDC_STATIC, 18, 53, 74, 11 + LTEXT "Affichage :", IDC_STATIC, 18, 53, 74, 11 EDITTEXT IDC_DISPLAY, 95, 52, 210, 13, ES_READONLY | ES_AUTOHSCROLL | WS_VISIBLE | NOT WS_BORDER | NOT WS_TABSTOP - LTEXT "Keyboard:", IDC_STATIC, 18, 65, 74, 11 + LTEXT "Clavier :", IDC_STATIC, 18, 65, 74, 11 EDITTEXT IDC_KEYBOARD, 95, 64, 210, 13, ES_READONLY | ES_AUTOHSCROLL | WS_VISIBLE | NOT WS_BORDER | NOT WS_TABSTOP - LTEXT "Destination volume:", IDC_STATIC, 18, 77, 74, 11 + LTEXT "Volume de destination :", IDC_STATIC, 18, 77, 74, 11 EDITTEXT IDC_DESTDRIVE, 95, 76, 210, 13, ES_READONLY | ES_AUTOHSCROLL | WS_VISIBLE | NOT WS_BORDER | NOT WS_TABSTOP - LTEXT "Destination directory:", IDC_STATIC, 18, 89, 74, 11 + LTEXT "Dossier de destination :", IDC_STATIC, 18, 89, 74, 11 EDITTEXT IDC_PATH, 95, 88, 210, 13, ES_READONLY | ES_AUTOHSCROLL | WS_VISIBLE | NOT WS_BORDER | NOT WS_TABSTOP - AUTOCHECKBOX "I confirm that all the installation settings are correct. I also acknowledge that\nReactOS is alpha-quality software and may break on my computer or corrupt my data.", + AUTOCHECKBOX "Je confirme que tous les paramètres sont corrects. Je reconnais également que\nReactOS est un logiciel dans un état de qualité Alpha et peut endommager mon ordinateur ou corrompre mes données.", IDC_CONFIRM_INSTALL, 7, 104, 303, 18, BS_MULTILINE - LTEXT "Please confirm that all the installation settings are correct,\nthen click on Install to start the installation process.", IDC_STATIC, 7, 124, 303, 18 + LTEXT "Merci de confirmer que tous les paramètres d'installation sont corrects,\npuis appuyer sur Installer pour démarrer le processus d'installation.", IDC_STATIC, 7, 124, 303, 18 END IDD_PROCESSPAGE DIALOGEX 0, 0, 317, 143 @@ -122,7 +122,7 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYS CAPTION "Installation de ReactOS" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Install files...", IDC_ACTIVITY, 20, 50, 277, 10 + LTEXT "Fichiers d'installation...", IDC_ACTIVITY, 20, 50, 277, 10 LTEXT "test.txt", IDC_ITEM, 30, 80, 257, 10 CONTROL "", IDC_PROCESSPROGRESS, "msctls_progress32", PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 20, 120, 277, 8 END @@ -132,44 +132,44 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYS CAPTION "Installation de ReactOS" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Completing the ReactOS Setup Wizard", IDC_FINISHTITLE, 115, 8, 195, 24 - LTEXT "You have successfully completed the first stage of ReactOS Setup.", IDC_STATIC, 20, 50, 277, 10 - LTEXT "When you click Finish, your computer will restart.", IDC_STATIC, 20, 80, 277, 10 + LTEXT "Finalisation de l'assistant d'installation de ReactOS", IDC_FINISHTITLE, 115, 8, 195, 24 + LTEXT "Vous avez complété avec succès la première étape d'installation de ReactOS.", IDC_STATIC, 20, 50, 277, 10 + LTEXT "Si vous appuyez sur Terminer, votre ordinateur va redémarrer.", IDC_STATIC, 20, 80, 277, 10 CONTROL "", IDC_RESTART_PROGRESS, "msctls_progress32", PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 20, 120, 277, 8 - LTEXT "If there is a CD in a drive, remove it. Then, to restart your computer, click Finish.", IDC_STATIC, 10, 180, 297, 20 + LTEXT "S'il y a un CD dans le lecteur, retirez le. Appuyez ensuite sur Terminer pour redémarrer votre ordinateur.", IDC_STATIC, 10, 180, 297, 20 END STRINGTABLE BEGIN - IDS_TYPETITLE "Welcome to ReactOS Setup" - IDS_TYPESUBTITLE "Choose setup type." - IDS_DEVICETITLE "Setup the basic devices" - IDS_DEVICESUBTITLE "Set the settings of display and keyboard." - IDS_DRIVETITLE "Setup the installation partition and system folder" - IDS_DRIVESUBTITLE "Prepare installation partition, system folder and boot loader." - IDS_PROCESSTITLE "Setup partition, copy files and setup system" - IDS_PROCESSSUBTITLE "Create and format partition, copy files, install and setup boot loader" - IDS_RESTARTTITLE "First stage of setup finished" - IDS_RESTARTSUBTITLE "The first stage of setup has been completed, restart to continue with second stage" - IDS_SUMMARYTITLE "Installation Summary" - IDS_SUMMARYSUBTITLE "List installation properties to check before apply to the installation device" - IDS_ABORTSETUP "ReactOS is not completely installed on your computer. If you quit Setup now, you will need to run Setup again to install ReactOS. Really quit?" - IDS_ABORTSETUP2 "Abort installation?" - IDS_NO_TXTSETUP_SIF "Unable to find 'txtsetup.sif'.\nSetup is unable to continue." + IDS_TYPETITLE "Bienvenue dans l'installation de ReactOS" + IDS_TYPESUBTITLE "Choisissez un type d'installation." + IDS_DEVICETITLE "Configurer les périphériques de base." + IDS_DEVICESUBTITLE "Configurer l'affichage et le clavier." + IDS_DRIVETITLE "Configurer la partition d'installation et le dossier système." + IDS_DRIVESUBTITLE "Préparer la partition d'installation, le dossier système et le chargeur de démarrage." + IDS_PROCESSTITLE "Configurer la partition, copier les fichiers et configurer le système." + IDS_PROCESSSUBTITLE "Créer et formatter la partition, copier les fichiers, installer et configurer le chargeur de démarrage." + IDS_RESTARTTITLE "Première étape de configuration terminée" + IDS_RESTARTSUBTITLE "La première étape de l'installation est terminée. Veuillez redémarrer pour continuer avec la seconde étape." + IDS_SUMMARYTITLE "Résumé de l'installation" + IDS_SUMMARYSUBTITLE "Lister les propriétés d'installation à vérifier avant application sur le périphérique d'installation." + IDS_ABORTSETUP "ReactOS n'est pas complètement installé sur votre ordinateur. Si vous quittez l'installation maintenant, vous devrez lancer l'installation de nouveau pour installer ReactOS. Voulez-vous quitter ?" + IDS_ABORTSETUP2 "Abandonner l'installation ?" + IDS_NO_TXTSETUP_SIF "Impossible de trouver 'txtsetup.sif'.\nL'installation ne peut continuer." IDS_CAPTION "Installation de ReactOS" END STRINGTABLE BEGIN - IDS_INSTALLATION_NAME "Name" - IDS_INSTALLATION_PATH "Installation Path" - IDS_INSTALLATION_VENDOR "Vendor Name" + IDS_INSTALLATION_NAME "Nom" + IDS_INSTALLATION_PATH "Chemin d'installation" + IDS_INSTALLATION_VENDOR "Nom du fabricant" END STRINGTABLE BEGIN - IDS_PARTITION_NAME "Name" + IDS_PARTITION_NAME "Nom" IDS_PARTITION_TYPE "Type" - IDS_PARTITION_SIZE "Size" - IDS_PARTITION_STATUS "Status" + IDS_PARTITION_SIZE "Taille" + IDS_PARTITION_STATUS "Statut" END diff --git a/dll/cpl/mmsys/lang/fr-FR.rc b/dll/cpl/mmsys/lang/fr-FR.rc index 8aadb3e42de..74ea03e1ec7 100644 --- a/dll/cpl/mmsys/lang/fr-FR.rc +++ b/dll/cpl/mmsys/lang/fr-FR.rc @@ -27,13 +27,13 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Sons" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Un schéma sons est un ensemble de sons appliqués aux évènements de ReactOS et aux programmes. Vous pouvez sélectionner un schéma existant ou en enregistrer que vous avez modifié.", -1, 8, 7, 230, 40 + LTEXT "Un schéma sons est un ensemble de sons appliqués aux événements de ReactOS et aux programmes. Vous pouvez sélectionner un schéma existant ou en enregistrer un que vous avez modifié.", -1, 8, 7, 230, 40 LTEXT "S&chéma sons :", -1, 8, 42, 150, 17 COMBOBOX IDC_SOUND_SCHEME, 8, 53, 230, 46, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "&Enregistrer sous...", IDC_SAVEAS_BTN, 120, 70, 65, 15 PUSHBUTTON "Supprimer", IDC_DELETE_BTN, 188, 70, 50, 15 - LTEXT "Pour changer les sons, cliquez sur un évènement de programme dans la liste suivante, puis sélectionnez un son à appliquer. Vous pouvez enregistrer les changements en tant que nouveau schéma son.", -1, 8, 90, 230, 40 - LTEXT "Évènements des programmes :", -1, 8, 118, 150, 17 + LTEXT "Pour changer les sons, cliquez sur un événement de programme dans la liste suivante, puis sélectionnez un son à appliquer. Vous pouvez enregistrer les changements en tant que nouveau schéma sons.", -1, 8, 90, 230, 40 + LTEXT "Événements des programmes :", -1, 8, 118, 150, 17 CONTROL "", IDC_SCHEME_LIST, "SysTreeView32", TVS_DISABLEDRAGDROP| TVS_SHOWSELALWAYS | WS_CHILD | WS_VISIBLE| WS_BORDER | WS_TABSTOP, 8, 130, 230, 60 LTEXT "&Sons :", IDC_TEXT_SOUND, 8, 194, 80, 17, WS_DISABLED COMBOBOX IDC_SOUND_LIST, 8, 205, 155, 146, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP | WS_DISABLED diff --git a/dll/win32/shell32/lang/fr-FR.rc b/dll/win32/shell32/lang/fr-FR.rc index acf02ca4a6b..f709c10405e 100644 --- a/dll/win32/shell32/lang/fr-FR.rc +++ b/dll/win32/shell32/lang/fr-FR.rc @@ -740,7 +740,7 @@ BEGIN IDS_SHV_COLUMN_DELFROM "Localisation d'origine" IDS_SHV_COLUMN_DELDATE "Date de suppression" IDS_SHV_COLUMN_FONTTYPE "Type de police" - IDS_SHV_COLUMN_WORKGROUP "Workgroup" + IDS_SHV_COLUMN_WORKGROUP "Groupe de travail" IDS_SHV_COLUMN_NETLOCATION "Emplacement réseau" IDS_SHV_COLUMN_DOCUMENTS "Documents" IDS_SHV_COLUMN_STATUS "État"
4 years, 3 months
1
0
0
0
[reactos] 01/01: [NTOSKRNL_VISTA] Add stubs for functions needed in KMDF
by Victor Perevertkin
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=bb94e711ef504822fa1c5…
commit bb94e711ef504822fa1c5b25dd1e7c82db5ab950 Author: Victor Perevertkin <victor.perevertkin(a)reactos.org> AuthorDate: Fri Sep 25 01:28:55 2020 +0300 Commit: Victor Perevertkin <victor.perevertkin(a)reactos.org> CommitDate: Fri Sep 25 01:28:55 2020 +0300 [NTOSKRNL_VISTA] Add stubs for functions needed in KMDF --- sdk/include/xdk/iofuncs.h | 2 +- sdk/include/xdk/pofuncs.h | 4 ++-- sdk/lib/drivers/ntoskrnl_vista/io.c | 17 +++++++++++++++++ sdk/lib/drivers/ntoskrnl_vista/po.c | 22 +++++++++++++++++++++- 4 files changed, 41 insertions(+), 4 deletions(-) diff --git a/sdk/include/xdk/iofuncs.h b/sdk/include/xdk/iofuncs.h index ec364576e4f..04d3c63a200 100644 --- a/sdk/include/xdk/iofuncs.h +++ b/sdk/include/xdk/iofuncs.h @@ -2402,7 +2402,7 @@ IoRequestDeviceEjectEx( _IRQL_requires_max_(PASSIVE_LEVEL) _Must_inspect_result_ -NTKERNELAPI +NTKRNLVISTAAPI NTSTATUS NTAPI IoSetDevicePropertyData( diff --git a/sdk/include/xdk/pofuncs.h b/sdk/include/xdk/pofuncs.h index ff73e1b7500..5b40e2eadd6 100644 --- a/sdk/include/xdk/pofuncs.h +++ b/sdk/include/xdk/pofuncs.h @@ -98,14 +98,14 @@ $if (_WDMDDK_) #if (NTDDI_VERSION >= NTDDI_VISTA) _IRQL_requires_max_(DISPATCH_LEVEL) -NTKERNELAPI +NTKRNLVISTAAPI VOID NTAPI PoSetSystemWake( _Inout_ struct _IRP *Irp); _IRQL_requires_max_(DISPATCH_LEVEL) -NTKERNELAPI +NTKRNLVISTAAPI BOOLEAN NTAPI PoGetSystemWake( diff --git a/sdk/lib/drivers/ntoskrnl_vista/io.c b/sdk/lib/drivers/ntoskrnl_vista/io.c index c295d63193f..e3686abd12e 100644 --- a/sdk/lib/drivers/ntoskrnl_vista/io.c +++ b/sdk/lib/drivers/ntoskrnl_vista/io.c @@ -66,6 +66,23 @@ IoQueueWorkItemEx( IoQueueWorkItem(IoWorkItem, IopWorkItemExCallback, QueueType, Context); } +_IRQL_requires_max_(PASSIVE_LEVEL) +_Must_inspect_result_ +NTKRNLVISTAAPI +NTSTATUS +NTAPI +IoSetDevicePropertyData( + _In_ PDEVICE_OBJECT Pdo, + _In_ CONST DEVPROPKEY *PropertyKey, + _In_ LCID Lcid, + _In_ ULONG Flags, + _In_ DEVPROPTYPE Type, + _In_ ULONG Size, + _In_opt_ PVOID Data) +{ + return STATUS_NOT_IMPLEMENTED; +} + _IRQL_requires_max_(PASSIVE_LEVEL) _Must_inspect_result_ NTKRNLVISTAAPI diff --git a/sdk/lib/drivers/ntoskrnl_vista/po.c b/sdk/lib/drivers/ntoskrnl_vista/po.c index 791a784273a..3598332a87b 100644 --- a/sdk/lib/drivers/ntoskrnl_vista/po.c +++ b/sdk/lib/drivers/ntoskrnl_vista/po.c @@ -40,4 +40,24 @@ PoQueryWatchdogTime( _Out_ PULONG SecondsRemaining) { return FALSE; -} \ No newline at end of file +} + +_IRQL_requires_max_(DISPATCH_LEVEL) +NTKRNLVISTAAPI +VOID +NTAPI +PoSetSystemWake( + _Inout_ struct _IRP *Irp) +{ + +} + +_IRQL_requires_max_(DISPATCH_LEVEL) +NTKRNLVISTAAPI +BOOLEAN +NTAPI +PoGetSystemWake( + _In_ struct _IRP *Irp) +{ + return FALSE; +}
4 years, 3 months
1
0
0
0
[reactos] 01/01: [XDK] Add definitions required for newer storage class drivers (cdrom) That introduced some warnings in the current code which were corrected as well
by Victor Perevertkin
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=d01518da7cebdf87cc38e…
commit d01518da7cebdf87cc38eefdff70aefa289b2f95 Author: Victor Perevertkin <victor.perevertkin(a)reactos.org> AuthorDate: Thu Sep 24 22:30:52 2020 +0300 Commit: Victor Perevertkin <victor.perevertkin(a)reactos.org> CommitDate: Thu Sep 24 22:30:52 2020 +0300 [XDK] Add definitions required for newer storage class drivers (cdrom) That introduced some warnings in the current code which were corrected as well CORE-17129 --- drivers/storage/class/ramdisk/ramdisk.c | 1 + ntoskrnl/mm/ARM3/mdlsup.c | 2 +- sdk/include/ndk/mmtypes.h | 6 + sdk/include/xdk/exfuncs.h | 50 ++++ sdk/include/xdk/extypes.h | 46 +++ sdk/include/xdk/iotypes.h | 480 +++++++++++++++++++++++++++++++- sdk/include/xdk/ketypes.h | 6 + sdk/include/xdk/mmfuncs.h | 7 +- sdk/include/xdk/potypes.h | 276 +++++++++++++++++- 9 files changed, 864 insertions(+), 10 deletions(-) diff --git a/drivers/storage/class/ramdisk/ramdisk.c b/drivers/storage/class/ramdisk/ramdisk.c index 4f910eff5be..987d0ffc6fd 100644 --- a/drivers/storage/class/ramdisk/ramdisk.c +++ b/drivers/storage/class/ramdisk/ramdisk.c @@ -1733,6 +1733,7 @@ RamdiskQueryId(IN PRAMDISK_DRIVE_EXTENSION DriveExtension, } case BusQueryDeviceSerialNumber: + case BusQueryContainerID: { /* Nothing to do */ break; diff --git a/ntoskrnl/mm/ARM3/mdlsup.c b/ntoskrnl/mm/ARM3/mdlsup.c index 4975b3edc8b..10a2aa02f68 100644 --- a/ntoskrnl/mm/ARM3/mdlsup.c +++ b/ntoskrnl/mm/ARM3/mdlsup.c @@ -666,7 +666,7 @@ MmMapLockedPagesSpecifyCache(IN PMDL Mdl, IN MEMORY_CACHING_TYPE CacheType, IN PVOID BaseAddress, IN ULONG BugCheckOnFailure, - IN MM_PAGE_PRIORITY Priority) + IN ULONG Priority) // MM_PAGE_PRIORITY { PVOID Base; PPFN_NUMBER MdlPages, LastPage; diff --git a/sdk/include/ndk/mmtypes.h b/sdk/include/ndk/mmtypes.h index a19b5f1ee60..ca62ebdf5ce 100644 --- a/sdk/include/ndk/mmtypes.h +++ b/sdk/include/ndk/mmtypes.h @@ -125,6 +125,12 @@ typedef enum _POOL_TYPE PagedPoolCacheAligned, NonPagedPoolCacheAlignedMustS, MaxPoolType, + + NonPagedPoolBase = 0, + NonPagedPoolBaseMustSucceed = NonPagedPoolBase + 2, + NonPagedPoolBaseCacheAligned = NonPagedPoolBase + 4, + NonPagedPoolBaseCacheAlignedMustS = NonPagedPoolBase + 6, + NonPagedPoolSession = 32, PagedPoolSession, NonPagedPoolMustSucceedSession, diff --git a/sdk/include/xdk/exfuncs.h b/sdk/include/xdk/exfuncs.h index 1f9a1ad6a97..2d0c2332f2b 100644 --- a/sdk/include/xdk/exfuncs.h +++ b/sdk/include/xdk/exfuncs.h @@ -950,6 +950,56 @@ ExLocalTimeToSystemTime( _In_ PLARGE_INTEGER LocalTime, _Out_ PLARGE_INTEGER SystemTime); +#if (NTDDI_VERSION >= NTDDI_WINBLUE) + +#define EX_TIMER_HIGH_RESOLUTION 0x4 +#define EX_TIMER_NO_WAKE 0x8 +#define EX_TIMER_UNLIMITED_TOLERANCE ((LONGLONG)-1) +#define EX_TIMER_NOTIFICATION (1UL << 31) + +NTKERNELAPI +PEX_TIMER +NTAPI +ExAllocateTimer( + _In_opt_ PEXT_CALLBACK Callback, + _In_opt_ PVOID CallbackContext, + _In_ ULONG Attributes); + +NTKERNELAPI +BOOLEAN +NTAPI +ExSetTimer( + _In_ PEX_TIMER Timer, + _In_ LONGLONG DueTime, + _In_ LONGLONG Period, + _In_opt_ PEXT_SET_PARAMETERS Parameters); + +NTKERNELAPI +BOOLEAN +NTAPI +ExCancelTimer( + _Inout_ PEX_TIMER Timer, + _In_opt_ PEXT_CANCEL_PARAMETERS Parameters); + +NTKERNELAPI +BOOLEAN +NTAPI +ExDeleteTimer( + _In_ PEX_TIMER Timer, + _In_ BOOLEAN Cancel, + _In_ BOOLEAN Wait, + _In_opt_ PEXT_DELETE_PARAMETERS Parameters); + +FORCEINLINE +VOID +ExInitializeSetTimerParameters( + _Out_ PEXT_SET_PARAMETERS Parameters) +{ + ASSERT(FALSE); +} + +#endif // NTDDI_WINBLUE + _IRQL_requires_max_(DISPATCH_LEVEL) NTKERNELAPI VOID diff --git a/sdk/include/xdk/extypes.h b/sdk/include/xdk/extypes.h index 548dceee203..a8c5fa87dc2 100644 --- a/sdk/include/xdk/extypes.h +++ b/sdk/include/xdk/extypes.h @@ -277,6 +277,52 @@ extern NTKERNELAPI ULONG NtGlobalFlag; #define IF_NTOS_DEBUG(FlagName) if(FALSE) #endif +#if (NTDDI_VERSION >= NTDDI_WINBLUE) + +typedef struct _EXT_SET_PARAMETERS_V0 +{ + ULONG Version; + ULONG Reserved; + LONGLONG NoWakeTolerance; +} EXT_SET_PARAMETERS, *PEXT_SET_PARAMETERS; + +typedef EXT_SET_PARAMETERS KT2_SET_PARAMETERS, *PKT2_SET_PARAMETERS; + +typedef struct _EX_TIMER *PEX_TIMER; + +_Function_class_(EXT_CALLBACK) +_IRQL_requires_(DISPATCH_LEVEL) +_IRQL_requires_same_ +typedef +VOID +NTAPI +EXT_CALLBACK( + _In_ PEX_TIMER Timer, + _In_opt_ PVOID Context); + +typedef EXT_CALLBACK *PEXT_CALLBACK; + +_Function_class_(EXT_DELETE_CALLBACK) +_IRQL_requires_(DISPATCH_LEVEL) +_IRQL_requires_same_ +typedef +VOID +NTAPI +EXT_DELETE_CALLBACK( + _In_opt_ PVOID Context); + +typedef EXT_DELETE_CALLBACK *PEXT_DELETE_CALLBACK; +typedef PVOID PEXT_CANCEL_PARAMETERS; +typedef struct _EXT_DELETE_PARAMETERS +{ + ULONG Version; + ULONG Reserved; + PEXT_DELETE_CALLBACK DeleteCallback; + PVOID DeleteContext; +} EXT_DELETE_PARAMETERS, *PEXT_DELETE_PARAMETERS; + +#endif // NTDDI_WINBLUE + $endif (_WDMDDK_) $if (_NTDDK_) typedef struct _ZONE_SEGMENT_HEADER { diff --git a/sdk/include/xdk/iotypes.h b/sdk/include/xdk/iotypes.h index d53d9371532..d1392e0857a 100644 --- a/sdk/include/xdk/iotypes.h +++ b/sdk/include/xdk/iotypes.h @@ -119,7 +119,7 @@ $if (_WDMDDK_) typedef USHORT IRQ_DEVICE_POLICY, *PIRQ_DEVICE_POLICY; -typedef enum _IRQ_DEVICE_POLICY_USHORT { +enum _IRQ_DEVICE_POLICY_USHORT { IrqPolicyMachineDefault = 0, IrqPolicyAllCloseProcessors = 1, IrqPolicyOneCloseProcessor = 2, @@ -392,6 +392,17 @@ typedef struct _IO_DISCONNECT_INTERRUPT_PARAMETERS { } ConnectionContext; } IO_DISCONNECT_INTERRUPT_PARAMETERS, *PIO_DISCONNECT_INTERRUPT_PARAMETERS; +typedef struct _IO_REPORT_INTERRUPT_ACTIVE_STATE_PARAMETERS +{ + ULONG Version; + union + { + PVOID Generic; + PKINTERRUPT InterruptObject; + PIO_INTERRUPT_MESSAGE_INFO InterruptMessageTable; + } ConnectionContext; +} IO_REPORT_INTERRUPT_ACTIVE_STATE_PARAMETERS, *PIO_REPORT_INTERRUPT_ACTIVE_STATE_PARAMETERS; + typedef enum _IO_ACCESS_TYPE { ReadAccess, WriteAccess, @@ -920,7 +931,12 @@ typedef struct _DEVICE_CAPABILITIES { ULONG NonDynamic:1; ULONG WarmEjectSupported:1; ULONG NoDisplayInUI:1; - ULONG Reserved:14; + ULONG Reserved1:1; + ULONG WakeFromInterrupt:1; + ULONG SecureDevice:1; + ULONG ChildOfVgaEnabledBridge:1; + ULONG DecodeIoOnBoot:1; + ULONG Reserved:9; ULONG Address; ULONG UINumber; DEVICE_POWER_STATE DeviceState[PowerSystemMaximum]; @@ -2027,6 +2043,7 @@ typedef enum _DMA_SPEED { #define DEVICE_DESCRIPTION_VERSION 0x0000 #define DEVICE_DESCRIPTION_VERSION1 0x0001 #define DEVICE_DESCRIPTION_VERSION2 0x0002 +#define DEVICE_DESCRIPTION_VERSION3 0x0003 typedef struct _DEVICE_DESCRIPTION { ULONG Version; @@ -2045,8 +2062,72 @@ typedef struct _DEVICE_DESCRIPTION { DMA_SPEED DmaSpeed; ULONG MaximumLength; ULONG DmaPort; +#if (NTDDI_VERSION >= NTDDI_WIN8) + ULONG DmaAddressWidth; + ULONG DmaControllerInstance; + ULONG DmaRequestLine; + PHYSICAL_ADDRESS DeviceAddress; +#endif // NTDDI_WIN8 } DEVICE_DESCRIPTION, *PDEVICE_DESCRIPTION; +#define DMA_ADAPTER_INFO_VERSION1 1 + +#define ADAPTER_INFO_SYNCHRONOUS_CALLBACK 0x0001 +#define ADAPTER_INFO_API_BYPASS 0x0002 + +typedef struct _DMA_ADAPTER_INFO_V1 +{ + ULONG ReadDmaCounterAvailable; + ULONG ScatterGatherLimit; + ULONG DmaAddressWidth; + ULONG Flags; + ULONG MinimumTransferUnit; +} DMA_ADAPTER_INFO_V1, *PDMA_ADAPTER_INFO_V1; + +typedef struct _DMA_ADAPTER_INFO +{ + ULONG Version; + union + { + DMA_ADAPTER_INFO_V1 V1; + }; +} DMA_ADAPTER_INFO, *PDMA_ADAPTER_INFO; + +#define DMA_TRANSFER_INFO_VERSION1 1 +#define DMA_TRANSFER_INFO_VERSION2 2 + +typedef struct _DMA_TRANSFER_INFO_V1 +{ + ULONG MapRegisterCount; + ULONG ScatterGatherElementCount; + ULONG ScatterGatherListSize; +} DMA_TRANSFER_INFO_V1, *PDMA_TRANSFER_INFO_V1; + +typedef struct _DMA_TRANSFER_INFO_V2 +{ + ULONG MapRegisterCount; + ULONG ScatterGatherElementCount; + ULONG ScatterGatherListSize; + ULONG LogicalPageCount; +} DMA_TRANSFER_INFO_V2, *PDMA_TRANSFER_INFO_V2; + +typedef struct _DMA_TRANSFER_INFO +{ + ULONG Version; + union { + DMA_TRANSFER_INFO_V1 V1; + DMA_TRANSFER_INFO_V2 V2; + }; +} DMA_TRANSFER_INFO, *PDMA_TRANSFER_INFO; + +#define DMA_TRANSFER_CONTEXT_VERSION1 1 + +#ifdef _WIN64 +#define DMA_TRANSFER_CONTEXT_SIZE_V1 128 +#else +#define DMA_TRANSFER_CONTEXT_SIZE_V1 64 +#endif + typedef enum _DEVICE_RELATION_TYPE { BusRelations, EjectionRelations, @@ -2194,6 +2275,14 @@ typedef struct _DMA_ADAPTER { struct _DMA_OPERATIONS* DmaOperations; } DMA_ADAPTER, *PDMA_ADAPTER; +typedef enum +{ + DmaComplete, + DmaAborted, + DmaError, + DmaCancelled +} DMA_COMPLETION_STATUS; + typedef VOID (NTAPI *PPUT_DMA_ADAPTER)( PDMA_ADAPTER DmaAdapter); @@ -2313,6 +2402,213 @@ typedef NTSTATUS _In_ PMDL OriginalMdl, _Out_ PMDL *TargetMdl); +typedef NTSTATUS +(NTAPI *PGET_DMA_ADAPTER_INFO)( + _In_ PDMA_ADAPTER DmaAdapter, + _Inout_ PDMA_ADAPTER_INFO AdapterInfo); + +typedef NTSTATUS +(NTAPI *PGET_DMA_TRANSFER_INFO)( + _In_ PDMA_ADAPTER DmaAdapter, + _In_ PMDL Mdl, + _In_ ULONGLONG Offset, + _In_ ULONG Length, + _In_ BOOLEAN WriteOnly, + _Inout_ PDMA_TRANSFER_INFO TransferInfo); + +typedef NTSTATUS +(NTAPI *PINITIALIZE_DMA_TRANSFER_CONTEXT)( + _In_ PDMA_ADAPTER DmaAdapter, + _Out_ PVOID DmaTransferContext); + +typedef PVOID +(NTAPI *PALLOCATE_COMMON_BUFFER_EX)( + _In_ PDMA_ADAPTER DmaAdapter, + _In_opt_ PPHYSICAL_ADDRESS MaximumAddress, + _In_ ULONG Length, + _Out_ PPHYSICAL_ADDRESS LogicalAddress, + _In_ BOOLEAN CacheEnabled, + _In_ NODE_REQUIREMENT PreferredNode); + +typedef NTSTATUS +(NTAPI *PALLOCATE_ADAPTER_CHANNEL_EX)( + _In_ PDMA_ADAPTER DmaAdapter, + _In_ PDEVICE_OBJECT DeviceObject, + _In_ PVOID DmaTransferContext, + _In_ ULONG NumberOfMapRegisters, + _In_ ULONG Flags, + _In_opt_ PDRIVER_CONTROL ExecutionRoutine, + _In_opt_ PVOID ExecutionContext, + _Out_opt_ PVOID *MapRegisterBase); + +typedef NTSTATUS +(NTAPI *PCONFIGURE_ADAPTER_CHANNEL)( + _In_ PDMA_ADAPTER DmaAdapter, + _In_ ULONG FunctionNumber, + _In_ PVOID Context); + +typedef BOOLEAN +(NTAPI *PCANCEL_ADAPTER_CHANNEL)( + _In_ PDMA_ADAPTER DmaAdapter, + _In_ PDEVICE_OBJECT DeviceObject, + _In_ PVOID DmaTransferContext); + +typedef +_Function_class_(DMA_COMPLETION_ROUTINE) +_IRQL_requires_max_(DISPATCH_LEVEL) +_IRQL_requires_min_(DISPATCH_LEVEL) +VOID +NTAPI +DMA_COMPLETION_ROUTINE( + _In_ PDMA_ADAPTER DmaAdapter, + _In_ PDEVICE_OBJECT DeviceObject, + _In_ PVOID CompletionContext, + _In_ DMA_COMPLETION_STATUS Status); + +typedef DMA_COMPLETION_ROUTINE *PDMA_COMPLETION_ROUTINE; + +typedef NTSTATUS +(NTAPI *PMAP_TRANSFER_EX)( + _In_ PDMA_ADAPTER DmaAdapter, + _In_ PMDL Mdl, + _In_ PVOID MapRegisterBase, + _In_ ULONGLONG Offset, + _In_ ULONG DeviceOffset, + _Inout_ PULONG Length, + _In_ BOOLEAN WriteToDevice, + _Out_writes_bytes_opt_(ScatterGatherBufferLength) PSCATTER_GATHER_LIST ScatterGatherBuffer, + _In_ ULONG ScatterGatherBufferLength, + _In_opt_ PDMA_COMPLETION_ROUTINE DmaCompletionRoutine, + _In_opt_ PVOID CompletionContext); + +typedef NTSTATUS +(NTAPI *PGET_SCATTER_GATHER_LIST_EX)( + _In_ PDMA_ADAPTER DmaAdapter, + _In_ PDEVICE_OBJECT DeviceObject, + _In_ PVOID DmaTransferContext, + _In_ PMDL Mdl, + _In_ ULONGLONG Offset, + _In_ ULONG Length, + _In_ ULONG Flags, + _In_opt_ PDRIVER_LIST_CONTROL ExecutionRoutine, + _In_opt_ PVOID Context, + _In_ BOOLEAN WriteToDevice, + _In_opt_ PDMA_COMPLETION_ROUTINE DmaCompletionRoutine, + _In_opt_ PVOID CompletionContext, + _Out_opt_ PSCATTER_GATHER_LIST *ScatterGatherList); + +typedef NTSTATUS +(NTAPI *PBUILD_SCATTER_GATHER_LIST_EX)( + _In_ PDMA_ADAPTER DmaAdapter, + _In_ PDEVICE_OBJECT DeviceObject, + _In_ PVOID DmaTransferContext, + _In_ PMDL Mdl, + _In_ ULONGLONG Offset, + _In_ ULONG Length, + _In_ ULONG Flags, + _In_opt_ PDRIVER_LIST_CONTROL ExecutionRoutine, + _In_opt_ PVOID Context, + _In_ BOOLEAN WriteToDevice, + _In_ PVOID ScatterGatherBuffer, + _In_ ULONG ScatterGatherLength, + _In_opt_ PDMA_COMPLETION_ROUTINE DmaCompletionRoutine, + _In_opt_ PVOID CompletionContext, + _Out_opt_ PVOID ScatterGatherList); + +typedef NTSTATUS +(NTAPI *PFLUSH_ADAPTER_BUFFERS_EX)( + _In_ PDMA_ADAPTER DmaAdapter, + _In_ PMDL Mdl, + _In_ PVOID MapRegisterBase, + _In_ ULONGLONG Offset, + _In_ ULONG Length, + _In_ BOOLEAN WriteToDevice); + +typedef VOID +(NTAPI *PFREE_ADAPTER_OBJECT)( + _In_ PDMA_ADAPTER DmaAdapter, + _In_ IO_ALLOCATION_ACTION AllocationAction); + +typedef NTSTATUS +(NTAPI *PCANCEL_MAPPED_TRANSFER)( + _In_ PDMA_ADAPTER DmaAdapter, + _In_ PVOID DmaTransferContext); + +typedef NTSTATUS +(NTAPI *PALLOCATE_DOMAIN_COMMON_BUFFER)( + _In_ PDMA_ADAPTER DmaAdapter, + _In_ HANDLE DomainHandle, + _In_opt_ PPHYSICAL_ADDRESS MaximumAddress, + _In_ ULONG Length, + _In_ ULONG Flags, + _In_opt_ MEMORY_CACHING_TYPE *CacheType, + _In_ NODE_REQUIREMENT PreferredNode, + _Out_ PPHYSICAL_ADDRESS LogicalAddress, + _Out_ PVOID *VirtualAddress); + +typedef NTSTATUS +(NTAPI *PFLUSH_DMA_BUFFER)( + _In_ PDMA_ADAPTER DmaAdapter, + _In_ PMDL Mdl, + _In_ BOOLEAN ReadOperation); + +typedef NTSTATUS +(NTAPI *PJOIN_DMA_DOMAIN)( + _In_ PDMA_ADAPTER DmaAdapter, + _In_ HANDLE DomainHandle); + +typedef NTSTATUS +(NTAPI *PLEAVE_DMA_DOMAIN)( + _In_ PDMA_ADAPTER DmaAdapter); + +typedef HANDLE +(NTAPI *PGET_DMA_DOMAIN)( + _In_ PDMA_ADAPTER DmaAdapter); + +typedef PVOID +(NTAPI *PALLOCATE_COMMON_BUFFER_WITH_BOUNDS)( + _In_ PDMA_ADAPTER DmaAdapter, + _In_opt_ PPHYSICAL_ADDRESS MinimumAddress, + _In_opt_ PPHYSICAL_ADDRESS MaximumAddress, + _In_ ULONG Length, + _In_ ULONG Flags, + _In_opt_ MEMORY_CACHING_TYPE *CacheType, + _In_ NODE_REQUIREMENT PreferredNode, + _Out_ PPHYSICAL_ADDRESS LogicalAddress); + +typedef struct _DMA_COMMON_BUFFER_VECTOR DMA_COMMON_BUFFER_VECTOR, *PDMA_COMMON_BUFFER_VECTOR; + +typedef NTSTATUS +(NTAPI *PALLOCATE_COMMON_BUFFER_VECTOR)( + _In_ PDMA_ADAPTER DmaAdapter, + _In_ PHYSICAL_ADDRESS LowAddress, + _In_ PHYSICAL_ADDRESS HighAddress, + _In_ MEMORY_CACHING_TYPE CacheType, + _In_ ULONG IdealNode, + _In_ ULONG Flags, + _In_ ULONG NumberOfElements, + _In_ ULONGLONG SizeOfElements, + _Out_ PDMA_COMMON_BUFFER_VECTOR *VectorOut); + +typedef VOID +(NTAPI *PGET_COMMON_BUFFER_FROM_VECTOR_BY_INDEX)( + _In_ PDMA_ADAPTER DmaAdapter, + _In_ PDMA_COMMON_BUFFER_VECTOR Vector, + _In_ ULONG Index, + _Out_ PVOID *VirtualAddressOut, + _Out_ PPHYSICAL_ADDRESS LogicalAddressOut); + +typedef VOID +(NTAPI *PFREE_COMMON_BUFFER_FROM_VECTOR)( + _In_ PDMA_ADAPTER DmaAdapter, + _In_ PDMA_COMMON_BUFFER_VECTOR Vector, + _In_ ULONG Index); + +typedef VOID +(NTAPI *PFREE_COMMON_BUFFER_VECTOR)( + _In_ PDMA_ADAPTER DmaAdapter, + _In_ PDMA_COMMON_BUFFER_VECTOR Vector); + typedef struct _DMA_OPERATIONS { ULONG Size; PPUT_DMA_ADAPTER PutDmaAdapter; @@ -2330,6 +2626,29 @@ typedef struct _DMA_OPERATIONS { PCALCULATE_SCATTER_GATHER_LIST_SIZE CalculateScatterGatherList; PBUILD_SCATTER_GATHER_LIST BuildScatterGatherList; PBUILD_MDL_FROM_SCATTER_GATHER_LIST BuildMdlFromScatterGatherList; + PGET_DMA_ADAPTER_INFO GetDmaAdapterInfo; + PGET_DMA_TRANSFER_INFO GetDmaTransferInfo; + PINITIALIZE_DMA_TRANSFER_CONTEXT InitializeDmaTransferContext; + PALLOCATE_COMMON_BUFFER_EX AllocateCommonBufferEx; + PALLOCATE_ADAPTER_CHANNEL_EX AllocateAdapterChannelEx; + PCONFIGURE_ADAPTER_CHANNEL ConfigureAdapterChannel; + PCANCEL_ADAPTER_CHANNEL CancelAdapterChannel; + PMAP_TRANSFER_EX MapTransferEx; + PGET_SCATTER_GATHER_LIST_EX GetScatterGatherListEx; + PBUILD_SCATTER_GATHER_LIST_EX BuildScatterGatherListEx; + PFLUSH_ADAPTER_BUFFERS_EX FlushAdapterBuffersEx; + PFREE_ADAPTER_OBJECT FreeAdapterObject; + PCANCEL_MAPPED_TRANSFER CancelMappedTransfer; + PALLOCATE_DOMAIN_COMMON_BUFFER AllocateDomainCommonBuffer; + PFLUSH_DMA_BUFFER FlushDmaBuffer; + PJOIN_DMA_DOMAIN JoinDmaDomain; + PLEAVE_DMA_DOMAIN LeaveDmaDomain; + PGET_DMA_DOMAIN GetDmaDomain; + PALLOCATE_COMMON_BUFFER_WITH_BOUNDS AllocateCommonBufferWithBounds; + PALLOCATE_COMMON_BUFFER_VECTOR AllocateCommonBufferVector; + PGET_COMMON_BUFFER_FROM_VECTOR_BY_INDEX GetCommonBufferFromVectorByIndex; + PFREE_COMMON_BUFFER_FROM_VECTOR FreeCommonBufferFromVector; + PFREE_COMMON_BUFFER_VECTOR FreeCommonBufferVector; } DMA_OPERATIONS, *PDMA_OPERATIONS; typedef struct _IO_RESOURCE_DESCRIPTOR { @@ -2355,6 +2674,14 @@ typedef struct _IO_RESOURCE_DESCRIPTOR { struct { ULONG MinimumVector; ULONG MaximumVector; +#if defined(NT_PROCESSOR_GROUPS) + IRQ_DEVICE_POLICY AffinityPolicy; + USHORT Group; +#else + IRQ_DEVICE_POLICY AffinityPolicy; +#endif + IRQ_PRIORITY PriorityPolicy; + KAFFINITY TargetedProcessors; } Interrupt; struct { ULONG MinimumChannel; @@ -2589,7 +2916,8 @@ typedef enum _BUS_QUERY_ID_TYPE { BusQueryHardwareIDs, BusQueryCompatibleIDs, BusQueryInstanceID, - BusQueryDeviceSerialNumber + BusQueryDeviceSerialNumber, + BusQueryContainerID } BUS_QUERY_ID_TYPE, *PBUS_QUERY_ID_TYPE; typedef enum _DEVICE_TEXT_TYPE { @@ -7110,3 +7438,149 @@ typedef struct _IO_PRIORITY_INFO { } IO_PRIORITY_INFO, *PIO_PRIORITY_INFO; #endif $endif (_NTIFS_) + +$if (_WDMDDK_) + +#define D3COLD_SUPPORT_INTERFACE_VERSION 1 + +typedef +_Function_class_(SET_D3COLD_SUPPORT) +_IRQL_requires_(PASSIVE_LEVEL) +VOID +SET_D3COLD_SUPPORT( + _In_reads_opt_(_Inexpressible_("varies")) PVOID Context, + _In_ BOOLEAN D3ColdSupport); + +typedef SET_D3COLD_SUPPORT *PSET_D3COLD_SUPPORT; + +typedef enum _DEVICE_WAKE_DEPTH +{ + DeviceWakeDepthNotWakeable = 0, + DeviceWakeDepthD0, + DeviceWakeDepthD1, + DeviceWakeDepthD2, + DeviceWakeDepthD3hot, + DeviceWakeDepthD3cold, + DeviceWakeDepthMaximum +} DEVICE_WAKE_DEPTH, *PDEVICE_WAKE_DEPTH; + +FORCEINLINE +DEVICE_POWER_STATE +MapWakeDepthToDstate( + _In_ DEVICE_WAKE_DEPTH WakeDepth) +{ + const DEVICE_POWER_STATE dstateMap[DeviceWakeDepthMaximum] = + { + PowerDeviceD0, + PowerDeviceD0, + PowerDeviceD1, + PowerDeviceD2, + PowerDeviceD3, + PowerDeviceD3 + }; + + if (WakeDepth < 0 || WakeDepth >= DeviceWakeDepthMaximum) + { + return PowerDeviceUnspecified; + } + else + { + return dstateMap[WakeDepth]; + } +} + +typedef +_Function_class_(GET_IDLE_WAKE_INFO) +_IRQL_requires_(PASSIVE_LEVEL) +NTSTATUS +GET_IDLE_WAKE_INFO( + _In_reads_opt_(_Inexpressible_("varies")) PVOID Context, + _In_ SYSTEM_POWER_STATE SystemPowerState, + _Out_ PDEVICE_WAKE_DEPTH DeepestWakeableDstate); + +typedef GET_IDLE_WAKE_INFO *PGET_IDLE_WAKE_INFO; + +typedef +_Function_class_(GET_D3COLD_CAPABILITY) +_IRQL_requires_(PASSIVE_LEVEL) +NTSTATUS +GET_D3COLD_CAPABILITY( + _In_reads_opt_(_Inexpressible_("varies")) PVOID Context, + _Out_ PBOOLEAN D3ColdSupported); + +typedef GET_D3COLD_CAPABILITY *PGET_D3COLD_CAPABILITY; + +typedef enum _D3COLD_LAST_TRANSITION_STATUS +{ + LastDStateTransitionStatusUnknown = 0, + LastDStateTransitionD3hot, + LastDStateTransitionD3cold +} D3COLD_LAST_TRANSITION_STATUS, *PD3COLD_LAST_TRANSITION_STATUS; + +typedef +_Function_class_(GET_D3COLD_LAST_TRANSITION_STATUS) +_IRQL_requires_max_(DISPATCH_LEVEL) +VOID +GET_D3COLD_LAST_TRANSITION_STATUS( + _In_reads_opt_(_Inexpressible_("varies")) PVOID Context, + _Out_ PD3COLD_LAST_TRANSITION_STATUS LastTransitionStatus); + +typedef GET_D3COLD_LAST_TRANSITION_STATUS *PGET_D3COLD_LAST_TRANSITION_STATUS; + +typedef struct _D3COLD_SUPPORT_INTERFACE +{ + USHORT Size; + USHORT Version; + PVOID Context; + PINTERFACE_REFERENCE InterfaceReference; + PINTERFACE_DEREFERENCE InterfaceDereference; + PSET_D3COLD_SUPPORT SetD3ColdSupport; + PGET_IDLE_WAKE_INFO GetIdleWakeInfo; + PGET_D3COLD_CAPABILITY GetD3ColdCapability; + PGET_D3COLD_CAPABILITY GetBusDriverD3ColdSupport; + PGET_D3COLD_LAST_TRANSITION_STATUS GetLastTransitionStatus; +} D3COLD_SUPPORT_INTERFACE, *PD3COLD_SUPPORT_INTERFACE; + +typedef +_Function_class_(D3COLD_REQUEST_CORE_POWER_RAIL) +_IRQL_requires_(PASSIVE_LEVEL) +VOID +D3COLD_REQUEST_CORE_POWER_RAIL( + _In_reads_opt_(_Inexpressible_("varies")) PVOID Context, + _In_ BOOLEAN CorePowerRailNeeded); + +typedef D3COLD_REQUEST_CORE_POWER_RAIL *PD3COLD_REQUEST_CORE_POWER_RAIL; + +typedef +_Function_class_(D3COLD_REQUEST_AUX_POWER) +_IRQL_requires_(PASSIVE_LEVEL) +NTSTATUS +D3COLD_REQUEST_AUX_POWER( + _In_reads_opt_(_Inexpressible_("varies")) PVOID Context, + _In_ ULONG AuxPowerInMilliWatts, + _Out_ PULONG RetryInSeconds); + +typedef D3COLD_REQUEST_AUX_POWER *PD3COLD_REQUEST_AUX_POWER; + +typedef +_Function_class_(D3COLD_REQUEST_PERST_DELAY) +_IRQL_requires_(PASSIVE_LEVEL) +NTSTATUS +D3COLD_REQUEST_PERST_DELAY( + _In_reads_opt_(_Inexpressible_("varies")) PVOID Context, + _In_ ULONG DelayInMicroSeconds); + +typedef D3COLD_REQUEST_PERST_DELAY *PD3COLD_REQUEST_PERST_DELAY; + +typedef struct _D3COLD_AUX_POWER_AND_TIMING_INTERFACE +{ + USHORT Size; + USHORT Version; + PVOID Context; + PINTERFACE_REFERENCE InterfaceReference; + PINTERFACE_DEREFERENCE InterfaceDereference; + PD3COLD_REQUEST_CORE_POWER_RAIL RequestCorePowerRail; + PD3COLD_REQUEST_AUX_POWER RequestAuxPower; + PD3COLD_REQUEST_PERST_DELAY RequestPerstDelay; +} D3COLD_AUX_POWER_AND_TIMING_INTERFACE, *PD3COLD_AUX_POWER_AND_TIMING_INTERFACE; +$endif(_WDMDDK_) diff --git a/sdk/include/xdk/ketypes.h b/sdk/include/xdk/ketypes.h index 5e276c08c71..d8abc4089c2 100644 --- a/sdk/include/xdk/ketypes.h +++ b/sdk/include/xdk/ketypes.h @@ -871,6 +871,12 @@ typedef enum _POOL_TYPE { PagedPoolCacheAligned, NonPagedPoolCacheAlignedMustS, MaxPoolType, + + NonPagedPoolBase = 0, + NonPagedPoolBaseMustSucceed = NonPagedPoolBase + 2, + NonPagedPoolBaseCacheAligned = NonPagedPoolBase + 4, + NonPagedPoolBaseCacheAlignedMustS = NonPagedPoolBase + 6, + NonPagedPoolSession = 32, PagedPoolSession, NonPagedPoolMustSucceedSession, diff --git a/sdk/include/xdk/mmfuncs.h b/sdk/include/xdk/mmfuncs.h index d8a18fb9a42..478763fbc6e 100644 --- a/sdk/include/xdk/mmfuncs.h +++ b/sdk/include/xdk/mmfuncs.h @@ -321,12 +321,11 @@ PVOID NTAPI MmMapLockedPagesSpecifyCache( _Inout_ PMDL MemoryDescriptorList, - _In_ __drv_strictType(KPROCESSOR_MODE/enum _MODE,__drv_typeConst) - KPROCESSOR_MODE AccessMode, + _In_ __drv_strictType(KPROCESSOR_MODE/enum _MODE,__drv_typeConst) KPROCESSOR_MODE AccessMode, _In_ __drv_strictTypeMatch(__drv_typeCond) MEMORY_CACHING_TYPE CacheType, - _In_opt_ PVOID BaseAddress, + _In_opt_ PVOID RequestedAddress, _In_ ULONG BugCheckOnFailure, - _In_ MM_PAGE_PRIORITY Priority); + _In_ ULONG Priority); _IRQL_requires_max_(APC_LEVEL) NTKERNELAPI diff --git a/sdk/include/xdk/potypes.h b/sdk/include/xdk/potypes.h index 43ee700c8bb..9524ee0b7c4 100644 --- a/sdk/include/xdk/potypes.h +++ b/sdk/include/xdk/potypes.h @@ -56,7 +56,7 @@ typedef enum _POWER_INFORMATION_LEVEL { SetPowerSettingValue, NotifyUserPowerSetting, PowerInformationLevelUnused0, - PowerInformationLevelUnused1, + SystemMonitorHiberBootPowerOff, SystemVideoState, TraceApplicationPowerMessage, TraceApplicationPowerMessageEnd, @@ -80,6 +80,50 @@ typedef enum _POWER_INFORMATION_LEVEL { ProcessorIdleDomains, WakeTimerList, SystemHiberFileSize, + ProcessorIdleStatesHv, + ProcessorPerfStatesHv, + ProcessorPerfCapHv, + ProcessorSetIdle, + LogicalProcessorIdling, + UserPresence, + PowerSettingNotificationName, + GetPowerSettingValue, + IdleResiliency, + SessionRITState, + SessionConnectNotification, + SessionPowerCleanup, + SessionLockState, + SystemHiberbootState, + PlatformInformation, + PdcInvocation, + MonitorInvocation, + FirmwareTableInformationRegistered, + SetShutdownSelectedTime, + SuspendResumeInvocation, + PlmPowerRequestCreate, + ScreenOff, + CsDeviceNotification, + PlatformRole, + LastResumePerformance, + DisplayBurst, + ExitLatencySamplingPercentage, + RegisterSpmPowerSettings, + PlatformIdleStates, + ProcessorIdleVeto, // deprecated + PlatformIdleVeto, // deprecated + SystemBatteryStatePrecise, + ThermalEvent, + PowerRequestActionInternal, + BatteryDeviceState, + PowerInformationInternal, + ThermalStandby, + SystemHiberFileType, + PhysicalPowerButtonPress, + QueryPotentialDripsConstraint, + EnergyTrackerCreate, + EnergyTrackerQuery, + UpdateBlackBoxRecorder, + SessionAllowExternalDmaDevices, PowerInformationLevelMaximum } POWER_INFORMATION_LEVEL; @@ -254,9 +298,29 @@ typedef enum _POWER_PLATFORM_ROLE { PlatformRoleSOHOServer, PlatformRoleAppliancePC, PlatformRolePerformanceServer, + PlatformRoleSlate, PlatformRoleMaximum } POWER_PLATFORM_ROLE; +#define POWER_PLATFORM_ROLE_V1 (0x00000001) +#define POWER_PLATFORM_ROLE_V1_MAX (PlatformRolePerformanceServer + 1) + +#define POWER_PLATFORM_ROLE_V2 (0x00000002) +#define POWER_PLATFORM_ROLE_V2_MAX (PlatformRoleSlate + 1) + +#if (NTDDI_VERSION >= NTDDI_WIN8) +#define POWER_PLATFORM_ROLE_VERSION POWER_PLATFORM_ROLE_V2 +#define POWER_PLATFORM_ROLE_VERSION_MAX POWER_PLATFORM_ROLE_V2_MAX +#else +#define POWER_PLATFORM_ROLE_VERSION POWER_PLATFORM_ROLE_V1 +#define POWER_PLATFORM_ROLE_VERSION_MAX POWER_PLATFORM_ROLE_V1_MAX +#endif + +typedef struct _POWER_PLATFORM_INFORMATION +{ + BOOLEAN AoAc; +} POWER_PLATFORM_INFORMATION, *PPOWER_PLATFORM_INFORMATION; + #if (NTDDI_VERSION >= NTDDI_WINXP) || !defined(_BATCLASS_) typedef struct { ULONG Granularity; @@ -413,6 +477,215 @@ typedef NTSTATUS _In_ ULONG ValueLength, _Inout_opt_ PVOID Context); typedef POWER_SETTING_CALLBACK *PPOWER_SETTING_CALLBACK; + +#if (NTDDI_VERSION >= NTDDI_WIN8) + +#define PO_FX_VERSION_V1 0x00000001 +#define PO_FX_VERSION_V2 0x00000002 +#define PO_FX_VERSION_V3 0x00000003 +#define PO_FX_VERSION PO_FX_VERSION_V1 + +DECLARE_HANDLE(POHANDLE); + +typedef +_Function_class_(PO_FX_COMPONENT_ACTIVE_CONDITION_CALLBACK) +_IRQL_requires_max_(DISPATCH_LEVEL) +VOID +PO_FX_COMPONENT_ACTIVE_CONDITION_CALLBACK( + _In_ PVOID Context, + _In_ ULONG Component); + +typedef PO_FX_COMPONENT_ACTIVE_CONDITION_CALLBACK *PPO_FX_COMPONENT_ACTIVE_CONDITION_CALLBACK; + +typedef +_Function_class_(PO_FX_COMPONENT_IDLE_CONDITION_CALLBACK) +_IRQL_requires_max_(DISPATCH_LEVEL) +VOID +PO_FX_COMPONENT_IDLE_CONDITION_CALLBACK( + _In_ PVOID Context, + _In_ ULONG Component); + +typedef PO_FX_COMPONENT_IDLE_CONDITION_CALLBACK *PPO_FX_COMPONENT_IDLE_CONDITION_CALLBACK; + +typedef +_Function_class_(PO_FX_COMPONENT_IDLE_STATE_CALLBACK) +_IRQL_requires_max_(DISPATCH_LEVEL) +VOID +PO_FX_COMPONENT_IDLE_STATE_CALLBACK( + _In_ PVOID Context, + _In_ ULONG Component, + _In_ ULONG State); + +typedef PO_FX_COMPONENT_IDLE_STATE_CALLBACK *PPO_FX_COMPONENT_IDLE_STATE_CALLBACK; + +typedef +_Function_class_(PO_FX_DEVICE_POWER_REQUIRED_CALLBACK) +_IRQL_requires_max_(DISPATCH_LEVEL) +VOID +PO_FX_DEVICE_POWER_REQUIRED_CALLBACK( + _In_ PVOID Context); + +typedef PO_FX_DEVICE_POWER_REQUIRED_CALLBACK *PPO_FX_DEVICE_POWER_REQUIRED_CALLBACK; + +typedef +_Function_class_(PO_FX_DEVICE_POWER_NOT_REQUIRED_CALLBACK) +_IRQL_requires_max_(DISPATCH_LEVEL) +VOID +PO_FX_DEVICE_POWER_NOT_REQUIRED_CALLBACK( + _In_ PVOID Context); + +typedef PO_FX_DEVICE_POWER_NOT_REQUIRED_CALLBACK *PPO_FX_DEVICE_POWER_NOT_REQUIRED_CALLBACK; + +typedef +_Function_class_(PO_FX_POWER_CONTROL_CALLBACK) +_IRQL_requires_max_(DISPATCH_LEVEL) +NTSTATUS +PO_FX_POWER_CONTROL_CALLBACK( + _In_ PVOID DeviceContext, + _In_ LPCGUID PowerControlCode, + _In_reads_bytes_opt_(InBufferSize) PVOID InBuffer, + _In_ SIZE_T InBufferSize, + _Out_writes_bytes_opt_(OutBufferSize) PVOID OutBuffer, + _In_ SIZE_T OutBufferSize, + _Out_opt_ PSIZE_T BytesReturned); + +typedef PO_FX_POWER_CONTROL_CALLBACK *PPO_FX_POWER_CONTROL_CALLBACK; + +typedef +_Function_class_(PO_FX_COMPONENT_CRITICAL_TRANSITION_CALLBACK) +_IRQL_requires_max_(HIGH_LEVEL) +VOID +PO_FX_COMPONENT_CRITICAL_TRANSITION_CALLBACK( + _In_ PVOID Context, + _In_ ULONG Component, + _In_ BOOLEAN Active); + +typedef PO_FX_COMPONENT_CRITICAL_TRANSITION_CALLBACK *PPO_FX_COMPONENT_CRITICAL_TRANSITION_CALLBACK; + +typedef struct _PO_FX_COMPONENT_IDLE_STATE +{ + ULONGLONG TransitionLatency; + ULONGLONG ResidencyRequirement; + ULONG NominalPower; +} PO_FX_COMPONENT_IDLE_STATE, *PPO_FX_COMPONENT_IDLE_STATE; + +typedef struct _PO_FX_COMPONENT_V1 +{ + GUID Id; + ULONG IdleStateCount; + ULONG DeepestWakeableIdleState; + _Field_size_full_(IdleStateCount) PPO_FX_COMPONENT_IDLE_STATE IdleStates; +} PO_FX_COMPONENT_V1, *PPO_FX_COMPONENT_V1; + +typedef struct _PO_FX_DEVICE_V1 +{ + ULONG Version; + ULONG ComponentCount; + PPO_FX_COMPONENT_ACTIVE_CONDITION_CALLBACK ComponentActiveConditionCallback; + PPO_FX_COMPONENT_IDLE_CONDITION_CALLBACK ComponentIdleConditionCallback; + PPO_FX_COMPONENT_IDLE_STATE_CALLBACK ComponentIdleStateCallback; + PPO_FX_DEVICE_POWER_REQUIRED_CALLBACK DevicePowerRequiredCallback; + PPO_FX_DEVICE_POWER_NOT_REQUIRED_CALLBACK DevicePowerNotRequiredCallback; + PPO_FX_POWER_CONTROL_CALLBACK PowerControlCallback; + PVOID DeviceContext; + _Field_size_full_(ComponentCount) PO_FX_COMPONENT_V1 Components[ANYSIZE_ARRAY]; +} PO_FX_DEVICE_V1, *PPO_FX_DEVICE_V1; + +#define PO_FX_COMPONENT_FLAG_F0_ON_DX 0x0000000000000001 +#define PO_FX_COMPONENT_FLAG_NO_DEBOUNCE 0x0000000000000002 + +typedef struct _PO_FX_COMPONENT_V2 +{ + GUID Id; + ULONGLONG Flags; + ULONG DeepestWakeableIdleState; + ULONG IdleStateCount; + _Field_size_full_(IdleStateCount) PPO_FX_COMPONENT_IDLE_STATE IdleStates; + ULONG ProviderCount; + _Field_size_full_(ProviderCount) PULONG Providers; +} PO_FX_COMPONENT_V2, *PPO_FX_COMPONENT_V2; + +typedef struct _PO_FX_DEVICE_V2 +{ + ULONG Version; + ULONGLONG Flags; + PPO_FX_COMPONENT_ACTIVE_CONDITION_CALLBACK ComponentActiveConditionCallback; + PPO_FX_COMPONENT_IDLE_CONDITION_CALLBACK ComponentIdleConditionCallback; + PPO_FX_COMPONENT_IDLE_STATE_CALLBACK ComponentIdleStateCallback; + PPO_FX_DEVICE_POWER_REQUIRED_CALLBACK DevicePowerRequiredCallback; + PPO_FX_DEVICE_POWER_NOT_REQUIRED_CALLBACK DevicePowerNotRequiredCallback; + PPO_FX_POWER_CONTROL_CALLBACK PowerControlCallback; + PVOID DeviceContext; + ULONG ComponentCount; + _Field_size_full_(ComponentCount) PO_FX_COMPONENT_V2 Components[ANYSIZE_ARRAY]; +} PO_FX_DEVICE_V2, *PPO_FX_DEVICE_V2; + +#define PO_FX_DEVICE_FLAG_RESERVED_1 (0x0000000000000001ull) +#define PO_FX_DEVICE_FLAG_DFX_DIRECT_CHILDREN_OPTIONAL (0x0000000000000002ull) +#define PO_FX_DEVICE_FLAG_DFX_POWER_CHILDREN_OPTIONAL (0x0000000000000004ull) +#define PO_FX_DEVICE_FLAG_DFX_CHILDREN_OPTIONAL \ + (PO_FX_DEVICE_FLAG_DFX_DIRECT_CHILDREN_OPTIONAL | \ + PO_FX_DEVICE_FLAG_DFX_POWER_CHILDREN_OPTIONAL) + +#define PO_FX_DIRECTED_FX_DEFAULT_IDLE_TIMEOUT (0ul) +#define PO_FX_DIRECTED_FX_IMMEDIATE_IDLE_TIMEOUT ((ULONG)-1) +#define PO_FX_DIRECTED_FX_MAX_IDLE_TIMEOUT (10ul * 60) + +typedef +_Function_class_(PO_FX_DIRECTED_POWER_UP_CALLBACK) +_IRQL_requires_max_(DISPATCH_LEVEL) +_IRQL_requires_same_ +VOID +PO_FX_DIRECTED_POWER_UP_CALLBACK( + _In_ PVOID Context, + _In_ ULONG Flags); + +typedef PO_FX_DIRECTED_POWER_UP_CALLBACK *PPO_FX_DIRECTED_POWER_UP_CALLBACK; + +typedef +_Function_class_(PO_FX_DIRECTED_POWER_DOWN_CALLBACK) +_IRQL_requires_max_(DISPATCH_LEVEL) +_IRQL_requires_same_ +VOID +PO_FX_DIRECTED_POWER_DOWN_CALLBACK( + _In_ PVOID Context, + _In_ ULONG Flags); + +typedef PO_FX_DIRECTED_POWER_DOWN_CALLBACK *PPO_FX_DIRECTED_POWER_DOWN_CALLBACK; + +typedef struct _PO_FX_DEVICE_V3 +{ + ULONG Version; + ULONGLONG Flags; + PPO_FX_COMPONENT_ACTIVE_CONDITION_CALLBACK ComponentActiveConditionCallback; + PPO_FX_COMPONENT_IDLE_CONDITION_CALLBACK ComponentIdleConditionCallback; + PPO_FX_COMPONENT_IDLE_STATE_CALLBACK ComponentIdleStateCallback; + PPO_FX_DEVICE_POWER_REQUIRED_CALLBACK DevicePowerRequiredCallback; + PPO_FX_DEVICE_POWER_NOT_REQUIRED_CALLBACK DevicePowerNotRequiredCallback; + PPO_FX_POWER_CONTROL_CALLBACK PowerControlCallback; + PPO_FX_DIRECTED_POWER_UP_CALLBACK DirectedPowerUpCallback; + PPO_FX_DIRECTED_POWER_DOWN_CALLBACK DirectedPowerDownCallback; + ULONG DirectedFxTimeoutInSeconds; + PVOID DeviceContext; + ULONG ComponentCount; + _Field_size_full_(ComponentCount) PO_FX_COMPONENT_V2 Components[ANYSIZE_ARRAY]; +} PO_FX_DEVICE_V3, *PPO_FX_DEVICE_V3; + +#if (PO_FX_VERSION == PO_FX_VERSION_V1) +typedef PO_FX_COMPONENT_V1 PO_FX_COMPONENT, *PPO_FX_COMPONENT; +typedef PO_FX_DEVICE_V1 PO_FX_DEVICE, *PPO_FX_DEVICE; +#elif (PO_FX_VERSION == PO_FX_VERSION_V2) +typedef PO_FX_COMPONENT_V2 PO_FX_COMPONENT, *PPO_FX_COMPONENT; +typedef PO_FX_DEVICE_V2 PO_FX_DEVICE, *PPO_FX_DEVICE; +#elif (PO_FX_VERSION == PO_FX_VERSION_V3) +typedef PO_FX_COMPONENT_V2 PO_FX_COMPONENT, *PPO_FX_COMPONENT; +typedef PO_FX_DEVICE_V3 PO_FX_DEVICE, *PPO_FX_DEVICE; +#else +#error PO_FX_VERSION undefined! +#endif + +#endif // NTDDI_WIN8 + $endif (_WDMDDK_) $if (_NTIFS_) @@ -423,4 +696,3 @@ $if (_NTIFS_) #define PO_CB_LID_SWITCH_STATE 4 #define PO_CB_PROCESSOR_POWER_POLICY 5 $endif (_NTIFS_) -
4 years, 3 months
1
0
0
0
[reactos] 01/01: [XDK][NTOSKRNL_VISTA] Put NTKRNLVISTAAPI to XDK headers for vista+ APIs implemented in ntoskrnl_vista. Now if you statically link ntoskrnl_vista into a driver, NTKERNELAPI will automatically be removed from an API definition
by Victor Perevertkin
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=be276dde282c2f14a9e73…
commit be276dde282c2f14a9e73e6ae65889062bd02af9 Author: Victor Perevertkin <victor.perevertkin(a)reactos.org> AuthorDate: Thu Sep 24 21:51:57 2020 +0300 Commit: Victor Perevertkin <victor.perevertkin(a)reactos.org> CommitDate: Thu Sep 24 21:51:57 2020 +0300 [XDK][NTOSKRNL_VISTA] Put NTKRNLVISTAAPI to XDK headers for vista+ APIs implemented in ntoskrnl_vista. Now if you statically link ntoskrnl_vista into a driver, NTKERNELAPI will automatically be removed from an API definition --- sdk/include/xdk/iofuncs.h | 12 ++++++------ sdk/include/xdk/kefuncs.h | 10 +++++----- sdk/include/xdk/pofuncs.h | 6 +++--- sdk/include/xdk/wdm.template.h | 7 +++++++ sdk/include/xdk/wmifuncs.h | 6 +++--- sdk/lib/drivers/ntoskrnl_vista/CMakeLists.txt | 2 ++ sdk/lib/drivers/ntoskrnl_vista/etw.c | 6 +++--- sdk/lib/drivers/ntoskrnl_vista/io.c | 12 ++++++------ sdk/lib/drivers/ntoskrnl_vista/ke.c | 8 ++++---- sdk/lib/drivers/ntoskrnl_vista/po.c | 6 +++--- 10 files changed, 42 insertions(+), 33 deletions(-) diff --git a/sdk/include/xdk/iofuncs.h b/sdk/include/xdk/iofuncs.h index 271455eca81..ec364576e4f 100644 --- a/sdk/include/xdk/iofuncs.h +++ b/sdk/include/xdk/iofuncs.h @@ -2348,7 +2348,7 @@ IoUninitializeWorkItem( _Inout_ PIO_WORKITEM IoWorkItem); _IRQL_requires_max_(DISPATCH_LEVEL) -// NTKERNELAPI // HACK: ntoskrnl_vista functions are statically linked thus don't need DECLSPEC_IMPORT +NTKRNLVISTAAPI VOID NTAPI IoQueueWorkItemEx( @@ -2357,7 +2357,7 @@ IoQueueWorkItemEx( _In_ WORK_QUEUE_TYPE QueueType, _In_opt_ __drv_aliasesMem PVOID Context); -// NTKERNELAPI // HACK: ntoskrnl_vista functions are statically linked thus don't need DECLSPEC_IMPORT +NTKRNLVISTAAPI IO_PRIORITY_HINT NTAPI IoGetIoPriorityHint( @@ -2416,7 +2416,7 @@ IoSetDevicePropertyData( _IRQL_requires_max_(PASSIVE_LEVEL) _Must_inspect_result_ -// NTKERNELAPI // HACK: ntoskrnl_vista functions are statically linked thus don't need DECLSPEC_IMPORT +NTKRNLVISTAAPI NTSTATUS NTAPI IoGetDevicePropertyData( @@ -2475,7 +2475,7 @@ NTAPI IoClearIrpExtraCreateParameter( _Inout_ PIRP Irp); -// NTKERNELAPI // HACK: ntoskrnl_vista functions are statically linked thus don't need DECLSPEC_IMPORT +NTKRNLVISTAAPI NTSTATUS NTAPI IoGetIrpExtraCreateParameter( @@ -2602,7 +2602,7 @@ $endif (_NTIFS_) $if (_WDMDDK_) _IRQL_requires_max_(PASSIVE_LEVEL) _Must_inspect_result_ -// NTKERNELAPI // HACK: ntoskrnl_vista functions are statically linked thus don't need DECLSPEC_IMPORT +NTKRNLVISTAAPI NTSTATUS IoSetDeviceInterfacePropertyData( _In_ PUNICODE_STRING SymbolicLinkName, @@ -2629,7 +2629,7 @@ IoGetDeviceInterfacePropertyData ( $endif (_WDMDDK_) $if (_NTDDK_) -// NTKERNELAPI // HACK: ntoskrnl_vista functions are statically linked thus don't need DECLSPEC_IMPORT +NTKRNLVISTAAPI VOID IoSetMasterIrpStatus( _Inout_ PIRP MasterIrp, diff --git a/sdk/include/xdk/kefuncs.h b/sdk/include/xdk/kefuncs.h index 6d459bbe60a..bb8c662b73a 100644 --- a/sdk/include/xdk/kefuncs.h +++ b/sdk/include/xdk/kefuncs.h @@ -1128,7 +1128,7 @@ NTAPI KeRevertToUserAffinityThreadEx( _In_ KAFFINITY Affinity); -NTKERNELAPI +NTKRNLVISTAAPI ULONG NTAPI KeQueryActiveProcessorCount( @@ -1140,7 +1140,7 @@ NTAPI KeQueryMaximumProcessorCount(VOID); $endif (_WDMDDK_) $if (_NTDDK_) -NTKERNELAPI +NTKRNLVISTAAPI ULONG NTAPI KeQueryActiveProcessorCount( @@ -1249,12 +1249,12 @@ NTAPI KeQueryNodeMaximumProcessorCount( _In_ USHORT NodeNumber); -// NTKERNELAPI // HACK: ntoskrnl_vista functions are statically linked thus don't need DECLSPEC_IMPORT +NTKRNLVISTAAPI USHORT NTAPI KeQueryHighestNodeNumber(VOID); -// NTKERNELAPI // HACK: ntoskrnl_vista functions are statically linked thus don't need DECLSPEC_IMPORT +NTKRNLVISTAAPI USHORT NTAPI KeGetCurrentNodeNumber(VOID); @@ -1316,7 +1316,7 @@ KeRevertToUserGroupAffinityThread( _In_ PGROUP_AFFINITY PreviousAffinity); _IRQL_requires_max_(DISPATCH_LEVEL) -// NTKERNELAPI // HACK: ntoskrnl_vista functions are statically linked thus don't need DECLSPEC_IMPORT +NTKRNLVISTAAPI BOOLEAN NTAPI KeSetCoalescableTimer( diff --git a/sdk/include/xdk/pofuncs.h b/sdk/include/xdk/pofuncs.h index 37a0f9e76be..ff73e1b7500 100644 --- a/sdk/include/xdk/pofuncs.h +++ b/sdk/include/xdk/pofuncs.h @@ -112,7 +112,7 @@ PoGetSystemWake( _In_ struct _IRP *Irp); _IRQL_requires_max_(APC_LEVEL) -// NTKERNELAPI // HACK: ntoskrnl_vista functions are statically linked thus don't need DECLSPEC_IMPORT +NTKRNLVISTAAPI NTSTATUS NTAPI PoRegisterPowerSettingCallback( @@ -123,7 +123,7 @@ PoRegisterPowerSettingCallback( _Outptr_opt_ PVOID *Handle); _IRQL_requires_max_(APC_LEVEL) -// NTKERNELAPI // HACK: ntoskrnl_vista functions are statically linked thus don't need DECLSPEC_IMPORT +NTKRNLVISTAAPI NTSTATUS NTAPI PoUnregisterPowerSettingCallback( @@ -154,7 +154,7 @@ PoEndDeviceBusy( _Inout_ PULONG IdlePointer); _IRQL_requires_max_(DISPATCH_LEVEL) -// NTKERNELAPI // HACK: ntoskrnl_vista functions are statically linked thus don't need DECLSPEC_IMPORT +NTKRNLVISTAAPI BOOLEAN NTAPI PoQueryWatchdogTime( diff --git a/sdk/include/xdk/wdm.template.h b/sdk/include/xdk/wdm.template.h index 9893977c092..1623e00a081 100644 --- a/sdk/include/xdk/wdm.template.h +++ b/sdk/include/xdk/wdm.template.h @@ -96,6 +96,13 @@ $define(USHORT=USHORT) #endif #endif +/* for statically-linked ntoskrnl_vista library */ +#if defined(NTKRNLVISTA) +#define NTKRNLVISTAAPI +#else +#define NTKRNLVISTAAPI NTKERNELAPI +#endif + #if defined(_X86_) && !defined(_NTHAL_) #define _DECL_HAL_KE_IMPORT DECLSPEC_IMPORT #elif defined(_X86_) diff --git a/sdk/include/xdk/wmifuncs.h b/sdk/include/xdk/wmifuncs.h index bad09c35e1d..81f6754452b 100644 --- a/sdk/include/xdk/wmifuncs.h +++ b/sdk/include/xdk/wmifuncs.h @@ -69,7 +69,7 @@ WmiQueryTraceInformation( _IRQL_requires_max_(PASSIVE_LEVEL) NTSTATUS -// NTKERNELAPI // HACK: ntoskrnl_vista functions are statically linked thus don't need DECLSPEC_IMPORT +NTKRNLVISTAAPI NTAPI EtwRegister( _In_ LPCGUID ProviderId, @@ -79,7 +79,7 @@ EtwRegister( _IRQL_requires_max_(PASSIVE_LEVEL) NTSTATUS -// NTKERNELAPI // HACK: ntoskrnl_vista functions are statically linked thus don't need DECLSPEC_IMPORT +NTKRNLVISTAAPI NTAPI EtwUnregister( _In_ REGHANDLE RegHandle); @@ -112,7 +112,7 @@ EtwActivityIdControl( _IRQL_requires_max_(HIGH_LEVEL) NTSTATUS -// NTKERNELAPI // HACK: ntoskrnl_vista functions are statically linked thus don't need DECLSPEC_IMPORT +NTKRNLVISTAAPI NTAPI EtwWrite( _In_ REGHANDLE RegHandle, diff --git a/sdk/lib/drivers/ntoskrnl_vista/CMakeLists.txt b/sdk/lib/drivers/ntoskrnl_vista/CMakeLists.txt index 5ce01354762..78658c54bd0 100644 --- a/sdk/lib/drivers/ntoskrnl_vista/CMakeLists.txt +++ b/sdk/lib/drivers/ntoskrnl_vista/CMakeLists.txt @@ -13,3 +13,5 @@ list(APPEND SOURCE add_library(ntoskrnl_vista ${SOURCE}) add_dependencies(ntoskrnl_vista bugcodes xdk) + +target_compile_definitions(ntoskrnl_vista PUBLIC NTKRNLVISTA) diff --git a/sdk/lib/drivers/ntoskrnl_vista/etw.c b/sdk/lib/drivers/ntoskrnl_vista/etw.c index 903b0497297..81f599fb909 100644 --- a/sdk/lib/drivers/ntoskrnl_vista/etw.c +++ b/sdk/lib/drivers/ntoskrnl_vista/etw.c @@ -10,7 +10,7 @@ _IRQL_requires_max_(HIGH_LEVEL) NTSTATUS -NTKERNELAPI +NTKRNLVISTAAPI NTAPI EtwWrite( _In_ REGHANDLE RegHandle, @@ -24,7 +24,7 @@ EtwWrite( _IRQL_requires_max_(PASSIVE_LEVEL) NTSTATUS -NTKERNELAPI +NTKRNLVISTAAPI NTAPI EtwRegister( _In_ LPCGUID ProviderId, @@ -37,7 +37,7 @@ EtwRegister( _IRQL_requires_max_(PASSIVE_LEVEL) NTSTATUS -NTKERNELAPI +NTKRNLVISTAAPI NTAPI EtwUnregister( _In_ REGHANDLE RegHandle) diff --git a/sdk/lib/drivers/ntoskrnl_vista/io.c b/sdk/lib/drivers/ntoskrnl_vista/io.c index 5008f7a981d..c295d63193f 100644 --- a/sdk/lib/drivers/ntoskrnl_vista/io.c +++ b/sdk/lib/drivers/ntoskrnl_vista/io.c @@ -18,7 +18,7 @@ typedef struct _EX_WORKITEM_CONTEXT #define TAG_IOWI 'IWOI' -NTKERNELAPI +NTKRNLVISTAAPI NTSTATUS NTAPI IoGetIrpExtraCreateParameter(IN PIRP Irp, @@ -49,7 +49,7 @@ IopWorkItemExCallback( ExFreePoolWithTag(context, TAG_IOWI); } -NTKERNELAPI +NTKRNLVISTAAPI VOID NTAPI IoQueueWorkItemEx( @@ -68,7 +68,7 @@ IoQueueWorkItemEx( _IRQL_requires_max_(PASSIVE_LEVEL) _Must_inspect_result_ -NTKERNELAPI +NTKRNLVISTAAPI NTSTATUS NTAPI IoGetDevicePropertyData( @@ -86,7 +86,7 @@ IoGetDevicePropertyData( _IRQL_requires_max_(PASSIVE_LEVEL) _Must_inspect_result_ -NTKERNELAPI +NTKRNLVISTAAPI NTSTATUS IoSetDeviceInterfacePropertyData( _In_ PUNICODE_STRING SymbolicLinkName, @@ -100,7 +100,7 @@ IoSetDeviceInterfacePropertyData( return STATUS_NOT_IMPLEMENTED; } -NTKERNELAPI +NTKRNLVISTAAPI IO_PRIORITY_HINT NTAPI IoGetIoPriorityHint( @@ -109,7 +109,7 @@ IoGetIoPriorityHint( return IoPriorityNormal; } -NTKERNELAPI +NTKRNLVISTAAPI VOID IoSetMasterIrpStatus( _Inout_ PIRP MasterIrp, diff --git a/sdk/lib/drivers/ntoskrnl_vista/ke.c b/sdk/lib/drivers/ntoskrnl_vista/ke.c index 2f982659393..0abd392b87e 100644 --- a/sdk/lib/drivers/ntoskrnl_vista/ke.c +++ b/sdk/lib/drivers/ntoskrnl_vista/ke.c @@ -9,7 +9,7 @@ #include <ntdef.h> #include <ntifs.h> -NTKERNELAPI +NTKRNLVISTAAPI ULONG NTAPI KeQueryActiveProcessorCount(OUT PKAFFINITY ActiveProcessors OPTIONAL) @@ -26,7 +26,7 @@ KeQueryActiveProcessorCount(OUT PKAFFINITY ActiveProcessors OPTIONAL) return RtlNumberOfSetBits(&Bitmap); } -NTKERNELAPI +NTKRNLVISTAAPI USHORT NTAPI KeQueryHighestNodeNumber() @@ -34,7 +34,7 @@ KeQueryHighestNodeNumber() return 0; } -NTKERNELAPI +NTKRNLVISTAAPI USHORT NTAPI KeGetCurrentNodeNumber() @@ -43,7 +43,7 @@ KeGetCurrentNodeNumber() } _IRQL_requires_max_(DISPATCH_LEVEL) -NTKERNELAPI +NTKRNLVISTAAPI BOOLEAN NTAPI KeSetCoalescableTimer( diff --git a/sdk/lib/drivers/ntoskrnl_vista/po.c b/sdk/lib/drivers/ntoskrnl_vista/po.c index 22d44bdd892..791a784273a 100644 --- a/sdk/lib/drivers/ntoskrnl_vista/po.c +++ b/sdk/lib/drivers/ntoskrnl_vista/po.c @@ -8,7 +8,7 @@ #include <ntdef.h> #include <ntifs.h> -NTKERNELAPI +NTKRNLVISTAAPI NTSTATUS NTAPI PoRegisterPowerSettingCallback( @@ -22,7 +22,7 @@ PoRegisterPowerSettingCallback( } _IRQL_requires_max_(APC_LEVEL) -NTKERNELAPI +NTKRNLVISTAAPI NTSTATUS NTAPI PoUnregisterPowerSettingCallback( @@ -32,7 +32,7 @@ PoUnregisterPowerSettingCallback( } _IRQL_requires_max_(DISPATCH_LEVEL) -NTKERNELAPI +NTKRNLVISTAAPI BOOLEAN NTAPI PoQueryWatchdogTime(
4 years, 3 months
1
0
0
0
[reactos] 01/01: [PSDK] Fix order and formatting of IOCTL definitions in ntddcdrm.h
by Victor Perevertkin
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=7af229f5b5cd666d0fc6d…
commit 7af229f5b5cd666d0fc6dc520a4de3d0c95240ad Author: Victor Perevertkin <victor.perevertkin(a)reactos.org> AuthorDate: Thu Sep 24 17:44:18 2020 +0300 Commit: Victor Perevertkin <victor.perevertkin(a)reactos.org> CommitDate: Thu Sep 24 17:44:18 2020 +0300 [PSDK] Fix order and formatting of IOCTL definitions in ntddcdrm.h --- sdk/include/psdk/ntddcdrm.h | 114 ++++++++++++++++++++++---------------------- 1 file changed, 56 insertions(+), 58 deletions(-) diff --git a/sdk/include/psdk/ntddcdrm.h b/sdk/include/psdk/ntddcdrm.h index c9fd6dcb82c..6b481acbd6d 100644 --- a/sdk/include/psdk/ntddcdrm.h +++ b/sdk/include/psdk/ntddcdrm.h @@ -31,100 +31,98 @@ extern "C" { #define IOCTL_CDROM_BASE FILE_DEVICE_CD_ROM -#define IOCTL_CDROM_CHECK_VERIFY \ - CTL_CODE(IOCTL_CDROM_BASE, 0x0200, METHOD_BUFFERED, FILE_READ_ACCESS) - -#define IOCTL_CDROM_FIND_NEW_DEVICES \ - CTL_CODE(IOCTL_CDROM_BASE, 0x0206, METHOD_BUFFERED, FILE_READ_ACCESS) - -#define IOCTL_CDROM_GET_CONFIGURATION \ - CTL_CODE(IOCTL_CDROM_BASE, 0x0016, METHOD_BUFFERED, FILE_READ_ACCESS) +#define IOCTL_CDROM_READ_TOC \ + CTL_CODE(IOCTL_CDROM_BASE, 0x0000, METHOD_BUFFERED, FILE_READ_ACCESS) -#define IOCTL_CDROM_GET_CONTROL \ - CTL_CODE(IOCTL_CDROM_BASE, 0x000D, METHOD_BUFFERED, FILE_READ_ACCESS) +#define IOCTL_CDROM_SEEK_AUDIO_MSF \ + CTL_CODE(IOCTL_CDROM_BASE, 0x0001, METHOD_BUFFERED, FILE_READ_ACCESS) -#define IOCTL_CDROM_GET_DRIVE_GEOMETRY \ - CTL_CODE(IOCTL_CDROM_BASE, 0x0013, METHOD_BUFFERED, FILE_READ_ACCESS) +#define IOCTL_CDROM_STOP_AUDIO \ + CTL_CODE(IOCTL_CDROM_BASE, 0x0002, METHOD_BUFFERED, FILE_READ_ACCESS) -#define IOCTL_CDROM_GET_DRIVE_GEOMETRY_EX \ - CTL_CODE(IOCTL_CDROM_BASE, 0x0014, METHOD_BUFFERED, FILE_READ_ACCESS) +#define IOCTL_CDROM_PAUSE_AUDIO \ + CTL_CODE(IOCTL_CDROM_BASE, 0x0003, METHOD_BUFFERED, FILE_READ_ACCESS) -#define IOCTL_CDROM_GET_LAST_SESSION \ - CTL_CODE(IOCTL_CDROM_BASE, 0x000E, METHOD_BUFFERED, FILE_READ_ACCESS) +#define IOCTL_CDROM_RESUME_AUDIO \ + CTL_CODE(IOCTL_CDROM_BASE, 0x0004, METHOD_BUFFERED, FILE_READ_ACCESS) #define IOCTL_CDROM_GET_VOLUME \ CTL_CODE(IOCTL_CDROM_BASE, 0x0005, METHOD_BUFFERED, FILE_READ_ACCESS) -#define IOCTL_CDROM_PAUSE_AUDIO \ - CTL_CODE(IOCTL_CDROM_BASE, 0x0003, METHOD_BUFFERED, FILE_READ_ACCESS) - #define IOCTL_CDROM_PLAY_AUDIO_MSF \ CTL_CODE(IOCTL_CDROM_BASE, 0x0006, METHOD_BUFFERED, FILE_READ_ACCESS) +#define IOCTL_CDROM_SET_VOLUME \ + CTL_CODE(IOCTL_CDROM_BASE, 0x000A, METHOD_BUFFERED, FILE_READ_ACCESS) + +#define IOCTL_CDROM_READ_Q_CHANNEL \ + CTL_CODE(IOCTL_CDROM_BASE, 0x000B, METHOD_BUFFERED, FILE_READ_ACCESS) + +#define IOCTL_CDROM_GET_CONTROL \ + CTL_CODE(IOCTL_CDROM_BASE, 0x000D, METHOD_BUFFERED, FILE_READ_ACCESS) + +#define IOCTL_CDROM_GET_LAST_SESSION \ + CTL_CODE(IOCTL_CDROM_BASE, 0x000E, METHOD_BUFFERED, FILE_READ_ACCESS) + #define IOCTL_CDROM_RAW_READ \ CTL_CODE(IOCTL_CDROM_BASE, 0x000F, METHOD_OUT_DIRECT, FILE_READ_ACCESS) #define IOCTL_CDROM_DISK_TYPE \ CTL_CODE(IOCTL_CDROM_BASE, 0x0010, METHOD_BUFFERED, FILE_ANY_ACCESS) -#define IOCTL_CDROM_READ_Q_CHANNEL \ - CTL_CODE(IOCTL_CDROM_BASE, 0x000B, METHOD_BUFFERED, FILE_READ_ACCESS) +#define IOCTL_CDROM_GET_DRIVE_GEOMETRY \ + CTL_CODE(IOCTL_CDROM_BASE, 0x0013, METHOD_BUFFERED, FILE_READ_ACCESS) -#define IOCTL_CDROM_READ_TOC \ - CTL_CODE(IOCTL_CDROM_BASE, 0x0000, METHOD_BUFFERED, FILE_READ_ACCESS) +#define IOCTL_CDROM_GET_DRIVE_GEOMETRY_EX \ + CTL_CODE(IOCTL_CDROM_BASE, 0x0014, METHOD_BUFFERED, FILE_READ_ACCESS) #define IOCTL_CDROM_READ_TOC_EX \ CTL_CODE(IOCTL_CDROM_BASE, 0x0015, METHOD_BUFFERED, FILE_READ_ACCESS) -#define IOCTL_CDROM_RESUME_AUDIO \ - CTL_CODE(IOCTL_CDROM_BASE, 0x0004, METHOD_BUFFERED, FILE_READ_ACCESS) +#define IOCTL_CDROM_GET_CONFIGURATION \ + CTL_CODE(IOCTL_CDROM_BASE, 0x0016, METHOD_BUFFERED, FILE_READ_ACCESS) -#define IOCTL_CDROM_SEEK_AUDIO_MSF \ - CTL_CODE(IOCTL_CDROM_BASE, 0x0001, METHOD_BUFFERED, FILE_READ_ACCESS) +#define IOCTL_CDROM_EXCLUSIVE_ACCESS \ + CTL_CODE(IOCTL_CDROM_BASE, 0x0017, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS) -#define IOCTL_CDROM_SET_VOLUME \ - CTL_CODE(IOCTL_CDROM_BASE, 0x000A, METHOD_BUFFERED, FILE_READ_ACCESS) +#define IOCTL_CDROM_SET_SPEED \ + CTL_CODE(IOCTL_CDROM_BASE, 0x0018, METHOD_BUFFERED, FILE_READ_ACCESS) -#define IOCTL_CDROM_SIMBAD \ - CTL_CODE(IOCTL_CDROM_BASE, 0x1003, METHOD_BUFFERED, FILE_READ_ACCESS) +#define IOCTL_CDROM_GET_INQUIRY_DATA \ + CTL_CODE(IOCTL_CDROM_BASE, 0x0019, METHOD_BUFFERED, FILE_READ_ACCESS) -#define IOCTL_CDROM_STOP_AUDIO \ - CTL_CODE(IOCTL_CDROM_BASE, 0x0002, METHOD_BUFFERED, FILE_READ_ACCESS) +#define IOCTL_CDROM_ENABLE_STREAMING \ + CTL_CODE(IOCTL_CDROM_BASE, 0x001A, METHOD_BUFFERED, FILE_READ_ACCESS) -#define IOCTL_CDROM_EJECT_MEDIA \ - CTL_CODE(IOCTL_CDROM_BASE, 0x0202, METHOD_BUFFERED, FILE_READ_ACCESS) +#define IOCTL_CDROM_SEND_OPC_INFORMATION \ + CTL_CODE(IOCTL_CDROM_BASE, 0x001B, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS) +#define IOCTL_CDROM_GET_PERFORMANCE \ + CTL_CODE(IOCTL_CDROM_BASE, 0x001C, METHOD_BUFFERED, FILE_READ_ACCESS) -// #define IOCTL_CDROM_GET_LAST_SESSION CTL_CODE(IOCTL_CDROM_BASE, 0x000E, METHOD_BUFFERED, FILE_READ_ACCESS) +#define IOCTL_CDROM_CHECK_VERIFY \ + CTL_CODE(IOCTL_CDROM_BASE, 0x0200, METHOD_BUFFERED, FILE_READ_ACCESS) +#define IOCTL_CDROM_MEDIA_REMOVAL \ + CTL_CODE(IOCTL_CDROM_BASE, 0x0201, METHOD_BUFFERED, FILE_READ_ACCESS) -// #define IOCTL_CDROM_GET_CONFIGURATION CTL_CODE(IOCTL_CDROM_BASE, 0x0016, METHOD_BUFFERED, FILE_READ_ACCESS) +#define IOCTL_CDROM_EJECT_MEDIA \ + CTL_CODE(IOCTL_CDROM_BASE, 0x0202, METHOD_BUFFERED, FILE_READ_ACCESS) -#define IOCTL_CDROM_EXCLUSIVE_ACCESS CTL_CODE(IOCTL_CDROM_BASE, 0x0017, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS) -#define IOCTL_CDROM_SET_SPEED CTL_CODE(IOCTL_CDROM_BASE, 0x0018, METHOD_BUFFERED, FILE_READ_ACCESS) -#define IOCTL_CDROM_GET_INQUIRY_DATA CTL_CODE(IOCTL_CDROM_BASE, 0x0019, METHOD_BUFFERED, FILE_READ_ACCESS) +#define IOCTL_CDROM_LOAD_MEDIA \ + CTL_CODE(IOCTL_CDROM_BASE, 0x0203, METHOD_BUFFERED, FILE_READ_ACCESS) -#define IOCTL_CDROM_ENABLE_STREAMING CTL_CODE(IOCTL_CDROM_BASE, 0x001A, METHOD_BUFFERED, FILE_READ_ACCESS) -#define IOCTL_CDROM_SEND_OPC_INFORMATION CTL_CODE(IOCTL_CDROM_BASE, 0x001B, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS) -#define IOCTL_CDROM_GET_PERFORMANCE CTL_CODE(IOCTL_CDROM_BASE, 0x001C, METHOD_BUFFERED, FILE_READ_ACCESS) +#define IOCTL_CDROM_RESERVE \ + CTL_CODE(IOCTL_CDROM_BASE, 0x0204, METHOD_BUFFERED, FILE_READ_ACCESS) -// end_winioctl +#define IOCTL_CDROM_RELEASE \ + CTL_CODE(IOCTL_CDROM_BASE, 0x0205, METHOD_BUFFERED, FILE_READ_ACCESS) -// -// The following device control codes are common for all class drivers. The -// functions codes defined here must match all of the other class drivers. -// -// Warning: these codes will be replaced in the future with the IOCTL_STORAGE -// codes included below -// +#define IOCTL_CDROM_FIND_NEW_DEVICES \ + CTL_CODE(IOCTL_CDROM_BASE, 0x0206, METHOD_BUFFERED, FILE_READ_ACCESS) -// #define IOCTL_CDROM_CHECK_VERIFY CTL_CODE(IOCTL_CDROM_BASE, 0x0200, METHOD_BUFFERED, FILE_READ_ACCESS) -#define IOCTL_CDROM_MEDIA_REMOVAL CTL_CODE(IOCTL_CDROM_BASE, 0x0201, METHOD_BUFFERED, FILE_READ_ACCESS) -// #define IOCTL_CDROM_EJECT_MEDIA CTL_CODE(IOCTL_CDROM_BASE, 0x0202, METHOD_BUFFERED, FILE_READ_ACCESS) -#define IOCTL_CDROM_LOAD_MEDIA CTL_CODE(IOCTL_CDROM_BASE, 0x0203, METHOD_BUFFERED, FILE_READ_ACCESS) -#define IOCTL_CDROM_RESERVE CTL_CODE(IOCTL_CDROM_BASE, 0x0204, METHOD_BUFFERED, FILE_READ_ACCESS) -#define IOCTL_CDROM_RELEASE CTL_CODE(IOCTL_CDROM_BASE, 0x0205, METHOD_BUFFERED, FILE_READ_ACCESS) -// #define IOCTL_CDROM_FIND_NEW_DEVICES CTL_CODE(IOCTL_CDROM_BASE, 0x0206, METHOD_BUFFERED, FILE_READ_ACCESS) +#define IOCTL_CDROM_SIMBAD \ + CTL_CODE(IOCTL_CDROM_BASE, 0x1003, METHOD_BUFFERED, FILE_READ_ACCESS) #define MINIMUM_CDROM_INQUIRY_SIZE 36 // RTL_SIZEOF_THROUGH_FIELD(INQUIRYDATA, ProductRevisionLevel)
4 years, 3 months
1
0
0
0
[reactos] 01/01: [PSDK] Add definitions required for newer storage class drivers (cdrom)
by Victor Perevertkin
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=99489553fcaba00f30fb1…
commit 99489553fcaba00f30fb1c2f531490084607dc06 Author: Victor Perevertkin <victor.perevertkin(a)reactos.org> AuthorDate: Thu Sep 24 17:31:15 2020 +0300 Commit: Victor Perevertkin <victor.perevertkin(a)reactos.org> CommitDate: Thu Sep 24 17:31:15 2020 +0300 [PSDK] Add definitions required for newer storage class drivers (cdrom) CORE-17129 --- sdk/include/psdk/devpkey.h | 1 + sdk/include/psdk/driverspecs.h | 4 +- sdk/include/psdk/ntddcdrm.h | 243 ++++++++++++++++++++++++++++++++++-- sdk/include/psdk/ntddcdvd.h | 186 ++++++++++++++++++++++----- sdk/include/psdk/ntddmmc.h | 4 +- sdk/include/psdk/ntddstor.h | 33 ++++- sdk/include/psdk/ntddvol.h | 30 ++--- sdk/include/psdk/sal.h | 116 ++++++++--------- sdk/include/psdk/specstrings.h | 7 ++ sdk/include/psdk/winapifamily.h | 71 +++++++++++ sdk/include/psdk/winpackagefamily.h | 56 +++++++++ 11 files changed, 633 insertions(+), 118 deletions(-) diff --git a/sdk/include/psdk/devpkey.h b/sdk/include/psdk/devpkey.h index a908dfdebf2..97b96d935c0 100644 --- a/sdk/include/psdk/devpkey.h +++ b/sdk/include/psdk/devpkey.h @@ -57,6 +57,7 @@ DEFINE_DEVPROPKEY(DEVPKEY_Device_InstallState, 0xa45c254e,0xdf1c,0x4efd,0x80,0x2 DEFINE_DEVPROPKEY(DEVPKEY_Device_LocationPaths, 0xa45c254e,0xdf1c,0x4efd,0x80,0x20,0x67,0xd1,0x46,0xa8,0x50,0xe0, 37); DEFINE_DEVPROPKEY(DEVPKEY_Device_BaseContainerId, 0xa45c254e,0xdf1c,0x4efd,0x80,0x20,0x67,0xd1,0x46,0xa8,0x50,0xe0, 38); DEFINE_DEVPROPKEY(DEVPKEY_Device_InLocalMachineContainer, 0x8c7ed206, 0x3f8a, 0x4827, 0xb3, 0xab, 0xae, 0x9e, 0x1f, 0xae, 0xfc, 0x6c, 4); +DEFINE_DEVPROPKEY(DEVPKEY_Device_SessionId, 0x83da6326,0x97a6,0x4088,0x94,0x53,0xa1,0x92,0x3f,0x57,0x3b,0x29, 6); DEFINE_DEVPROPKEY(DEVPKEY_DeviceInterface_FriendlyName, 0x026e516e,0x8b14,0x414b,0x83,0xcd,0x85,0x6d,0x6f,0xef,0x48,0x22, 2); DEFINE_DEVPROPKEY(DEVPKEY_DeviceInterface_Enabled, 0x026e516e,0x8b14,0x414b,0x83,0xcd,0x85,0x6d,0x6f,0xef,0x48,0x22, 3); diff --git a/sdk/include/psdk/driverspecs.h b/sdk/include/psdk/driverspecs.h index 56f276596d4..a15fb26e1e4 100644 --- a/sdk/include/psdk/driverspecs.h +++ b/sdk/include/psdk/driverspecs.h @@ -124,7 +124,7 @@ #define __drv_ret(annotes) #define __drv_sameIRQL #define __drv_savesIRQL -#define __drv_savesIRQLGlobal +#define __drv_savesIRQLGlobal(kind,param) #define __drv_strictType(typename,mode) #define __drv_strictTypeMatch(mode) #define __drv_unit(p) @@ -306,7 +306,7 @@ __ANNOTATION(SAL_callbackType(__In_impl_ __AuToQuOtE char *);) #define __drv_ret(annotes) #define __drv_sameIRQL #define __drv_savesIRQL -#define __drv_savesIRQLGlobal +#define __drv_savesIRQLGlobal(kind,param) #define __drv_setsIRQL(irql) #define __drv_strictType(typename,mode) #define __drv_strictTypeMatch(mode) diff --git a/sdk/include/psdk/ntddcdrm.h b/sdk/include/psdk/ntddcdrm.h index ce6766299a3..c9fd6dcb82c 100644 --- a/sdk/include/psdk/ntddcdrm.h +++ b/sdk/include/psdk/ntddcdrm.h @@ -95,6 +95,41 @@ extern "C" { CTL_CODE(IOCTL_CDROM_BASE, 0x0202, METHOD_BUFFERED, FILE_READ_ACCESS) +// #define IOCTL_CDROM_GET_LAST_SESSION CTL_CODE(IOCTL_CDROM_BASE, 0x000E, METHOD_BUFFERED, FILE_READ_ACCESS) + + +// #define IOCTL_CDROM_GET_CONFIGURATION CTL_CODE(IOCTL_CDROM_BASE, 0x0016, METHOD_BUFFERED, FILE_READ_ACCESS) + +#define IOCTL_CDROM_EXCLUSIVE_ACCESS CTL_CODE(IOCTL_CDROM_BASE, 0x0017, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS) +#define IOCTL_CDROM_SET_SPEED CTL_CODE(IOCTL_CDROM_BASE, 0x0018, METHOD_BUFFERED, FILE_READ_ACCESS) +#define IOCTL_CDROM_GET_INQUIRY_DATA CTL_CODE(IOCTL_CDROM_BASE, 0x0019, METHOD_BUFFERED, FILE_READ_ACCESS) + +#define IOCTL_CDROM_ENABLE_STREAMING CTL_CODE(IOCTL_CDROM_BASE, 0x001A, METHOD_BUFFERED, FILE_READ_ACCESS) +#define IOCTL_CDROM_SEND_OPC_INFORMATION CTL_CODE(IOCTL_CDROM_BASE, 0x001B, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS) +#define IOCTL_CDROM_GET_PERFORMANCE CTL_CODE(IOCTL_CDROM_BASE, 0x001C, METHOD_BUFFERED, FILE_READ_ACCESS) + +// end_winioctl + +// +// The following device control codes are common for all class drivers. The +// functions codes defined here must match all of the other class drivers. +// +// Warning: these codes will be replaced in the future with the IOCTL_STORAGE +// codes included below +// + +// #define IOCTL_CDROM_CHECK_VERIFY CTL_CODE(IOCTL_CDROM_BASE, 0x0200, METHOD_BUFFERED, FILE_READ_ACCESS) +#define IOCTL_CDROM_MEDIA_REMOVAL CTL_CODE(IOCTL_CDROM_BASE, 0x0201, METHOD_BUFFERED, FILE_READ_ACCESS) +// #define IOCTL_CDROM_EJECT_MEDIA CTL_CODE(IOCTL_CDROM_BASE, 0x0202, METHOD_BUFFERED, FILE_READ_ACCESS) +#define IOCTL_CDROM_LOAD_MEDIA CTL_CODE(IOCTL_CDROM_BASE, 0x0203, METHOD_BUFFERED, FILE_READ_ACCESS) +#define IOCTL_CDROM_RESERVE CTL_CODE(IOCTL_CDROM_BASE, 0x0204, METHOD_BUFFERED, FILE_READ_ACCESS) +#define IOCTL_CDROM_RELEASE CTL_CODE(IOCTL_CDROM_BASE, 0x0205, METHOD_BUFFERED, FILE_READ_ACCESS) +// #define IOCTL_CDROM_FIND_NEW_DEVICES CTL_CODE(IOCTL_CDROM_BASE, 0x0206, METHOD_BUFFERED, FILE_READ_ACCESS) + + +#define MINIMUM_CDROM_INQUIRY_SIZE 36 // RTL_SIZEOF_THROUGH_FIELD(INQUIRYDATA, ProductRevisionLevel) +#define MAXIMUM_CDROM_INQUIRY_SIZE 260 // MAXUCHAR + RTL_SIZEOF_THROUGH_FIELD(INQUIRYDATA, AdditionalLength) + #define MAXIMUM_NUMBER_TRACKS 100 #define MAXIMUM_CDROM_SIZE 804 #define MINIMUM_CDROM_READ_TOC_EX_SIZE 2 @@ -334,8 +369,8 @@ typedef union _SUB_Q_CHANNEL_DATA { #define TWO_FOUR_CHANNEL_AUDIO 0x8 typedef struct _CDROM_AUDIO_CONTROL { - UCHAR LbaFormat; - USHORT LogicalBlocksPerSecond; + UCHAR LbaFormat; + USHORT LogicalBlocksPerSecond; } CDROM_AUDIO_CONTROL, *PCDROM_AUDIO_CONTROL; typedef struct _VOLUME_CONTROL { @@ -343,17 +378,209 @@ typedef struct _VOLUME_CONTROL { } VOLUME_CONTROL, *PVOLUME_CONTROL; typedef enum _TRACK_MODE_TYPE { - YellowMode2, - XAForm2, - CDDA + YellowMode2, + XAForm2, + CDDA, + RawWithC2AndSubCode, + RawWithC2, + RawWithSubCode } TRACK_MODE_TYPE, *PTRACK_MODE_TYPE; +#define CD_RAW_READ_C2_SIZE ( 296 ) +#define CD_RAW_READ_SUBCODE_SIZE ( 96) +#define CD_RAW_SECTOR_WITH_C2_SIZE (2352+296 ) +#define CD_RAW_SECTOR_WITH_SUBCODE_SIZE (2352 +96) +#define CD_RAW_SECTOR_WITH_C2_AND_SUBCODE_SIZE (2352+296+96) + typedef struct __RAW_READ_INFO { - LARGE_INTEGER DiskOffset; - ULONG SectorCount; - TRACK_MODE_TYPE TrackMode; + LARGE_INTEGER DiskOffset; + ULONG SectorCount; + TRACK_MODE_TYPE TrackMode; } RAW_READ_INFO, *PRAW_READ_INFO; + +// for IOCTL_CDROM_EXCLUSIVE_ACCESS + +#define CDROM_EXCLUSIVE_CALLER_LENGTH 64 + +#define CDROM_LOCK_IGNORE_VOLUME (1 << 0) +#define CDROM_NO_MEDIA_NOTIFICATIONS (1 << 1) + +#define CDROM_NOT_IN_EXCLUSIVE_MODE 0 +#define CDROM_IN_EXCLUSIVE_MODE 1 + +typedef enum _EXCLUSIVE_ACCESS_REQUEST_TYPE +{ + ExclusiveAccessQueryState, + ExclusiveAccessLockDevice, + ExclusiveAccessUnlockDevice +} EXCLUSIVE_ACCESS_REQUEST_TYPE, *PEXCLUSIVE_ACCESS_REQUEST_TYPE; + +typedef struct _CDROM_EXCLUSIVE_ACCESS +{ + EXCLUSIVE_ACCESS_REQUEST_TYPE RequestType; + ULONG Flags; +} CDROM_EXCLUSIVE_ACCESS, *PCDROM_EXCLUSIVE_ACCESS; + +typedef struct _CDROM_EXCLUSIVE_LOCK +{ + CDROM_EXCLUSIVE_ACCESS Access; + UCHAR CallerName[CDROM_EXCLUSIVE_CALLER_LENGTH]; +} CDROM_EXCLUSIVE_LOCK, *PCDROM_EXCLUSIVE_LOCK; + +typedef struct _CDROM_EXCLUSIVE_LOCK_STATE +{ + BOOLEAN LockState; + UCHAR CallerName[CDROM_EXCLUSIVE_CALLER_LENGTH]; +} CDROM_EXCLUSIVE_LOCK_STATE, *PCDROM_EXCLUSIVE_LOCK_STATE; + + +// for IOCTL_CDROM_SET_SPEED + +typedef enum _CDROM_SPEED_REQUEST +{ + CdromSetSpeed, + CdromSetStreaming +} CDROM_SPEED_REQUEST, *PCDROM_SPEED_REQUEST; + +typedef enum _WRITE_ROTATION +{ + CdromDefaultRotation, + CdromCAVRotation +} WRITE_ROTATION, *PWRITE_ROTATION; + +typedef struct _CDROM_SET_SPEED +{ + CDROM_SPEED_REQUEST RequestType; + USHORT ReadSpeed; + USHORT WriteSpeed; + WRITE_ROTATION RotationControl; +} CDROM_SET_SPEED, *PCDROM_SET_SPEED; + +typedef struct _CDROM_SET_STREAMING +{ + CDROM_SPEED_REQUEST RequestType; + ULONG ReadSize; + ULONG ReadTime; + ULONG WriteSize; + ULONG WriteTime; + ULONG StartLba; + ULONG EndLba; + WRITE_ROTATION RotationControl; + BOOLEAN RestoreDefaults; + BOOLEAN SetExact; + BOOLEAN RandomAccess; + BOOLEAN Persistent; +} CDROM_SET_STREAMING, *PCDROM_SET_STREAMING; + + +// for IOCTL_CDROM_ENABLE_STREAMING + +typedef enum _STREAMING_CONTROL_REQUEST_TYPE +{ + CdromStreamingDisable = 1, + CdromStreamingEnableForReadOnly = 2, + CdromStreamingEnableForWriteOnly = 3, + CdromStreamingEnableForReadWrite = 4 +} STREAMING_CONTROL_REQUEST_TYPE, *PSTREAMING_CONTROL_REQUEST_TYPE; + +typedef struct _CDROM_STREAMING_CONTROL { + STREAMING_CONTROL_REQUEST_TYPE RequestType; +} CDROM_STREAMING_CONTROL, *PCDROM_STREAMING_CONTROL; + + +// for IOCTL_CDROM_SEND_OPC_INFORMATION + +typedef enum _CDROM_OPC_INFO_TYPE +{ + SimpleOpcInfo = 1 +} CDROM_OPC_INFO_TYPE, *PCDROM_OPC_INFO_TYPE; + +typedef struct _CDROM_SIMPLE_OPC_INFO +{ + CDROM_OPC_INFO_TYPE RequestType; + BOOLEAN Exclude0; + BOOLEAN Exclude1; +} CDROM_SIMPLE_OPC_INFO, *PCDROM_SIMPLE_OPC_INFO; + + +// for IOCTL_CDROM_GET_PERFORMANCE + +typedef enum _CDROM_PERFORMANCE_REQUEST_TYPE +{ + CdromPerformanceRequest = 1, + CdromWriteSpeedRequest = 2 +} CDROM_PERFORMANCE_REQUEST_TYPE, *PCDROM_PERFORMANCE_REQUEST_TYPE; + +typedef enum _CDROM_PERFORMANCE_TYPE +{ + CdromReadPerformance = 1, + CdromWritePerformance = 2 +} CDROM_PERFORMANCE_TYPE, *PCDROM_PERFORMANCE_TYPE; + +typedef enum _CDROM_PERFORMANCE_EXCEPTION_TYPE +{ + CdromNominalPerformance = 1, + CdromEntirePerformanceList = 2, + CdromPerformanceExceptionsOnly = 3 +} CDROM_PERFORMANCE_EXCEPTION_TYPE, *PCDROM_PERFORMANCE_EXCEPTION_TYPE; + +typedef enum _CDROM_PERFORMANCE_TOLERANCE_TYPE +{ + Cdrom10Nominal20Exceptions = 1 +} CDROM_PERFORMANCE_TOLERANCE_TYPE, *PCDROM_PERFORMANCE_TOLERANCE_TYPE; + +typedef struct _CDROM_PERFORMANCE_REQUEST +{ + CDROM_PERFORMANCE_REQUEST_TYPE RequestType; + CDROM_PERFORMANCE_TYPE PerformanceType; + CDROM_PERFORMANCE_EXCEPTION_TYPE Exceptions; + CDROM_PERFORMANCE_TOLERANCE_TYPE Tolerance; + ULONG StaringLba; +} CDROM_PERFORMANCE_REQUEST, *PCDROM_PERFORMANCE_REQUEST; + +typedef struct _CDROM_WRITE_SPEED_REQUEST +{ + CDROM_PERFORMANCE_REQUEST_TYPE RequestType; +} CDROM_WRITE_SPEED_REQUEST, *PCDROM_WRITE_SPEED_REQUEST; + +typedef struct _CDROM_PERFORMANCE_HEADER +{ + UCHAR DataLength[4]; + UCHAR Except:1; + UCHAR Write:1; + UCHAR Reserved1:6; + UCHAR Reserved2[3]; + UCHAR Data[0]; +} CDROM_PERFORMANCE_HEADER, *PCDROM_PERFORMANCE_HEADER; + +typedef struct _CDROM_NOMINAL_PERFORMANCE_DESCRIPTOR +{ + UCHAR StartLba[4]; + UCHAR StartPerformance[4]; + UCHAR EndLba[4]; + UCHAR EndPerformance[4]; +} CDROM_NOMINAL_PERFORMANCE_DESCRIPTOR, *PCDROM_NOMINAL_PERFORMANCE_DESCRIPTOR; + +typedef struct _CDROM_EXCEPTION_PERFORMANCE_DESCRIPTOR +{ + UCHAR Lba[4]; + UCHAR Time[2]; +} CDROM_EXCEPTION_PERFORMANCE_DESCRIPTOR, *PCDROM_EXCEPTION_PERFORMANCE_DESCRIPTOR; + +typedef struct _CDROM_WRITE_SPEED_DESCRIPTOR +{ + UCHAR MixedReadWrite:1; + UCHAR Exact:1; + UCHAR Reserved1:1; + UCHAR WriteRotationControl:2; + UCHAR Reserved2:3; + UCHAR Reserved3[3]; + UCHAR EndLba[4]; + UCHAR ReadSpeed[4]; + UCHAR WriteSpeed[4]; +} CDROM_WRITE_SPEED_DESCRIPTOR, *PCDROM_WRITE_SPEED_DESCRIPTOR; + #ifdef __cplusplus } #endif diff --git a/sdk/include/psdk/ntddcdvd.h b/sdk/include/psdk/ntddcdvd.h index c07164de633..3026e199b48 100644 --- a/sdk/include/psdk/ntddcdvd.h +++ b/sdk/include/psdk/ntddcdvd.h @@ -34,36 +34,75 @@ extern "C" { #define IOCTL_STORAGE_SET_READ_AHEAD \ CTL_CODE(IOCTL_STORAGE_BASE, 0x0100, METHOD_BUFFERED, FILE_READ_ACCESS) +#define IOCTL_DVD_START_SESSION \ + CTL_CODE(IOCTL_DVD_BASE, 0x0400, METHOD_BUFFERED, FILE_READ_ACCESS) + +#define IOCTL_DVD_READ_KEY \ + CTL_CODE(IOCTL_DVD_BASE, 0x0401, METHOD_BUFFERED, FILE_READ_ACCESS) + +#define IOCTL_DVD_SEND_KEY \ + CTL_CODE(IOCTL_DVD_BASE, 0x0402, METHOD_BUFFERED, FILE_READ_ACCESS) + #define IOCTL_DVD_END_SESSION \ CTL_CODE(IOCTL_DVD_BASE, 0x0403, METHOD_BUFFERED, FILE_READ_ACCESS) +#define IOCTL_DVD_SET_READ_AHEAD \ + CTL_CODE(IOCTL_DVD_BASE, 0x0404, METHOD_BUFFERED, FILE_READ_ACCESS) + #define IOCTL_DVD_GET_REGION \ CTL_CODE(IOCTL_DVD_BASE, 0x0405, METHOD_BUFFERED, FILE_READ_ACCESS) #define IOCTL_DVD_SEND_KEY2 \ CTL_CODE(IOCTL_DVD_BASE, 0x0406, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS) -#define IOCTL_DVD_READ_KEY \ - CTL_CODE(IOCTL_DVD_BASE, 0x0401, METHOD_BUFFERED, FILE_READ_ACCESS) +#define IOCTL_AACS_READ_MEDIA_KEY_BLOCK_SIZE \ + CTL_CODE(IOCTL_DVD_BASE, 0x430, METHOD_BUFFERED, FILE_READ_ACCESS) -#define IOCTL_DVD_READ_STRUCTURE \ - CTL_CODE(IOCTL_DVD_BASE, 0x0450, METHOD_BUFFERED, FILE_READ_ACCESS) +#define IOCTL_AACS_READ_MEDIA_KEY_BLOCK \ + CTL_CODE(IOCTL_DVD_BASE, 0x431, METHOD_BUFFERED, FILE_READ_ACCESS) -#define IOCTL_DVD_SEND_KEY \ - CTL_CODE(IOCTL_DVD_BASE, 0x0402, METHOD_BUFFERED, FILE_READ_ACCESS) +#define IOCTL_AACS_START_SESSION \ + CTL_CODE(IOCTL_DVD_BASE, 0x432, METHOD_BUFFERED, FILE_READ_ACCESS) -#define IOCTL_DVD_START_SESSION \ - CTL_CODE(IOCTL_DVD_BASE, 0x0400, METHOD_BUFFERED, FILE_READ_ACCESS) +#define IOCTL_AACS_END_SESSION \ + CTL_CODE(IOCTL_DVD_BASE, 0x433, METHOD_BUFFERED, FILE_READ_ACCESS) -#define IOCTL_DVD_SET_READ_AHEAD \ - CTL_CODE(IOCTL_DVD_BASE, 0x0404, METHOD_BUFFERED, FILE_READ_ACCESS) +#define IOCTL_AACS_SEND_CERTIFICATE \ + CTL_CODE(IOCTL_DVD_BASE, 0x434, METHOD_BUFFERED, FILE_READ_ACCESS) + +#define IOCTL_AACS_GET_CERTIFICATE \ + CTL_CODE(IOCTL_DVD_BASE, 0x435, METHOD_BUFFERED, FILE_READ_ACCESS) + +#define IOCTL_AACS_GET_CHALLENGE_KEY \ + CTL_CODE(IOCTL_DVD_BASE, 0x436, METHOD_BUFFERED, FILE_READ_ACCESS) + +#define IOCTL_AACS_SEND_CHALLENGE_KEY \ + CTL_CODE(IOCTL_DVD_BASE, 0x437, METHOD_BUFFERED, FILE_READ_ACCESS) + +#define IOCTL_AACS_READ_VOLUME_ID \ + CTL_CODE(IOCTL_DVD_BASE, 0x438, METHOD_BUFFERED, FILE_READ_ACCESS) + +#define IOCTL_AACS_READ_SERIAL_NUMBER \ + CTL_CODE(IOCTL_DVD_BASE, 0x439, METHOD_BUFFERED, FILE_READ_ACCESS) + +#define IOCTL_AACS_READ_MEDIA_ID \ + CTL_CODE(IOCTL_DVD_BASE, 0x43A, METHOD_BUFFERED, FILE_READ_ACCESS) + +#define IOCTL_AACS_READ_BINDING_NONCE \ + CTL_CODE(IOCTL_DVD_BASE, 0x43B, METHOD_BUFFERED, FILE_READ_ACCESS) + +#define IOCTL_AACS_GENERATE_BINDING_NONCE \ + CTL_CODE(IOCTL_DVD_BASE, 0x43C, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS) + +#define IOCTL_DVD_READ_STRUCTURE \ + CTL_CODE(IOCTL_DVD_BASE, 0x0450, METHOD_BUFFERED, FILE_READ_ACCESS) typedef ULONG DVD_SESSION_ID, *PDVD_SESSION_ID; typedef struct _STORAGE_SET_READ_AHEAD { - LARGE_INTEGER TriggerAddress; - LARGE_INTEGER TargetAddress; + LARGE_INTEGER TriggerAddress; + LARGE_INTEGER TargetAddress; } STORAGE_SET_READ_AHEAD, *PSTORAGE_SET_READ_AHEAD; typedef enum DVD_STRUCTURE_FORMAT { @@ -122,27 +161,27 @@ typedef struct _DVD_DISK_KEY_DESCRIPTOR { } DVD_DISK_KEY_DESCRIPTOR, *PDVD_DISK_KEY_DESCRIPTOR; typedef enum _DVD_KEY_TYPE { - DvdChallengeKey = 0x01, - DvdBusKey1, - DvdBusKey2, - DvdTitleKey, - DvdAsf, - DvdSetRpcKey = 0x6, - DvdGetRpcKey = 0x8, - DvdDiskKey = 0x80, - DvdInvalidateAGID = 0x3f + DvdChallengeKey = 0x01, + DvdBusKey1, + DvdBusKey2, + DvdTitleKey, + DvdAsf, + DvdSetRpcKey = 0x6, + DvdGetRpcKey = 0x8, + DvdDiskKey = 0x80, + DvdInvalidateAGID = 0x3f } DVD_KEY_TYPE; typedef struct _DVD_COPY_PROTECT_KEY { - ULONG KeyLength; - DVD_SESSION_ID SessionId; - DVD_KEY_TYPE KeyType; - ULONG KeyFlags; - union { - HANDLE FileHandle; - LARGE_INTEGER TitleOffset; - } Parameters; - UCHAR KeyData[0]; + ULONG KeyLength; + DVD_SESSION_ID SessionId; + DVD_KEY_TYPE KeyType; + ULONG KeyFlags; + union { + HANDLE FileHandle; + LARGE_INTEGER TitleOffset; + } Parameters; + UCHAR KeyData[0]; } DVD_COPY_PROTECT_KEY, *PDVD_COPY_PROTECT_KEY; #define DVD_CHALLENGE_KEY_LENGTH (12 + sizeof(DVD_COPY_PROTECT_KEY)) @@ -201,14 +240,93 @@ typedef struct _DVD_ASF { } DVD_ASF, *PDVD_ASF; typedef struct _DVD_REGION { - UCHAR CopySystem; - UCHAR RegionData; - UCHAR SystemRegion; - UCHAR ResetCount; + UCHAR CopySystem; + UCHAR RegionData; + UCHAR SystemRegion; + UCHAR ResetCount; } DVD_REGION, *PDVD_REGION; #ifdef __cplusplus } #endif +// for IOCTLS_AACS_* + +typedef _Field_range_(0,255) ULONG AACS_LAYER_NUMBER, *PAACS_LAYER_NUMBER; +typedef _Field_range_(0,255) const ULONG CAACS_LAYER_NUMBER, *PCAACS_LAYER_NUMBER; + +typedef struct _AACS_CERTIFICATE +{ + UCHAR Nonce[20]; + UCHAR Certificate[92]; +} AACS_CERTIFICATE, *PAACS_CERTIFICATE; +typedef const AACS_CERTIFICATE CAACS_CERTIFICATE, *PCAACS_CERTIFICATE; +C_ASSERT(sizeof(AACS_CERTIFICATE) == 112); + +typedef struct _AACS_CHALLENGE_KEY +{ + UCHAR EllipticCurvePoint[40]; + UCHAR Signature[40]; +} AACS_CHALLENGE_KEY, *PAACS_CHALLENGE_KEY; +typedef const AACS_CHALLENGE_KEY CAACS_CHALLENGE_KEY, *PCAACS_CHALLENGE_KEY; +C_ASSERT(sizeof(AACS_CHALLENGE_KEY) == 80); + +typedef struct _AACS_VOLUME_ID +{ + UCHAR VolumeID[16]; + UCHAR MAC[16]; +} AACS_VOLUME_ID, *PAACS_VOLUME_ID; +typedef const AACS_VOLUME_ID CAACS_VOLUME_ID, *PCAACS_VOLUME_ID; +C_ASSERT(sizeof(AACS_VOLUME_ID) == 32); + +typedef struct _AACS_SERIAL_NUMBER +{ + UCHAR PrerecordedSerialNumber[16]; + UCHAR MAC[16]; +} AACS_SERIAL_NUMBER, *PAACS_SERIAL_NUMBER; +typedef const AACS_SERIAL_NUMBER CAACS_SERIAL_NUMBER, *PCAACS_SERIAL_NUMBER; +C_ASSERT(sizeof(AACS_SERIAL_NUMBER) == 32); + +typedef struct _AACS_MEDIA_ID +{ + UCHAR MediaID[16]; + UCHAR MAC[16]; +} AACS_MEDIA_ID, *PAACS_MEDIA_ID; +typedef const AACS_MEDIA_ID CAACS_MEDIA_ID, *PCAACS_MEDIA_ID; +C_ASSERT(sizeof(AACS_MEDIA_ID) == 32); + +typedef struct _AACS_SEND_CERTIFICATE +{ + DVD_SESSION_ID SessionId; + AACS_CERTIFICATE Certificate; +} AACS_SEND_CERTIFICATE, *PAACS_SEND_CERTIFICATE; +typedef const AACS_SEND_CERTIFICATE CAACS_SEND_CERTIFICATE, *PCAACS_SEND_CERTIFICATE; + +typedef struct _AACS_SEND_CHALLENGE_KEY +{ + DVD_SESSION_ID SessionId; + AACS_CHALLENGE_KEY ChallengeKey; +} AACS_SEND_CHALLENGE_KEY, *PAACS_SEND_CHALLENGE_KEY; +typedef const AACS_SEND_CHALLENGE_KEY CAACS_SEND_CHALLENGE_KEY, *PCAACS_SEND_CHALLENGE_KEY; + +typedef struct _AACS_BINDING_NONCE +{ + UCHAR BindingNonce[16]; + UCHAR MAC[16]; +} AACS_BINDING_NONCE, *PAACS_BINDING_NONCE; +typedef const AACS_BINDING_NONCE CAACS_BINDING_NONCE, *PCAACS_BINDING_NONCE; +C_ASSERT(sizeof(AACS_BINDING_NONCE) == 32); + +typedef struct _AACS_READ_BINDING_NONCE +{ + DVD_SESSION_ID SessionId; + _Field_range_(0,255) ULONG NumberOfSectors; + ULONGLONG StartLba; + union + { + HANDLE Handle; + ULONGLONG ForceStructureLengthToMatch64bit; + }; +} AACS_READ_BINDING_NONCE, *PAACS_READ_BINDING_NONCE; + #endif /* _NTDDCDVD_ */ diff --git a/sdk/include/psdk/ntddmmc.h b/sdk/include/psdk/ntddmmc.h index f98368af13f..bb1c672a104 100644 --- a/sdk/include/psdk/ntddmmc.h +++ b/sdk/include/psdk/ntddmmc.h @@ -162,10 +162,10 @@ typedef struct _FEATURE_DATA_MORPHING { typedef struct _FEATURE_DATA_REMOVABLE_MEDIUM { FEATURE_HEADER Header; UCHAR Lockable:1; - UCHAR Reserved1:1; + UCHAR DBML:1; UCHAR DefaultToPrevent:1; UCHAR Eject:1; - UCHAR Reserved2:1; + UCHAR Load:1; UCHAR LoadingMechanism:3; UCHAR Reserved3[3]; } FEATURE_DATA_REMOVABLE_MEDIUM, *PFEATURE_DATA_REMOVABLE_MEDIUM; diff --git a/sdk/include/psdk/ntddstor.h b/sdk/include/psdk/ntddstor.h index c17954c6889..356e0b70a8b 100644 --- a/sdk/include/psdk/ntddstor.h +++ b/sdk/include/psdk/ntddstor.h @@ -80,6 +80,17 @@ DEFINE_GUID(GUID_DEVINTERFACE_HIDDEN_VOLUME, #endif /* defined(DEFINE_GUID) */ +#if defined(DEFINE_DEVPROPKEY) +DEFINE_DEVPROPKEY(DEVPKEY_Storage_Portable, 0x4d1ebee8, 0x803, 0x4774, 0x98, 0x42, 0xb7, 0x7d, 0xb5, 0x2, 0x65, 0xe9, 2); +DEFINE_DEVPROPKEY(DEVPKEY_Storage_Removable_Media, 0x4d1ebee8, 0x803, 0x4774, 0x98, 0x42, 0xb7, 0x7d, 0xb5, 0x2, 0x65, 0xe9, 3); +DEFINE_DEVPROPKEY(DEVPKEY_Storage_System_Critical, 0x4d1ebee8, 0x803, 0x4774, 0x98, 0x42, 0xb7, 0x7d, 0xb5, 0x2, 0x65, 0xe9, 4); +DEFINE_DEVPROPKEY(DEVPKEY_Storage_Disk_Number, 0x4d1ebee8, 0x803, 0x4774, 0x98, 0x42, 0xb7, 0x7d, 0xb5, 0x2, 0x65, 0xe9, 5); +DEFINE_DEVPROPKEY(DEVPKEY_Storage_Partition_Number, 0x4d1ebee8, 0x803, 0x4774, 0x98, 0x42, 0xb7, 0x7d, 0xb5, 0x2, 0x65, 0xe9, 6); +DEFINE_DEVPROPKEY(DEVPKEY_Storage_Mbr_Type, 0x4d1ebee8, 0x803, 0x4774, 0x98, 0x42, 0xb7, 0x7d, 0xb5, 0x2, 0x65, 0xe9, 7); +DEFINE_DEVPROPKEY(DEVPKEY_Storage_Gpt_Type, 0x4d1ebee8, 0x803, 0x4774, 0x98, 0x42, 0xb7, 0x7d, 0xb5, 0x2, 0x65, 0xe9, 8); +DEFINE_DEVPROPKEY(DEVPKEY_Storage_Gpt_Name, 0x4d1ebee8, 0x803, 0x4774, 0x98, 0x42, 0xb7, 0x7d, 0xb5, 0x2, 0x65, 0xe9, 9); +#endif + #ifndef _WINIOCTL_ #define IOCTL_STORAGE_BASE FILE_DEVICE_MASS_STORAGE @@ -808,7 +819,7 @@ typedef struct _STORAGE_PRIORITY_HINT_SUPPORT { #pragma warning(disable:4200) #endif -#if defined(_MSC_EXTENSIONS) +// #if defined(_MSC_EXTENSIONS) typedef struct _STORAGE_MEDIA_SERIAL_NUMBER_DATA { USHORT Reserved; @@ -835,7 +846,7 @@ typedef struct _PERSISTENT_RESERVE_COMMAND { } DUMMYUNIONNAME; } PERSISTENT_RESERVE_COMMAND, *PPERSISTENT_RESERVE_COMMAND; -#endif /* defined(_MSC_EXTENSIONS) */ +// #endif /* defined(_MSC_EXTENSIONS) */ #ifdef _MSC_VER #pragma warning(pop) /* disable:4200 */ @@ -1075,6 +1086,24 @@ typedef struct _STORAGE_IDLE_POWER { ULONG D3IdleTimeout; } STORAGE_IDLE_POWER, *PSTORAGE_IDLE_POWER; + +// for IOCTL_STORAGE_GET_IDLE_POWERUP_REASON + +typedef enum _STORAGE_POWERUP_REASON_TYPE { + StoragePowerupUnknown = 0, + StoragePowerupIO, + StoragePowerupDeviceAttention +} STORAGE_POWERUP_REASON_TYPE, *PSTORAGE_POWERUP_REASON_TYPE; + +typedef struct _STORAGE_IDLE_POWERUP_REASON +{ + ULONG Version; + ULONG Size; + STORAGE_POWERUP_REASON_TYPE PowerupReason; +} STORAGE_IDLE_POWERUP_REASON, *PSTORAGE_IDLE_POWERUP_REASON; + +#define STORAGE_IDLE_POWERUP_REASON_VERSION_V1 1 + #ifdef __cplusplus } #endif diff --git a/sdk/include/psdk/ntddvol.h b/sdk/include/psdk/ntddvol.h index 0b14c49af4d..0777b073a13 100644 --- a/sdk/include/psdk/ntddvol.h +++ b/sdk/include/psdk/ntddvol.h @@ -74,6 +74,8 @@ extern "C" { #define IOCTL_VOLUME_QUERY_FAILOVER_SET \ CTL_CODE(IOCTL_VOLUME_BASE, 6, METHOD_BUFFERED, FILE_ANY_ACCESS) +#define IOCTL_VOLUME_POST_ONLINE \ + CTL_CODE(IOCTL_VOLUME_BASE, 25, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS) typedef struct _VOLUME_LOGICAL_OFFSET { LONGLONG LogicalOffset; @@ -100,32 +102,32 @@ typedef struct _VOLUME_GET_GPT_ATTRIBUTES_INFORMATION { } VOLUME_GET_GPT_ATTRIBUTES_INFORMATION, *PVOLUME_GET_GPT_ATTRIBUTES_INFORMATION; typedef struct _VOLUME_SET_GPT_ATTRIBUTES_INFORMATION { - ULONGLONG GptAttributes; - BOOLEAN RevertOnClose; - BOOLEAN ApplyToAllConnectedVolumes; - USHORT Reserved1; - ULONG Reserved2; + ULONGLONG GptAttributes; + BOOLEAN RevertOnClose; + BOOLEAN ApplyToAllConnectedVolumes; + USHORT Reserved1; + ULONG Reserved2; } VOLUME_SET_GPT_ATTRIBUTES_INFORMATION, *PVOLUME_SET_GPT_ATTRIBUTES_INFORMATION; typedef struct _DISK_EXTENT { - ULONG DiskNumber; - LARGE_INTEGER StartingOffset; - LARGE_INTEGER ExtentLength; + ULONG DiskNumber; + LARGE_INTEGER StartingOffset; + LARGE_INTEGER ExtentLength; } DISK_EXTENT, *PDISK_EXTENT; typedef struct _VOLUME_DISK_EXTENTS { - ULONG NumberOfDiskExtents; - DISK_EXTENT Extents[1]; + ULONG NumberOfDiskExtents; + DISK_EXTENT Extents[1]; } VOLUME_DISK_EXTENTS, *PVOLUME_DISK_EXTENTS; typedef struct _VOLUME_NUMBER { - ULONG VolumeNumber; - WCHAR VolumeManagerName[8]; + ULONG VolumeNumber; + WCHAR VolumeManagerName[8]; } VOLUME_NUMBER, *PVOLUME_NUMBER; typedef struct _VOLUME_FAILOVER_SET { - ULONG NumberOfDisks; - ULONG DiskNumbers[1]; + ULONG NumberOfDisks; + ULONG DiskNumbers[1]; } VOLUME_FAILOVER_SET, *PVOLUME_FAILOVER_SET; #ifdef __cplusplus diff --git a/sdk/include/psdk/sal.h b/sdk/include/psdk/sal.h index 2fb7d3a2c8d..6b865345224 100644 --- a/sdk/include/psdk/sal.h +++ b/sdk/include/psdk/sal.h @@ -191,7 +191,7 @@ #else -// Disable expansion of SAL macros in non-Prefast mode to +// Disable expansion of SAL macros in non-Prefast mode to // improve compiler throughput. #ifndef _USE_DECLSPECS_FOR_SAL // [ #define _USE_DECLSPECS_FOR_SAL 0 @@ -436,7 +436,7 @@ enum __SAL_YesNo {_SAL_notpresent, _SAL_no, _SAL_maybe, _SAL_yes, _SAL_default}; #define _Outptr_result_maybenull_z_ _SAL2_Source_(_Outptr_result_maybenull_z_, (), _Out_impl_ _Deref_post_opt_z_) #define _Outptr_opt_result_maybenull_z_ _SAL2_Source_(_Outptr_opt_result_maybenull_z_, (), _Out_opt_impl_ _Deref_post_opt_z_) -// Annotations for _Outptr_ parameters where the output pointer is set to NULL if the function fails. +// Annotations for _Outptr_ parameters where the output pointer is set to NULL if the function fails. #define _Outptr_result_nullonfailure_ _SAL2_Source_(_Outptr_result_nullonfailure_, (), _Outptr_ _On_failure_(_Deref_post_null_)) #define _Outptr_opt_result_nullonfailure_ _SAL2_Source_(_Outptr_opt_result_nullonfailure_, (), _Outptr_opt_ _On_failure_(_Deref_post_null_)) @@ -787,10 +787,10 @@ enum __SAL_YesNo {_SAL_notpresent, _SAL_no, _SAL_maybe, _SAL_yes, _SAL_default}; with _Out_. The default unit is elements. Use 'bytecap' if the size is given in bytes 'count' describes the readable size of the buffer and is typically used with _In_. The default unit is elements. Use 'bytecount' if the size is given in bytes. - + Argument syntax for cap_, bytecap_, count_, bytecount_: (<parameter>|return)[+n] e.g. cch, return, cb+2 - + If the buffer size is a constant expression use the c_ postfix. E.g. cap_c_(20), count_c_(MAX_PATH), bytecount_c_(16) @@ -911,7 +911,7 @@ enum __SAL_YesNo {_SAL_notpresent, _SAL_no, _SAL_maybe, _SAL_yes, _SAL_default}; #define _Out_z_bytecap_post_bytecount_(cap,count) _SAL1_1_Source_(_Out_z_bytecap_post_bytecount_, (cap,count), _Pre_bytecap_(cap) _Post_valid_impl_ _Post_z_bytecount_(count)) #define _Out_opt_z_bytecap_post_bytecount_(cap,count) _SAL1_1_Source_(_Out_opt_z_bytecap_post_bytecount_, (cap,count), _Pre_opt_bytecap_(cap) _Post_valid_impl_ _Post_z_bytecount_(count)) -// only use with dereferenced arguments e.g. '*pcch' +// only use with dereferenced arguments e.g. '*pcch' #define _Out_capcount_(capcount) _SAL1_1_Source_(_Out_capcount_, (capcount), _Pre_cap_(capcount) _Post_valid_impl_ _Post_count_(capcount)) #define _Out_opt_capcount_(capcount) _SAL1_1_Source_(_Out_opt_capcount_, (capcount), _Pre_opt_cap_(capcount) _Post_valid_impl_ _Post_count_(capcount)) #define _Out_bytecapcount_(capcount) _SAL1_1_Source_(_Out_bytecapcount_, (capcount), _Pre_bytecap_(capcount) _Post_valid_impl_ _Post_bytecount_(capcount)) @@ -1080,7 +1080,7 @@ enum __SAL_YesNo {_SAL_notpresent, _SAL_no, _SAL_maybe, _SAL_yes, _SAL_default}; #define _Deref_pre_valid_bytecap_x_(size) _SAL1_1_Source_(_Deref_pre_valid_bytecap_x_, (size), _Deref_pre1_impl_(__notnull_impl_notref) _Deref_pre1_impl_(__bytecap_x_impl(size)) _Pre_valid_impl_) #define _Deref_pre_opt_valid_bytecap_x_(size) _SAL1_1_Source_(_Deref_pre_opt_valid_bytecap_x_, (size), _Deref_pre1_impl_(__maybenull_impl_notref) _Deref_pre1_impl_(__bytecap_x_impl(size)) _Pre_valid_impl_) -// e.g. void SaveMatrix( _In_count_(n) _Deref_pre_count_(n) const Elem** matrix, size_t n ); +// e.g. void SaveMatrix( _In_count_(n) _Deref_pre_count_(n) const Elem** matrix, size_t n ); // valid buffer extent is described by another parameter #define _Deref_pre_count_(size) _SAL1_1_Source_(_Deref_pre_count_, (size), _Deref_pre1_impl_(__notnull_impl_notref) _Deref_pre1_impl_(__count_impl(size)) _Pre_valid_impl_) #define _Deref_pre_opt_count_(size) _SAL1_1_Source_(_Deref_pre_opt_count_, (size), _Deref_pre1_impl_(__maybenull_impl_notref) _Deref_pre1_impl_(__count_impl(size)) _Pre_valid_impl_) @@ -1161,12 +1161,12 @@ enum __SAL_YesNo {_SAL_notpresent, _SAL_no, _SAL_maybe, _SAL_yes, _SAL_default}; #define _Deref_post_opt_valid_cap_(size) _SAL1_1_Source_(_Deref_post_opt_valid_cap_, (size), _Deref_post1_impl_(__maybenull_impl_notref) _Deref_post1_impl_(__cap_impl(size)) _Post_valid_impl_) #define _Deref_post_valid_bytecap_(size) _SAL1_1_Source_(_Deref_post_valid_bytecap_, (size), _Deref_post1_impl_(__notnull_impl_notref) _Deref_post1_impl_(__bytecap_impl(size)) _Post_valid_impl_) #define _Deref_post_opt_valid_bytecap_(size) _SAL1_1_Source_(_Deref_post_opt_valid_bytecap_, (size), _Deref_post1_impl_(__maybenull_impl_notref) _Deref_post1_impl_(__bytecap_impl(size)) _Post_valid_impl_) - + #define _Deref_post_valid_cap_c_(size) _SAL1_1_Source_(_Deref_post_valid_cap_c_, (size), _Deref_post1_impl_(__notnull_impl_notref) _Deref_post1_impl_(__cap_c_impl(size)) _Post_valid_impl_) #define _Deref_post_opt_valid_cap_c_(size) _SAL1_1_Source_(_Deref_post_opt_valid_cap_c_, (size), _Deref_post1_impl_(__maybenull_impl_notref) _Deref_post1_impl_(__cap_c_impl(size)) _Post_valid_impl_) #define _Deref_post_valid_bytecap_c_(size) _SAL1_1_Source_(_Deref_post_valid_bytecap_c_, (size), _Deref_post1_impl_(__notnull_impl_notref) _Deref_post1_impl_(__bytecap_c_impl(size)) _Post_valid_impl_) #define _Deref_post_opt_valid_bytecap_c_(size) _SAL1_1_Source_(_Deref_post_opt_valid_bytecap_c_, (size), _Deref_post1_impl_(__maybenull_impl_notref) _Deref_post1_impl_(__bytecap_c_impl(size)) _Post_valid_impl_) - + #define _Deref_post_valid_cap_x_(size) _SAL1_1_Source_(_Deref_post_valid_cap_x_, (size), _Deref_post1_impl_(__notnull_impl_notref) _Deref_post1_impl_(__cap_x_impl(size)) _Post_valid_impl_) #define _Deref_post_opt_valid_cap_x_(size) _SAL1_1_Source_(_Deref_post_opt_valid_cap_x_, (size), _Deref_post1_impl_(__maybenull_impl_notref) _Deref_post1_impl_(__cap_x_impl(size)) _Post_valid_impl_) #define _Deref_post_valid_bytecap_x_(size) _SAL1_1_Source_(_Deref_post_valid_bytecap_x_, (size), _Deref_post1_impl_(__notnull_impl_notref) _Deref_post1_impl_(__bytecap_x_impl(size)) _Post_valid_impl_) @@ -1489,7 +1489,7 @@ enum __SAL_YesNo {_SAL_notpresent, _SAL_no, _SAL_maybe, _SAL_yes, _SAL_default}; // not required to be a legal standalone annotation, and in the case // of attribute annotations, usually is not. (In the case of some declspec // annotations, it might be, but it should not be assumed so.) Those -// symols will be used in the _PreN..., _PostN... and _RetN... annotations +// symols will be used in the _PreN..., _PostN... and _RetN... annotations // to build up more complete annotations. // A symbol ending in _impl_ is reserved to the implementation as well, @@ -1603,7 +1603,7 @@ enum __SAL_YesNo {_SAL_notpresent, _SAL_no, _SAL_maybe, _SAL_yes, _SAL_default}; // Done this way so that they don't appear in the regular compiler's // namespace. #define __ANNOTATION(fun) _SA_annotes0(SAL_annotation) void __SA_##fun - + #define __PRIMOP(type, fun) _SA_annotes0(SAL_primop) type __SA_##fun #define __QUALIFIER(fun) _SA_annotes0(SAL_qualifier) void __SA_##fun; @@ -1619,9 +1619,9 @@ enum __SAL_YesNo {_SAL_notpresent, _SAL_no, _SAL_maybe, _SAL_yes, _SAL_default}; #define _SA_annotes2(n,pp1,pp2) #define _SA_annotes3(n,pp1,pp2,pp3) -#define __ANNOTATION(fun) -#define __PRIMOP(type, fun) -#define __QUALIFIER(type, fun) +#define __ANNOTATION(fun) +#define __PRIMOP(type, fun) +#define __QUALIFIER(type, fun) #endif // ] @@ -2124,15 +2124,15 @@ typedef struct __F_ __F_; #define _Pre3_impl_(p1,p2,p3) #define _Post_impl_ -#define _Post1_impl_(p1) +#define _Post1_impl_(p1) #define _Post2_impl_(p1,p2) #define _Post3_impl_(p1,p2,p3) -#define _Ret1_impl_(p1) +#define _Ret1_impl_(p1) #define _Ret2_impl_(p1,p2) #define _Ret3_impl_(p1,p2,p3) -#define _Deref_pre1_impl_(p1) +#define _Deref_pre1_impl_(p1) #define _Deref_pre2_impl_(p1,p2) #define _Deref_pre3_impl_(p1,p2,p3) @@ -2164,7 +2164,7 @@ typedef struct __F_ __F_; // This section contains the deprecated annotations -/* +/* ------------------------------------------------------------------------------- Introduction @@ -2355,7 +2355,7 @@ typedef struct __F_ __F_; ------------------------------------------------------------------------------- Advanced Annotation Examples - __success(return != FALSE) LWSTDAPI_(BOOL) + __success(return != FALSE) LWSTDAPI_(BOOL) PathCanonicalizeA(__out_ecount(MAX_PATH) LPSTR pszBuf, LPCSTR pszPath) : pszBuf is only guaranteed to be NULL-terminated when TRUE is returned. @@ -2391,8 +2391,8 @@ extern "C" { */ /* - The helper annotations are only understood by the compiler version used by - various defect detection tools. When the regular compiler is running, they + The helper annotations are only understood by the compiler version used by + various defect detection tools. When the regular compiler is running, they are defined into nothing, and do not affect the compiled code. */ @@ -2411,7 +2411,7 @@ extern "C" { __null p __notnull p __maybenull p - + Annotates a pointer p. States that pointer p is null. Commonly used in the negated form __notnull or the possibly null form __maybenull. */ @@ -2426,7 +2426,7 @@ extern "C" { __readonly l __notreadonly l __mabyereadonly l - + Annotates a location l. States that location l is not modified after this point. If the annotation is placed on the precondition state of a function, the restriction only applies until the postcondition state @@ -2443,7 +2443,7 @@ extern "C" { __valid v __notvalid v __maybevalid v - + Annotates any value v. States that the value satisfies all properties of valid values of its type. For example, for a string buffer, valid means that the buffer pointer is either NULL or points to a NULL-terminated string. @@ -2455,7 +2455,7 @@ extern "C" { /* __readableTo(extent) p - + Annotates a buffer pointer p. If the buffer can be read, extent describes how much of the buffer is readable. For a reader of the buffer, this is an explicit permission to read up to that amount, rather than a restriction to @@ -2465,24 +2465,24 @@ extern "C" { #define __readableTo(extent) _SA_annotes1(SAL_readableTo, extent) /* - + __elem_readableTo(size) - + Annotates a buffer pointer p as being readable to size elements. */ #define __elem_readableTo(size) _SA_annotes1(SAL_readableTo, elementCount( size )) - + /* __byte_readableTo(size) - + Annotates a buffer pointer p as being readable to size bytes. */ #define __byte_readableTo(size) _SA_annotes1(SAL_readableTo, byteCount(size)) - + /* __writableTo(extent) p - + Annotates a buffer pointer p. If the buffer can be modified, extent describes how much of the buffer is writable (usually the allocation size). For a writer of the buffer, this is an explicit permission to @@ -2492,45 +2492,45 @@ extern "C" { /* __elem_writableTo(size) - + Annotates a buffer pointer p as being writable to size elements. */ #define __elem_writableTo(size) _SA_annotes1(SAL_writableTo, elementCount( size )) - + /* __byte_writableTo(size) - + Annotates a buffer pointer p as being writable to size bytes. */ #define __byte_writableTo(size) _SA_annotes1(SAL_writableTo, byteCount( size)) /* __deref p - + Annotates a pointer p. The next annotation applies one dereference down in the type. If readableTo(p, size) then the next annotation applies to all elements *(p+i) for which i satisfies the size. If p is a pointer to a struct, the next annotation applies to all fields of the struct. */ #define __deref _Deref_impl_ - + /* __pre __next_annotation - + The next annotation applies in the precondition state */ #define __pre _Pre_impl_ - + /* __post __next_annotation - + The next annotation applies in the postcondition state */ #define __post _Post_impl_ - + /* __precond(<expr>) - + When <expr> is true, the next annotation applies in the precondition state (currently not enabled) */ @@ -2538,7 +2538,7 @@ extern "C" { /* __postcond(<expr>) - + When <expr> is true, the next annotation applies in the postcondition state (currently not enabled) */ @@ -2546,26 +2546,26 @@ extern "C" { /* __exceptthat - + Given a set of annotations Q containing __exceptthat maybeP, the effect of the except clause is to erase any P or notP annotations (explicit or implied) within Q at the same level of dereferencing that the except clause appears, and to replace it with maybeP. - + Example 1: __valid __pre_except_maybenull on a pointer p means that the pointer may be null, and is otherwise valid, thus overriding the implicit notnull annotation implied by __valid on pointers. - + Example 2: __valid __deref __pre_except_maybenull on an int **p means that p is not null (implied by valid), but the elements - pointed to by p could be null, and are otherwise valid. + pointed to by p could be null, and are otherwise valid. */ #define __exceptthat __inner_exceptthat - + /* _refparam - + Added to all out parameter macros to indicate that they are all reference parameters. */ @@ -2573,16 +2573,16 @@ extern "C" { /* __inner_* - + Helper macros that directly correspond to certain high-level annotations. - + */ /* Macros to classify the entrypoints and indicate their category. - + Pre-defined control point categories include: RPC, LPC, DeviceDriver, UserToKernel, ISAPI, COM. - + */ #define __inner_control_entrypoint(category) _SA_annotes2(SAL_entrypoint, controlEntry, category) @@ -2651,7 +2651,7 @@ extern "C" { #endif /* #if !defined(__midl) && defined(_PREFAST_) */ // ] -/* +/* ------------------------------------------------------------------------------- Buffer Annotation Definitions @@ -2667,6 +2667,10 @@ buffer, use the table in the buffer annotations section. #define __out _SAL1_Source_(__out, (), _Out_) #endif // !PAL_STDCPP_COMPAT +#define __in_xcount(size) _SAL1_Source_(__in_xcount, (size), __in _Pre_ __inexpressible_readableTo(size)) +#define __in_xcount_opt(size) _SAL1_Source_(__in_xcount_opt, (size), __in_xcount(size) __exceptthat __maybenull) +#define __out_xcount(size) _SAL1_Source_(__out_xcount, (size), __xcount(size) _Post_ __valid __refparam) + #define __ecount(size) _SAL1_Source_(__ecount, (size), __notnull __elem_writableTo(size)) #define __bcount(size) _SAL1_Source_(__bcount, (size), __notnull __byte_writableTo(size)) #define __in_ecount(size) _SAL1_Source_(__in_ecount, (size), _In_reads_(size)) @@ -2880,7 +2884,7 @@ of each annotation, see the advanced annotations section. #define __data_entrypoint(category) __inner_data_entrypoint(category) #define __useHeader _Use_decl_anno_impl_ #define __on_failure(annotes) _On_failure_impl_(annotes _SAL_nop_impl_) - + #ifndef __fallthrough // [ __inner_fallthrough_dec #define __fallthrough __inner_fallthrough @@ -2890,7 +2894,7 @@ of each annotation, see the advanced annotations section. #ifdef _PREFAST_ // [ #define __analysis_assume(expr) __assume(expr) #else // ][ -#define __analysis_assume(expr) +#define __analysis_assume(expr) #endif // ] #endif // ] @@ -2898,14 +2902,14 @@ of each annotation, see the advanced annotations section. #ifdef _PREFAST_ // [ #define _Analysis_assume_(expr) __assume(expr) #else // ][ -#define _Analysis_assume_(expr) +#define _Analysis_assume_(expr) #endif // ] #endif // ] #define _Analysis_noreturn_ _SAL2_Source_(_Analysis_noreturn_, (), _SA_annotes0(SAL_terminates)) #ifdef _PREFAST_ // [ -__inline __nothrow +__inline __nothrow void __AnalysisAssumeNullterminated(_Post_ __nullterminated void *p); #define _Analysis_assume_nullterminated_(x) __AnalysisAssumeNullterminated(x) diff --git a/sdk/include/psdk/specstrings.h b/sdk/include/psdk/specstrings.h index 071324f7545..33a13e340f1 100644 --- a/sdk/include/psdk/specstrings.h +++ b/sdk/include/psdk/specstrings.h @@ -48,6 +48,13 @@ #define __nullnullterminated #define __in_data_source(src_sym) #define __kernel_entry +#define __range(lb,ub) +#define __in_bound +#define __out_bound +#define __in_range(lb,ub) +#define __out_range(lb,ub) +#define __deref_in_range(lb,ub) +#define __deref_out_range(lb,ub) #if (_MSC_VER >= 1000) && !defined(__midl) && defined(_PREFAST_) diff --git a/sdk/include/psdk/winapifamily.h b/sdk/include/psdk/winapifamily.h new file mode 100644 index 00000000000..58bd80220b1 --- /dev/null +++ b/sdk/include/psdk/winapifamily.h @@ -0,0 +1,71 @@ +#ifndef _WINAPIFAMILY_H_ +#define _WINAPIFAMILY_H_ + +#include <winpackagefamily.h> + +#define WINAPI_FAMILY_PC_APP 2 +#define WINAPI_FAMILY_PHONE_APP 3 +#define WINAPI_FAMILY_SYSTEM 4 +#define WINAPI_FAMILY_SERVER 5 +#define WINAPI_FAMILY_GAMES 6 +#define WINAPI_FAMILY_DESKTOP_APP 100 + +#define WINAPI_FAMILY_APP WINAPI_FAMILY_PC_APP + +#ifndef WINAPI_FAMILY +#define WINAPI_FAMILY WINAPI_FAMILY_DESKTOP_APP +#endif + +#if WINAPI_FAMILY != WINAPI_FAMILY_DESKTOP_APP && \ + WINAPI_FAMILY != WINAPI_FAMILY_PC_APP && \ + WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP && \ + WINAPI_FAMILY != WINAPI_FAMILY_SYSTEM && \ + WINAPI_FAMILY != WINAPI_FAMILY_GAMES && \ + WINAPI_FAMILY != WINAPI_FAMILY_SERVER +#error Unknown WINAPI_FAMILY value? +#endif + +#ifndef WINAPI_PARTITION_DESKTOP +#define WINAPI_PARTITION_DESKTOP (WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP) +#endif + +#ifndef WINAPI_PARTITION_APP +#define WINAPI_PARTITION_APP \ + (WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP || \ + WINAPI_FAMILY == WINAPI_FAMILY_PC_APP || \ + WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP) +#endif + +#ifndef WINAPI_PARTITION_PC_APP +#define WINAPI_PARTITION_PC_APP \ + (WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP || \ + WINAPI_FAMILY == WINAPI_FAMILY_PC_APP) +#endif + +#ifndef WINAPI_PARTITION_PHONE_APP +#define WINAPI_PARTITION_PHONE_APP (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP) +#endif + +#ifndef WINAPI_PARTITION_GAMES +#define WINAPI_PARTITION_GAMES \ + (WINAPI_FAMILY == WINAPI_FAMILY_GAMES || \ + WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP) +#endif + +#ifndef WINAPI_PARTITION_SYSTEM +#define WINAPI_PARTITION_SYSTEM \ + (WINAPI_FAMILY == WINAPI_FAMILY_SYSTEM || \ + WINAPI_FAMILY == WINAPI_FAMILY_SERVER) +#endif + +#define WINAPI_PARTITION_PHONE WINAPI_PARTITION_PHONE_APP + +#define WINAPI_FAMILY_PARTITION(Partitions) (Partitions) + +#define _WINAPI_DEPRECATED_DECLARATION + +#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) +#define APP_DEPRECATED_HRESULT HRESULT _WINAPI_DEPRECATED_DECLARATION +#endif + +#endif // _WINAPIFAMILY_H_ diff --git a/sdk/include/psdk/winpackagefamily.h b/sdk/include/psdk/winpackagefamily.h new file mode 100644 index 00000000000..5849729bd6f --- /dev/null +++ b/sdk/include/psdk/winpackagefamily.h @@ -0,0 +1,56 @@ +#ifndef _WINPACKAGEFAMILY_H_ +#define _WINPACKAGEFAMILY_H_ + +#ifndef WINAPI_PARTITION_SERVER +#define WINAPI_PARTITION_SERVER (WINAPI_FAMILY == WINAPI_FAMILY_SERVER) +#endif + +#undef WINAPI_PARTITION_PKG_WINTRUST +#undef WINAPI_PARTITION_PKG_WEBSERVICES +#undef WINAPI_PARTITION_PKG_EVENTLOGSERVICE +#undef WINAPI_PARTITION_PKG_VHD +#undef WINAPI_PARTITION_PKG_PERFCOUNTER +#undef WINAPI_PARTITION_PKG_SECURESTARTUP +#undef WINAPI_PARTITION_PKG_REMOTEFS +#undef WINAPI_PARTITION_PKG_BOOTABLESKU +#undef WINAPI_PARTITION_PKG_CMDTOOLS +#undef WINAPI_PARTITION_PKG_DISM +#undef WINAPI_PARTITION_PKG_CORESETUP +#undef WINAPI_PARTITION_PKG_APPRUNTIME +#undef WINAPI_PARTITION_PKG_ESENT +#undef WINAPI_PARTITION_PKG_WINMGMT +#undef WINAPI_PARTITION_PKG_WNV +#undef WINAPI_PARTITION_PKG_CLUSTER +#undef WINAPI_PARTITION_PKG_VSS +#undef WINAPI_PARTITION_PKG_TRAFFIC +#undef WINAPI_PARTITION_PKG_ISCSI +#undef WINAPI_PARTITION_PKG_STORAGE +#undef WINAPI_PARTITION_PKG_MPSSVC +#undef WINAPI_PARTITION_PKG_APPXDEPLOYMENT +#undef WINAPI_PARTITION_PKG_WER + +#define WINAPI_PARTITION_PKG_WINTRUST (WINAPI_PARTITION_SERVER == 1) +#define WINAPI_PARTITION_PKG_WEBSERVICES (WINAPI_PARTITION_SERVER == 1) +#define WINAPI_PARTITION_PKG_EVENTLOGSERVICE (WINAPI_PARTITION_SERVER == 1) +#define WINAPI_PARTITION_PKG_VHD (WINAPI_PARTITION_SERVER == 1) +#define WINAPI_PARTITION_PKG_PERFCOUNTER (WINAPI_PARTITION_SERVER == 1) +#define WINAPI_PARTITION_PKG_SECURESTARTUP (WINAPI_PARTITION_SERVER == 1) +#define WINAPI_PARTITION_PKG_REMOTEFS (WINAPI_PARTITION_SERVER == 1) +#define WINAPI_PARTITION_PKG_BOOTABLESKU (WINAPI_PARTITION_SERVER == 1) +#define WINAPI_PARTITION_PKG_CMDTOOLS (WINAPI_PARTITION_SERVER == 1) +#define WINAPI_PARTITION_PKG_DISM (WINAPI_PARTITION_SERVER == 1) +#define WINAPI_PARTITION_PKG_CORESETUP (WINAPI_PARTITION_SERVER == 1) +#define WINAPI_PARTITION_PKG_APPRUNTIME (WINAPI_PARTITION_SERVER == 1) +#define WINAPI_PARTITION_PKG_ESENT (WINAPI_PARTITION_SERVER == 1) +#define WINAPI_PARTITION_PKG_WINMGMT (WINAPI_PARTITION_SERVER == 1) +#define WINAPI_PARTITION_PKG_WNV (WINAPI_PARTITION_SERVER == 1) +#define WINAPI_PARTITION_PKG_CLUSTER (WINAPI_PARTITION_SERVER == 1) +#define WINAPI_PARTITION_PKG_VSS (WINAPI_PARTITION_SERVER == 1) +#define WINAPI_PARTITION_PKG_TRAFFIC (WINAPI_PARTITION_SERVER == 1) +#define WINAPI_PARTITION_PKG_ISCSI (WINAPI_PARTITION_SERVER == 1) +#define WINAPI_PARTITION_PKG_STORAGE (WINAPI_PARTITION_SERVER == 1) +#define WINAPI_PARTITION_PKG_MPSSVC (WINAPI_PARTITION_SERVER == 1) +#define WINAPI_PARTITION_PKG_APPXDEPLOYMENT (WINAPI_PARTITION_SERVER == 1) +#define WINAPI_PARTITION_PKG_WER (WINAPI_PARTITION_SERVER == 1) + +#endif // _WINPACKAGEFAMILY_H_
4 years, 3 months
1
0
0
0
[reactos] 01/01: [DDK] Add definitions required for newer storage class drivers (cdrom)
by Victor Perevertkin
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=d7d716a64c0757ed1b323…
commit d7d716a64c0757ed1b3238d8a96e7d85c0160c0f Author: Victor Perevertkin <victor.perevertkin(a)reactos.org> AuthorDate: Thu Sep 24 05:47:48 2020 +0300 Commit: Victor Perevertkin <victor.perevertkin(a)reactos.org> CommitDate: Thu Sep 24 05:47:48 2020 +0300 [DDK] Add definitions required for newer storage class drivers (cdrom) CORE-17129 --- sdk/include/ddk/scsi.h | 1 + sdk/include/ddk/usbdlib.h | 16 ++++++++++++++-- sdk/include/ddk/wdmguid.h | 4 ++++ 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/sdk/include/ddk/scsi.h b/sdk/include/ddk/scsi.h index 42027d5b84d..465880aee76 100644 --- a/sdk/include/ddk/scsi.h +++ b/sdk/include/ddk/scsi.h @@ -113,6 +113,7 @@ extern "C" { #define NOTIFICATION_BUSY_EVENT_NO_EVENT 0x0 #define NOTIFICATION_BUSY_EVENT_NO_CHANGE 0x0 #define NOTIFICATION_BUSY_EVENT_BUSY 0x1 +#define NOTIFICATION_BUSY_EVENT_LO_CHANGE 0x2 #define NOTIFICATION_BUSY_STATUS_NO_EVENT 0x0 #define NOTIFICATION_BUSY_STATUS_POWER 0x1 diff --git a/sdk/include/ddk/usbdlib.h b/sdk/include/ddk/usbdlib.h index 0a05d83ee70..3530ed9c108 100644 --- a/sdk/include/ddk/usbdlib.h +++ b/sdk/include/ddk/usbdlib.h @@ -89,11 +89,24 @@ typedef struct _USBD_INTERFACE_LIST_ENTRY { (urb)->UrbOSFeatureDescriptorRequest.TransferBuffer = (transferBuffer); \ (urb)->UrbOSFeatureDescriptorRequest.InterfaceNumber = (interface); \ (urb)->UrbOSFeatureDescriptorRequest.MS_FeatureDescriptorIndex = (index); \ - urb)->UrbOSFeatureDescriptorRequest.UrbLink = (link); \ + (urb)->UrbOSFeatureDescriptorRequest.UrbLink = (link); \ } #endif /* NTDDI_VERSION >= NTDDI_WINXP */ +#if (NTDDI_VERSION >= NTDDI_VISTA) + +#define USBD_CLIENT_CONTRACT_VERSION_INVALID 0xFFFFFFFF +#define USBD_CLIENT_CONTRACT_VERSION_602 0x602 + +#define USBD_INTERFACE_VERSION_600 0x600 +#define USBD_INTERFACE_VERSION_602 0x602 +#define USBD_INTERFACE_VERSION_603 0x603 + +DECLARE_HANDLE(USBD_HANDLE); + +#endif // NTDDI_VISTA + #define URB_STATUS(urb) ((urb)->UrbHeader.Status) #define GET_SELECT_CONFIGURATION_REQUEST_SIZE(totalInterfaces, totalPipes) \ @@ -230,4 +243,3 @@ USBD_ValidateConfigurationDescriptor( #endif #endif /* ! _USBD_ */ - diff --git a/sdk/include/ddk/wdmguid.h b/sdk/include/ddk/wdmguid.h index dadbddb7dcb..57b54cd1877 100644 --- a/sdk/include/ddk/wdmguid.h +++ b/sdk/include/ddk/wdmguid.h @@ -74,6 +74,10 @@ DEFINE_GUID(GUID_ACPI_PORT_RANGES_INTERFACE_STANDARD, 0xf14f609b, 0xcbbd, 0x4957, 0xa6, 0x74, 0xbc, 0x00, 0x21, 0x3f, 0x1c, 0x97); DEFINE_GUID(GUID_PNP_LOCATION_INTERFACE, 0x70211b0e, 0x0afb, 0x47db, 0xaf, 0xc1, 0x41, 0x0b, 0xf8, 0x42, 0x49, 0x7a); +DEFINE_GUID(GUID_D3COLD_SUPPORT_INTERFACE, + 0xb38290e5, 0x3cd0, 0x4f9d, 0x99, 0x37, 0xf5, 0xfe, 0x2b, 0x44, 0xd4, 0x7a); +DEFINE_GUID(GUID_REENUMERATE_SELF_INTERFACE_STANDARD, + 0x2aeb0243, 0x6a6e, 0x486b, 0x82, 0xfc, 0xd8, 0x15, 0xf6, 0xb9, 0x70, 0x06); DEFINE_GUID(GUID_BUS_TYPE_INTERNAL, 0x1530ea73, 0x086b, 0x11d1, 0xa0, 0x9f, 0x00, 0xc0, 0x4f, 0xc3, 0x40, 0xb1);
4 years, 3 months
1
0
0
0
← Newer
1
2
3
4
5
6
7
...
39
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
Results per page:
10
25
50
100
200