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
February 2018
----- 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
24 participants
240 discussions
Start a n
N
ew thread
01/01: [SETUPAPI] Fix the coding style, annotations and debug messages
by Eric Kohl
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=60a218948efe35180b351…
commit 60a218948efe35180b351b0b5b1494fbb996dad9 Author: Eric Kohl <eric.kohl(a)reactos.org> AuthorDate: Sun Feb 4 17:47:37 2018 +0100 Commit: Eric Kohl <eric.kohl(a)reactos.org> CommitDate: Sun Feb 4 20:16:46 2018 +0100 [SETUPAPI] Fix the coding style, annotations and debug messages * Fix the coding style. * Add missing annotations. * Add the function name to the debug messages. * Treat all machine handles like pointers. --- dll/win32/setupapi/cfgmgr.c | 962 +++++++++++++++++++++++++++++--------------- 1 file changed, 639 insertions(+), 323 deletions(-) diff --git a/dll/win32/setupapi/cfgmgr.c b/dll/win32/setupapi/cfgmgr.c index c77d8fd8db..c2044d98fa 100644 --- a/dll/win32/setupapi/cfgmgr.c +++ b/dll/win32/setupapi/cfgmgr.c @@ -1396,7 +1396,7 @@ CM_Delete_Class_Key_Ex( RPC_BINDING_HANDLE BindingHandle = NULL; CONFIGRET ret; - TRACE("CM_Delete_Class_Key_Ex(%p %lx %lx)\n", + TRACE("CM_Delete_Class_Key_Ex(%p %lx %p)\n", ClassGuid, ulFlags, hMachine); if (ClassGuid == NULL) @@ -1581,7 +1581,7 @@ CM_Disconnect_Machine( { PMACHINE_INFO pMachine; - TRACE("CM_Disconnect_Machine(%lx)\n", hMachine); + TRACE("CM_Disconnect_Machine(%p)\n", hMachine); pMachine = (PMACHINE_INFO)hMachine; if (pMachine == NULL) @@ -1839,7 +1839,7 @@ CM_Enumerate_Enumerators_ExA( ULONG ulLength; CONFIGRET ret = CR_SUCCESS; - TRACE("CM_Enumerate_Enumerators_ExA(%lu %p %p %lx %lx)\n", + TRACE("CM_Enumerate_Enumerators_ExA(%lu %p %p %lx %p)\n", ulEnumIndex, Buffer, pulLength, ulFlags, hMachine); if (Buffer == NULL || pulLength == NULL) @@ -1888,7 +1888,7 @@ CM_Enumerate_Enumerators_ExW( RPC_BINDING_HANDLE BindingHandle = NULL; CONFIGRET ret; - TRACE("CM_Enumerate_Enumerators_ExW(%lu %p %p %lx %lx)\n", + TRACE("CM_Enumerate_Enumerators_ExW(%lu %p %p %lx %p)\n", ulEnumIndex, Buffer, pulLength, ulFlags, hMachine); if (Buffer == NULL || pulLength == NULL) @@ -2042,7 +2042,7 @@ CM_Free_Log_Conf_Ex( PLOG_CONF_INFO pLogConfInfo; CONFIGRET ret; - TRACE("CM_Free_Log_Conf_Ex(%lx %lx %lx)\n", + TRACE("CM_Free_Log_Conf_Ex(%lx %lx %p)\n", lcLogConfToBeFreed, ulFlags, hMachine); if (!pSetupIsUserAdmin()) @@ -2188,7 +2188,7 @@ CM_Free_Res_Des_Ex( _In_ ULONG ulFlags, _In_opt_ HMACHINE hMachine) { - FIXME("CM_Free_Res_Des_Ex(%p %p %lx %lx)\n", + FIXME("CM_Free_Res_Des_Ex(%p %p %lx %p)\n", prdResDes, rdResDes, ulFlags, hMachine); return CR_CALL_NOT_IMPLEMENTED; @@ -2244,7 +2244,7 @@ CM_Get_Child_Ex( DWORD dwIndex, dwLength = MAX_DEVICE_ID_LEN; CONFIGRET ret; - TRACE("CM_Get_Child_Ex(%p %lx %lx %lx)\n", + TRACE("CM_Get_Child_Ex(%p %lx %lx %p)\n", pdnDevInst, dnDevInst, ulFlags, hMachine); if (pdnDevInst == NULL) @@ -2363,7 +2363,7 @@ CM_Get_Class_Key_Name_ExA( ULONG ulLength; ULONG ulOrigLength; - TRACE("CM_Get_Class_Key_Name_ExA(%p %p %p %lx %lx)\n", + TRACE("CM_Get_Class_Key_Name_ExA(%p %p %p %lx %p)\n", ClassGuid, pszKeyName, pulLength, ulFlags, hMachine); if (ClassGuid == NULL || pszKeyName == NULL || pulLength == NULL) @@ -2406,7 +2406,7 @@ CM_Get_Class_Key_Name_ExW( _In_ ULONG ulFlags, _In_opt_ HMACHINE hMachine) { - TRACE("CM_Get_Class_Key_Name_ExW(%p %p %p %lx %lx)\n", + TRACE("CM_Get_Class_Key_Name_ExW(%p %p %p %lx %p)\n", ClassGuid, pszKeyName, pulLength, ulFlags, hMachine); if (ClassGuid == NULL || pszKeyName == NULL || pulLength == NULL) @@ -2485,7 +2485,7 @@ CM_Get_Class_Name_ExA( ULONG ulLength; ULONG ulOrigLength; - TRACE("CM_Get_Class_Name_ExA(%p %p %p %lx %lx)\n", + TRACE("CM_Get_Class_Name_ExA(%p %p %p %lx %p)\n", ClassGuid, Buffer, pulLength, ulFlags, hMachine); if (ClassGuid == NULL || Buffer == NULL || pulLength == NULL) @@ -2532,7 +2532,7 @@ CM_Get_Class_Name_ExW( RPC_BINDING_HANDLE BindingHandle = NULL; CONFIGRET ret; - TRACE("CM_Get_Class_Name_ExW(%p %p %p %lx %lx\n", + TRACE("CM_Get_Class_Name_ExW(%p %p %p %lx %p\n", ClassGuid, Buffer, pulLength, ulFlags, hMachine); if (ClassGuid == NULL || Buffer == NULL || pulLength == NULL) @@ -2595,7 +2595,7 @@ CM_Get_Class_Registry_PropertyA( ULONG ulType; CONFIGRET ret; - TRACE("CM_Get_Class_Registry_PropertyA(%p %lu %p %p %p %lx %lx)\n", + TRACE("CM_Get_Class_Registry_PropertyA(%p %lu %p %p %p %lx %p)\n", ClassGuid, ulProperty, pulRegDataType, Buffer, pulLength, ulFlags, hMachine); @@ -2675,7 +2675,7 @@ CM_Get_Class_Registry_PropertyW( ULONG ulTransferLength = 0; CONFIGRET ret; - TRACE("CM_Get_Class_Registry_PropertyW(%p %lu %p %p %p %lx %lx)\n", + TRACE("CM_Get_Class_Registry_PropertyW(%p %lu %p %p %p %lx %p)\n", ClassGuid, ulProperty, pulRegDataType, Buffer, pulLength, ulFlags, hMachine); @@ -2767,7 +2767,7 @@ CM_Get_Depth_Ex( LPWSTR lpDevInst; CONFIGRET ret; - TRACE("CM_Get_Depth_Ex(%p %lx %lx %lx)\n", + TRACE("CM_Get_Depth_Ex(%p %lx %lx %p)\n", pulDepth, dnDevInst, ulFlags, hMachine); if (pulDepth == NULL) @@ -3098,7 +3098,7 @@ CM_Get_DevNode_Registry_Property_ExA( ULONG ulDataType = REG_NONE; CONFIGRET ret; - TRACE("CM_Get_DevNode_Registry_Property_ExA(%lx %lu %p %p %p %lx %lx)\n", + TRACE("CM_Get_DevNode_Registry_Property_ExA(%lx %lu %p %p %p %lx %p)\n", dnDevInst, ulProperty, pulRegDataType, Buffer, pulLength, ulFlags, hMachine); @@ -3180,7 +3180,7 @@ CM_Get_DevNode_Registry_Property_ExW( ULONG ulDataType = REG_NONE; ULONG ulTransferLength = 0; - TRACE("CM_Get_DevNode_Registry_Property_ExW(%lx %lu %p %p %p %lx %lx)\n", + TRACE("CM_Get_DevNode_Registry_Property_ExW(%lx %lu %p %p %p %lx %p)\n", dnDevInst, ulProperty, pulRegDataType, Buffer, pulLength, ulFlags, hMachine); @@ -3288,7 +3288,7 @@ CM_Get_DevNode_Status_Ex( LPWSTR lpDevInst; CONFIGRET ret; - TRACE("CM_Get_DevNode_Status_Ex(%p %p %lx %lx %lx)\n", + TRACE("CM_Get_DevNode_Status_Ex(%p %p %lx %lx %p)\n", pulStatus, pulProblemNumber, dnDevInst, ulFlags, hMachine); if (pulStatus == NULL || pulProblemNumber == NULL) @@ -3349,7 +3349,7 @@ CM_Get_Device_IDA( _In_ ULONG BufferLen, _In_ ULONG ulFlags) { - TRACE("CM_Get_Device_IDA(%lx %p %ld %lx)\n", + TRACE("CM_Get_Device_IDA(%lx %p %lu %lx)\n", dnDevInst, Buffer, BufferLen, ulFlags); return CM_Get_Device_ID_ExA(dnDevInst, Buffer, BufferLen, ulFlags, NULL); @@ -3367,7 +3367,7 @@ CM_Get_Device_IDW( _In_ ULONG BufferLen, _In_ ULONG ulFlags) { - TRACE("CM_Get_Device_IDW(%lx %p %ld %lx)\n", + TRACE("CM_Get_Device_IDW(%lx %p %lu %lx)\n", dnDevInst, Buffer, BufferLen, ulFlags); return CM_Get_Device_ID_ExW(dnDevInst, Buffer, BufferLen, ulFlags, NULL); @@ -3389,7 +3389,7 @@ CM_Get_Device_ID_ExA( WCHAR szBufferW[MAX_DEVICE_ID_LEN]; CONFIGRET ret = CR_SUCCESS; - TRACE("CM_Get_Device_ID_ExA(%lx %p %ld %ld %lx)\n", + TRACE("CM_Get_Device_ID_ExA(%lx %p %lu %lx %p)\n", dnDevInst, Buffer, BufferLen, ulFlags, hMachine); if (Buffer == NULL) @@ -3431,7 +3431,7 @@ CM_Get_Device_ID_ExW( { HSTRING_TABLE StringTable = NULL; - TRACE("CM_Get_Device_ID_ExW(%lx %p %ld %lx %lx)\n", + TRACE("CM_Get_Device_ID_ExW(%lx %p %lu %lx %p)\n", dnDevInst, Buffer, BufferLen, ulFlags, hMachine); if (dnDevInst == 0) @@ -3476,7 +3476,7 @@ CM_Get_Device_ID_ListA( _In_ ULONG BufferLen, _In_ ULONG ulFlags) { - TRACE("CM_Get_Device_ID_ListA(%p %p %ld %lx)\n", + TRACE("CM_Get_Device_ID_ListA(%p %p %lu %lx)\n", pszFilter, Buffer, BufferLen, ulFlags); return CM_Get_Device_ID_List_ExA(pszFilter, Buffer, BufferLen, @@ -3495,7 +3495,7 @@ CM_Get_Device_ID_ListW( _In_ ULONG BufferLen, _In_ ULONG ulFlags) { - TRACE("CM_Get_Device_ID_ListW(%p %p %ld %lx)\n", + TRACE("CM_Get_Device_ID_ListW(%p %p %lu %lx)\n", pszFilter, Buffer, BufferLen, ulFlags); return CM_Get_Device_ID_List_ExW(pszFilter, Buffer, BufferLen, @@ -3519,7 +3519,7 @@ CM_Get_Device_ID_List_ExA( LPWSTR pszFilterW = NULL; CONFIGRET ret = CR_SUCCESS; - TRACE("CM_Get_Device_ID_List_ExA(%p %p %ld %lx %lx)\n", + TRACE("CM_Get_Device_ID_List_ExA(%p %p %lu %lx %p)\n", pszFilter, Buffer, BufferLen, ulFlags, hMachine); BufferW = MyMalloc(BufferLen * sizeof(WCHAR)); @@ -3583,7 +3583,7 @@ CM_Get_Device_ID_List_ExW( RPC_BINDING_HANDLE BindingHandle = NULL; CONFIGRET ret; - TRACE("CM_Get_Device_ID_List_ExW(%p %p %ld %lx %lx)\n", + TRACE("CM_Get_Device_ID_List_ExW(%p %p %lu %lx %p)\n", pszFilter, Buffer, BufferLen, ulFlags, hMachine); if (Buffer == NULL || BufferLen == 0) @@ -3672,7 +3672,7 @@ CM_Get_Device_ID_List_Size_ExA( LPWSTR pszFilterW = NULL; CONFIGRET ret = CR_SUCCESS; - FIXME("CM_Get_Device_ID_List_Size_ExA(%p %s %lx %lx)\n", + FIXME("CM_Get_Device_ID_List_Size_ExA(%p %s %lx %p)\n", pulLen, debugstr_a(pszFilter), ulFlags, hMachine); if (pszFilter == NULL) @@ -3713,7 +3713,7 @@ CM_Get_Device_ID_List_Size_ExW( RPC_BINDING_HANDLE BindingHandle = NULL; CONFIGRET ret; - FIXME("CM_Get_Device_ID_List_Size_ExW(%p %s %lx %lx)\n", + FIXME("CM_Get_Device_ID_List_Size_ExW(%p %s %lx %p)\n", pulLen, debugstr_w(pszFilter), ulFlags, hMachine); if (pulLen == NULL) @@ -3784,7 +3784,7 @@ CM_Get_Device_ID_Size_Ex( HSTRING_TABLE StringTable = NULL; LPWSTR DeviceId; - TRACE("CM_Get_Device_ID_Size_Ex(%p %lx %lx %lx)\n", + TRACE("CM_Get_Device_ID_Size_Ex(%p %lx %lx %p)\n", pulLen, dnDevInst, ulFlags, hMachine); if (pulLen == NULL) @@ -3878,7 +3878,7 @@ CM_Get_Device_Interface_Alias_ExA( _In_ ULONG ulFlags, _In_opt_ HMACHINE hMachine) { - FIXME("CM_Get_Device_Interface_Alias_ExA(%p %p %p %p %lx %lx)\n", + FIXME("CM_Get_Device_Interface_Alias_ExA(%p %p %p %p %lx %p)\n", pszDeviceInterface, AliasInterfaceGuid, pszAliasDeviceInterface, pulLength, ulFlags, hMachine); @@ -3903,7 +3903,7 @@ CM_Get_Device_Interface_Alias_ExW( ULONG ulTransferLength; CONFIGRET ret = CR_SUCCESS; - TRACE("CM_Get_Device_Interface_Alias_ExW(%p %p %p %p %lx %lx)\n", + TRACE("CM_Get_Device_Interface_Alias_ExW(%p %p %p %p %lx %p)\n", pszDeviceInterface, AliasInterfaceGuid, pszAliasDeviceInterface, pulLength, ulFlags, hMachine); @@ -4287,7 +4287,7 @@ CM_Get_First_Log_Conf_Ex( ULONG ulTag; PLOG_CONF_INFO pLogConfInfo; - FIXME("CM_Get_First_Log_Conf_Ex(%p %lx %lx %lx)\n", + FIXME("CM_Get_First_Log_Conf_Ex(%p %lx %lx %p)\n", plcLogConf, dnDevInst, ulFlags, hMachine); if (dnDevInst == 0) @@ -4383,7 +4383,7 @@ CM_Get_Global_State_Ex( RPC_BINDING_HANDLE BindingHandle = NULL; CONFIGRET ret; - TRACE("CM_Get_Global_State_Ex(%p %lx %lx)\n", + TRACE("CM_Get_Global_State_Ex(%p %lx %p)\n", pulState, ulFlags, hMachine); if (pulState == NULL) @@ -4471,7 +4471,7 @@ CM_Get_HW_Prof_Flags_ExA( DEVINSTID_W pszDevIdW = NULL; CONFIGRET ret = CR_SUCCESS; - TRACE("CM_Get_HW_Prof_Flags_ExA(%s %lu %p %lx %lx)\n", + TRACE("CM_Get_HW_Prof_Flags_ExA(%s %lu %p %lx %p)\n", debugstr_a(szDevInstName), ulHardwareProfile, pulValue, ulFlags, hMachine); if (szDevInstName != NULL) @@ -4505,7 +4505,7 @@ CM_Get_HW_Prof_Flags_ExW( RPC_BINDING_HANDLE BindingHandle = NULL; CONFIGRET ret; - FIXME("CM_Get_HW_Prof_Flags_ExW(%s %lu %p %lx %lx)\n", + FIXME("CM_Get_HW_Prof_Flags_ExW(%s %lu %p %lx %p)\n", debugstr_w(szDevInstName), ulHardwareProfile, pulValue, ulFlags, hMachine); if ((szDevInstName == NULL) || (pulValue == NULL)) @@ -4546,10 +4546,15 @@ CM_Get_HW_Prof_Flags_ExW( /*********************************************************************** * CM_Get_Hardware_Profile_InfoA [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Get_Hardware_Profile_InfoA( - ULONG ulIndex, PHWPROFILEINFO_A pHWProfileInfo, ULONG ulFlags) +CONFIGRET +WINAPI +CM_Get_Hardware_Profile_InfoA( + _In_ ULONG ulIndex, + _Out_ PHWPROFILEINFO_A pHWProfileInfo, + _In_ ULONG ulFlags) { - TRACE("%lu %p %lx\n", ulIndex, pHWProfileInfo, ulFlags); + TRACE("CM_Get_Hardware_Profile_InfoA(%lu %p %lx)\n", + ulIndex, pHWProfileInfo, ulFlags); return CM_Get_Hardware_Profile_Info_ExA(ulIndex, pHWProfileInfo, ulFlags, NULL); @@ -4559,10 +4564,15 @@ CONFIGRET WINAPI CM_Get_Hardware_Profile_InfoA( /*********************************************************************** * CM_Get_Hardware_Profile_InfoW [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Get_Hardware_Profile_InfoW( - ULONG ulIndex, PHWPROFILEINFO_W pHWProfileInfo, ULONG ulFlags) +CONFIGRET +WINAPI +CM_Get_Hardware_Profile_InfoW( + _In_ ULONG ulIndex, + _Out_ PHWPROFILEINFO_W pHWProfileInfo, + _In_ ULONG ulFlags) { - TRACE("%lu %p %lx\n", ulIndex, pHWProfileInfo, ulFlags); + TRACE("CM_Get_Hardware_Profile_InfoW(%lu %p %lx)\n", + ulIndex, pHWProfileInfo, ulFlags); return CM_Get_Hardware_Profile_Info_ExW(ulIndex, pHWProfileInfo, ulFlags, NULL); @@ -4572,14 +4582,19 @@ CONFIGRET WINAPI CM_Get_Hardware_Profile_InfoW( /*********************************************************************** * CM_Get_Hardware_Profile_Info_ExA [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Get_Hardware_Profile_Info_ExA( - ULONG ulIndex, PHWPROFILEINFO_A pHWProfileInfo, ULONG ulFlags, - HMACHINE hMachine) +CONFIGRET +WINAPI +CM_Get_Hardware_Profile_Info_ExA( + _In_ ULONG ulIndex, + _Out_ PHWPROFILEINFO_A pHWProfileInfo, + _In_ ULONG ulFlags, + _In_opt_ HMACHINE hMachine) { HWPROFILEINFO_W LocalProfileInfo; CONFIGRET ret; - TRACE("%lu %p %lx %lx\n", ulIndex, pHWProfileInfo, ulFlags, hMachine); + TRACE("CM_Get_Hardware_Profile_Info_ExA(%lu %p %lx %p)\n", + ulIndex, pHWProfileInfo, ulFlags, hMachine); if (pHWProfileInfo == NULL) return CR_INVALID_POINTER; @@ -4609,14 +4624,19 @@ CONFIGRET WINAPI CM_Get_Hardware_Profile_Info_ExA( /*********************************************************************** * CM_Get_Hardware_Profile_Info_ExW [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Get_Hardware_Profile_Info_ExW( - ULONG ulIndex, PHWPROFILEINFO_W pHWProfileInfo, ULONG ulFlags, - HMACHINE hMachine) +CONFIGRET +WINAPI +CM_Get_Hardware_Profile_Info_ExW( + _In_ ULONG ulIndex, + _Out_ PHWPROFILEINFO_W pHWProfileInfo, + _In_ ULONG ulFlags, + _In_opt_ HMACHINE hMachine) { RPC_BINDING_HANDLE BindingHandle = NULL; CONFIGRET ret; - TRACE("%lu %p %lx %lx\n", ulIndex, pHWProfileInfo, ulFlags, hMachine); + TRACE("CM_Get_Hardware_Profile_Info_ExW(%lu %p %lx %p)\n", + ulIndex, pHWProfileInfo, ulFlags, hMachine); if (pHWProfileInfo == NULL) return CR_INVALID_POINTER; @@ -4654,10 +4674,16 @@ CONFIGRET WINAPI CM_Get_Hardware_Profile_Info_ExW( /*********************************************************************** * CM_Get_Log_Conf_Priority [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Get_Log_Conf_Priority( - LOG_CONF lcLogConf, PPRIORITY pPriority, ULONG ulFlags) +CONFIGRET +WINAPI +CM_Get_Log_Conf_Priority( + _In_ LOG_CONF lcLogConf, + _Out_ PPRIORITY pPriority, + _In_ ULONG ulFlags) { - TRACE("%p %p %lx\n", lcLogConf, pPriority, ulFlags); + TRACE("CM_Get_Log_Conf_Priority(%p %p %lx)\n", + lcLogConf, pPriority, ulFlags); + return CM_Get_Log_Conf_Priority_Ex(lcLogConf, pPriority, ulFlags, NULL); } @@ -4665,9 +4691,13 @@ CONFIGRET WINAPI CM_Get_Log_Conf_Priority( /*********************************************************************** * CM_Get_Log_Conf_Priority_Ex [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Get_Log_Conf_Priority_Ex( - LOG_CONF lcLogConf, PPRIORITY pPriority, ULONG ulFlags, - HMACHINE hMachine) +CONFIGRET +WINAPI +CM_Get_Log_Conf_Priority_Ex( + _In_ LOG_CONF lcLogConf, + _Out_ PPRIORITY pPriority, + _In_ ULONG ulFlags, + _In_opt_ HMACHINE hMachine) { RPC_BINDING_HANDLE BindingHandle = NULL; HSTRING_TABLE StringTable = NULL; @@ -4675,7 +4705,8 @@ CONFIGRET WINAPI CM_Get_Log_Conf_Priority_Ex( LPWSTR lpDevInst; CONFIGRET ret; - FIXME("%p %p %lx %lx\n", lcLogConf, pPriority, ulFlags, hMachine); + FIXME("CM_Get_Log_Conf_Priority_Ex(%p %p %lx %p)\n", + lcLogConf, pPriority, ulFlags, hMachine); pLogConfInfo = (PLOG_CONF_INFO)lcLogConf; if (pLogConfInfo == NULL || pLogConfInfo->ulMagic != LOG_CONF_MAGIC) @@ -4729,10 +4760,16 @@ CONFIGRET WINAPI CM_Get_Log_Conf_Priority_Ex( /*********************************************************************** * CM_Get_Next_Log_Conf [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Get_Next_Log_Conf( - PLOG_CONF plcLogConf, LOG_CONF lcLogConf, ULONG ulFlags) +CONFIGRET +WINAPI +CM_Get_Next_Log_Conf( + _Out_opt_ PLOG_CONF plcLogConf, + _In_ LOG_CONF lcLogConf, + _In_ ULONG ulFlags) { - TRACE("%p %p %lx\n", plcLogConf, lcLogConf, ulFlags); + TRACE("CM_Get_Next_Log_Conf(%p %p %lx)\n", + plcLogConf, lcLogConf, ulFlags); + return CM_Get_Next_Log_Conf_Ex(plcLogConf, lcLogConf, ulFlags, NULL); } @@ -4740,9 +4777,13 @@ CONFIGRET WINAPI CM_Get_Next_Log_Conf( /*********************************************************************** * CM_Get_Next_Log_Conf_Ex [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Get_Next_Log_Conf_Ex( - PLOG_CONF plcLogConf, LOG_CONF lcLogConf, ULONG ulFlags, - HMACHINE hMachine) +CONFIGRET +WINAPI +CM_Get_Next_Log_Conf_Ex( + _Out_opt_ PLOG_CONF plcLogConf, + _In_ LOG_CONF lcLogConf, + _In_ ULONG ulFlags, + _In_opt_ HMACHINE hMachine) { RPC_BINDING_HANDLE BindingHandle = NULL; HSTRING_TABLE StringTable = NULL; @@ -4752,7 +4793,8 @@ CONFIGRET WINAPI CM_Get_Next_Log_Conf_Ex( LPWSTR lpDevInst; CONFIGRET ret; - FIXME("%p %p %lx %lx\n", plcLogConf, lcLogConf, ulFlags, hMachine); + FIXME("CM_Get_Next_Log_Conf_Ex(%p %p %lx %p)\n", + plcLogConf, lcLogConf, ulFlags, hMachine); if (plcLogConf) *plcLogConf = 0; @@ -4823,12 +4865,18 @@ CONFIGRET WINAPI CM_Get_Next_Log_Conf_Ex( /*********************************************************************** * CM_Get_Next_Re_Des [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Get_Next_Res_Des( - PRES_DES prdResDes, RES_DES rdResDes, RESOURCEID ForResource, - PRESOURCEID pResourceID, ULONG ulFlags) +CONFIGRET +WINAPI +CM_Get_Next_Res_Des( + _Out_ PRES_DES prdResDes, + _In_ RES_DES rdResDes, + _In_ RESOURCEID ForResource, + _Out_opt_ PRESOURCEID pResourceID, + _In_ ULONG ulFlags) { - TRACE("%p %p %lu %p %lx\n", prdResDes, rdResDes, ForResource, - pResourceID, ulFlags); + TRACE("CM_Get_Next_Res_Des(%p %p %lu %p %lx)\n", + prdResDes, rdResDes, ForResource, pResourceID, ulFlags); + return CM_Get_Next_Res_Des_Ex(prdResDes, rdResDes, ForResource, pResourceID, ulFlags, NULL); } @@ -4837,12 +4885,18 @@ CONFIGRET WINAPI CM_Get_Next_Res_Des( /*********************************************************************** * CM_Get_Next_Re_Des_Ex [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Get_Next_Res_Des_Ex( - PRES_DES prdResDes, RES_DES rdResDes, RESOURCEID ForResource, - PRESOURCEID pResourceID, ULONG ulFlags, HMACHINE hMachine) +CONFIGRET +WINAPI +CM_Get_Next_Res_Des_Ex( + _Out_ PRES_DES prdResDes, + _In_ RES_DES rdResDes, + _In_ RESOURCEID ForResource, + _Out_opt_ PRESOURCEID pResourceID, + _In_ ULONG ulFlags, + _In_opt_ HMACHINE hMachine) { - FIXME("%p %p %lu %p %lx %lx\n", prdResDes, rdResDes, ForResource, - pResourceID, ulFlags, hMachine); + FIXME("CM_Get_Next_Res_Des_Ex(%p %p %lu %p %lx %p)\n", + prdResDes, rdResDes, ForResource, pResourceID, ulFlags, hMachine); return CR_CALL_NOT_IMPLEMENTED; } @@ -4851,10 +4905,16 @@ CONFIGRET WINAPI CM_Get_Next_Res_Des_Ex( /*********************************************************************** * CM_Get_Parent [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Get_Parent( - PDEVINST pdnDevInst, DEVINST dnDevInst, ULONG ulFlags) +CONFIGRET +WINAPI +CM_Get_Parent( + _Out_ PDEVINST pdnDevInst, + _In_ DEVINST dnDevInst, + _In_ ULONG ulFlags) { - TRACE("%p %p %lx\n", pdnDevInst, dnDevInst, ulFlags); + TRACE("CM_Get_Parent(%p %p %lx)\n", + pdnDevInst, dnDevInst, ulFlags); + return CM_Get_Parent_Ex(pdnDevInst, dnDevInst, ulFlags, NULL); } @@ -4862,8 +4922,13 @@ CONFIGRET WINAPI CM_Get_Parent( /*********************************************************************** * CM_Get_Parent_Ex [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Get_Parent_Ex( - PDEVINST pdnDevInst, DEVINST dnDevInst, ULONG ulFlags, HMACHINE hMachine) +CONFIGRET +WINAPI +CM_Get_Parent_Ex( + _Out_ PDEVINST pdnDevInst, + _In_ DEVINST dnDevInst, + _In_ ULONG ulFlags, + _In_opt_ HMACHINE hMachine) { WCHAR szRelatedDevInst[MAX_DEVICE_ID_LEN]; RPC_BINDING_HANDLE BindingHandle = NULL; @@ -4872,7 +4937,8 @@ CONFIGRET WINAPI CM_Get_Parent_Ex( DWORD dwIndex, dwLength = MAX_DEVICE_ID_LEN; CONFIGRET ret; - TRACE("%p %lx %lx %lx\n", pdnDevInst, dnDevInst, ulFlags, hMachine); + TRACE("CM_Get_Parent_Ex(%p %lx %lx %p)\n", + pdnDevInst, dnDevInst, ulFlags, hMachine); if (pdnDevInst == NULL) return CR_INVALID_POINTER; @@ -4938,10 +5004,17 @@ CONFIGRET WINAPI CM_Get_Parent_Ex( /*********************************************************************** * CM_Get_Res_Des_Data [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Get_Res_Des_Data( - RES_DES rdResDes, PVOID Buffer, ULONG BufferLen, ULONG ulFlags) +CONFIGRET +WINAPI +CM_Get_Res_Des_Data( + _In_ RES_DES rdResDes, + _Out_writes_bytes_(BufferLen) PVOID Buffer, + _In_ ULONG BufferLen, + _In_ ULONG ulFlags) { - TRACE("%p %p %l %lx\n", rdResDes, Buffer, BufferLen, ulFlags); + TRACE("CM_Get_Res_Des_Data(%p %p %lu %lx)\n", + rdResDes, Buffer, BufferLen, ulFlags); + return CM_Get_Res_Des_Data_Ex(rdResDes, Buffer, BufferLen, ulFlags, NULL); } @@ -4949,11 +5022,18 @@ CONFIGRET WINAPI CM_Get_Res_Des_Data( /*********************************************************************** * CM_Get_Res_Des_Data_Ex [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Get_Res_Des_Data_Ex( - RES_DES rdResDes, PVOID Buffer, ULONG BufferLen, ULONG ulFlags, - HMACHINE hMachine) +CONFIGRET +WINAPI +CM_Get_Res_Des_Data_Ex( + _In_ RES_DES rdResDes, + _Out_writes_bytes_(BufferLen) PVOID Buffer, + _In_ ULONG BufferLen, + _In_ ULONG ulFlags, + _In_opt_ HMACHINE hMachine) { - FIXME("%p %p %l %lx %lx\n", rdResDes, Buffer, BufferLen, ulFlags, hMachine); + FIXME("CM_Get_Res_Des_Data_Ex(%p %p %lu %lx %p)\n", + rdResDes, Buffer, BufferLen, ulFlags, hMachine); + return CR_CALL_NOT_IMPLEMENTED; } @@ -4961,10 +5041,16 @@ CONFIGRET WINAPI CM_Get_Res_Des_Data_Ex( /*********************************************************************** * CM_Get_Res_Des_Size [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Get_Res_Des_Data_Size( - PULONG pulSize, RES_DES rdResDes, ULONG ulFlags) +CONFIGRET +WINAPI +CM_Get_Res_Des_Data_Size( + _Out_ PULONG pulSize, + _In_ RES_DES rdResDes, + _In_ ULONG ulFlags) { - TRACE("%p %p %lx\n", pulSize, rdResDes, ulFlags); + TRACE("CM_Get_Res_Des_Data_Size(%p %p %lx)\n", + pulSize, rdResDes, ulFlags); + return CM_Get_Res_Des_Data_Size_Ex(pulSize, rdResDes, ulFlags, NULL); } @@ -4972,10 +5058,17 @@ CONFIGRET WINAPI CM_Get_Res_Des_Data_Size( /*********************************************************************** * CM_Get_Res_Des_Size_Ex [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Get_Res_Des_Data_Size_Ex( - PULONG pulSize, RES_DES rdResDes, ULONG ulFlags, HMACHINE hMachine) +CONFIGRET +WINAPI +CM_Get_Res_Des_Data_Size_Ex( + _Out_ PULONG pulSize, + _In_ RES_DES rdResDes, + _In_ ULONG ulFlags, + _In_opt_ HMACHINE hMachine) { - TRACE("%p %p %lx %lx\n", pulSize, rdResDes, ulFlags, hMachine); + TRACE("CM_Get_Res_Des_Data_Size_Ex(%p %p %lx %p)\n", + pulSize, rdResDes, ulFlags, hMachine); + return CR_CALL_NOT_IMPLEMENTED; } @@ -4983,10 +5076,16 @@ CONFIGRET WINAPI CM_Get_Res_Des_Data_Size_Ex( /*********************************************************************** * CM_Get_Sibling [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Get_Sibling( - PDEVINST pdnDevInst, DEVINST dnDevInst, ULONG ulFlags) +CONFIGRET +WINAPI +CM_Get_Sibling( + _Out_ PDEVINST pdnDevInst, + _In_ DEVINST dnDevInst, + _In_ ULONG ulFlags) { - TRACE("%p %p %lx\n", pdnDevInst, dnDevInst, ulFlags); + TRACE("CM_Get_Sibling(%p %p %lx)\n", + pdnDevInst, dnDevInst, ulFlags); + return CM_Get_Sibling_Ex(pdnDevInst, dnDevInst, ulFlags, NULL); } @@ -4994,8 +5093,13 @@ CONFIGRET WINAPI CM_Get_Sibling( /*********************************************************************** * CM_Get_Sibling_Ex [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Get_Sibling_Ex( - PDEVINST pdnDevInst, DEVINST dnDevInst, ULONG ulFlags, HMACHINE hMachine) +CONFIGRET +WINAPI +CM_Get_Sibling_Ex( + _Out_ PDEVINST pdnDevInst, + _In_ DEVINST dnDevInst, + _In_ ULONG ulFlags, + _In_opt_ HMACHINE hMachine) { WCHAR szRelatedDevInst[MAX_DEVICE_ID_LEN]; RPC_BINDING_HANDLE BindingHandle = NULL; @@ -5004,7 +5108,8 @@ CONFIGRET WINAPI CM_Get_Sibling_Ex( DWORD dwIndex, dwLength = MAX_DEVICE_ID_LEN; CONFIGRET ret; - TRACE("%p %lx %lx %lx\n", pdnDevInst, dnDevInst, ulFlags, hMachine); + TRACE("CM_Get_Sibling_Ex(%p %lx %lx %p)\n", + pdnDevInst, dnDevInst, ulFlags, hMachine); if (pdnDevInst == NULL) return CR_INVALID_POINTER; @@ -5070,9 +5175,12 @@ CONFIGRET WINAPI CM_Get_Sibling_Ex( /*********************************************************************** * CM_Get_Version [SETUPAPI.@] */ -WORD WINAPI CM_Get_Version(VOID) +WORD +WINAPI +CM_Get_Version(VOID) { - TRACE("\n"); + TRACE("CM_Get_Version()\n"); + return CM_Get_Version_Ex(NULL); } @@ -5080,13 +5188,16 @@ WORD WINAPI CM_Get_Version(VOID) /*********************************************************************** * CM_Get_Version_Ex [SETUPAPI.@] */ -WORD WINAPI CM_Get_Version_Ex(HMACHINE hMachine) +WORD +WINAPI +CM_Get_Version_Ex( + _In_opt_ HMACHINE hMachine) { RPC_BINDING_HANDLE BindingHandle = NULL; WORD Version = 0; CONFIGRET ret; - TRACE("%lx\n", hMachine); + TRACE("CM_Get_Version_Ex(%p)\n", hMachine); if (hMachine != NULL) { @@ -5180,7 +5291,7 @@ CM_Is_Dock_Station_Present_Ex( RPC_BINDING_HANDLE BindingHandle = NULL; CONFIGRET ret; - TRACE("CM_Is_Dock_Station_Present_Ex(%p %lx)\n", + TRACE("CM_Is_Dock_Station_Present_Ex(%p %p)\n", pbPresent, hMachine); if (pbPresent == NULL) @@ -5243,7 +5354,7 @@ CM_Is_Version_Available_Ex( WORD wServerVersion; CONFIGRET ret; - TRACE("CM_Is_Version_Available_Ex(%hu %lx)\n", + TRACE("CM_Is_Version_Available_Ex(%hu %p)\n", wVersion, hMachine); if (wVersion <= 0x400) @@ -5288,8 +5399,8 @@ CM_Locate_DevNodeA( _In_opt_ DEVINSTID_A pDeviceID, _In_ ULONG ulFlags) { - TRACE("CM_Locate_DevNodeA(%p %s %lu)\n", - pdnDevInst, pDeviceID, ulFlags); + TRACE("CM_Locate_DevNodeA(%p %s %lx)\n", + pdnDevInst, debugstr_a(pDeviceID), ulFlags); return CM_Locate_DevNode_ExA(pdnDevInst, pDeviceID, ulFlags, NULL); } @@ -5305,7 +5416,7 @@ CM_Locate_DevNodeW( _In_opt_ DEVINSTID_W pDeviceID, _In_ ULONG ulFlags) { - TRACE("CM_Locate_DevNodeW(%p %s %lu)\n", + TRACE("CM_Locate_DevNodeW(%p %s %lx)\n", pdnDevInst, debugstr_w(pDeviceID), ulFlags); return CM_Locate_DevNode_ExW(pdnDevInst, pDeviceID, ulFlags, NULL); @@ -5326,8 +5437,8 @@ CM_Locate_DevNode_ExA( DEVINSTID_W pDevIdW = NULL; CONFIGRET ret = CR_SUCCESS; - TRACE("CM_Locate_DevNode_ExA(%p %s %lu %lx)\n", - pdnDevInst, pDeviceID, ulFlags, hMachine); + TRACE("CM_Locate_DevNode_ExA(%p %s %lx %p)\n", + pdnDevInst, debugstr_a(pDeviceID), ulFlags, hMachine); if (pDeviceID != NULL) { @@ -5360,7 +5471,7 @@ CM_Locate_DevNode_ExW( HSTRING_TABLE StringTable = NULL; CONFIGRET ret = CR_SUCCESS; - TRACE("CM_Locate_DevNode_ExW(%p %s %lu %lx)\n", + TRACE("CM_Locate_DevNode_ExW(%p %s %lx %p)\n", pdnDevInst, debugstr_w(pDeviceID), ulFlags, hMachine); if (pdnDevInst == NULL) @@ -5460,7 +5571,7 @@ CM_Modify_Res_Des( _Out_ PRES_DES prdResDes, _In_ RES_DES rdResDes, _In_ RESOURCEID ResourceID, - _In_ PCVOID ResourceData, + _In_reads_bytes_(ResourceLen) PCVOID ResourceData, _In_ ULONG ResourceLen, _In_ ULONG ulFlags) { @@ -5482,12 +5593,12 @@ CM_Modify_Res_Des_Ex( _Out_ PRES_DES prdResDes, _In_ RES_DES rdResDes, _In_ RESOURCEID ResourceID, - _In_ PCVOID ResourceData, + _In_reads_bytes_(ResourceLen) PCVOID ResourceData, _In_ ULONG ResourceLen, _In_ ULONG ulFlags, _In_opt_ HMACHINE hMachine) { - FIXME("CM_Modify_Res_Des_Ex(%p %p %lx %p %lu %lx %lx)\n", + FIXME("CM_Modify_Res_Des_Ex(%p %p %lx %p %lu %lx %p)\n", prdResDes, rdResDes, ResourceID, ResourceData, ResourceLen, ulFlags, hMachine); @@ -5529,7 +5640,7 @@ CM_Move_DevNode_Ex( LPWSTR lpToDevInst; CONFIGRET ret; - FIXME("CM_Move_DevNode_Ex(%lx %lx %lx %lx)\n", + FIXME("CM_Move_DevNode_Ex(%lx %lx %lx %p)\n", dnFromDevInst, dnToDevInst, ulFlags, hMachine); if (!pSetupIsUserAdmin()) @@ -5615,7 +5726,7 @@ CM_Open_Class_KeyA( _In_ ULONG ulFlags) { TRACE("CM_Open_Class_KeyA(%p %s %lx %lx %p %lx)\n", - debugstr_guid(pClassGuid), pszClassName, + debugstr_guid(pClassGuid), debugstr_a(pszClassName), samDesired, Disposition, phkClass, ulFlags); return CM_Open_Class_Key_ExA(pClassGuid, pszClassName, samDesired, @@ -5662,8 +5773,8 @@ CM_Open_Class_Key_ExA( LPWSTR pszClassNameW = NULL; CONFIGRET ret; - TRACE("CM_Open_Class_Key_ExA(%p %s %lx %lx %p %lx %lx)\n", - debugstr_guid(pClassGuid), pszClassName, + TRACE("CM_Open_Class_Key_ExA(%p %s %lx %lx %p %lx %p)\n", + debugstr_guid(pClassGuid), debugstr_a(pszClassName), samDesired, Disposition, phkClass, ulFlags, hMachine); if (pszClassName != NULL) @@ -5702,7 +5813,7 @@ CM_Open_Class_Key_ExW( DWORD dwError; HKEY hKey; - TRACE("CM_Open_Class_Key_ExW(%p %s %lx %lx %p %lx %lx)\n", + TRACE("CM_Open_Class_Key_ExW(%p %s %lx %lx %p %lx %p)\n", debugstr_guid(pClassGuid), debugstr_w(pszClassName), samDesired, Disposition, phkClass, ulFlags, hMachine); @@ -5828,7 +5939,7 @@ CM_Open_DevNode_Key_Ex( HKEY hRootKey = NULL; CONFIGRET ret = CR_CALL_NOT_IMPLEMENTED; - TRACE("CM_Open_DevNode_Key_Ex(%lx %lx %lu %lx %p %lx %lx)\n", + TRACE("CM_Open_DevNode_Key_Ex(%lx %lx %lu %lx %p %lx %p)\n", dnDevNode, samDesired, ulHardwareProfile, Disposition, phkDevice, ulFlags, hMachine); if (phkDevice == NULL) @@ -6010,7 +6121,7 @@ CM_Query_And_Remove_SubTree_ExA( LPWSTR lpLocalVetoName; CONFIGRET ret; - TRACE("CM_Query_And_Remove_SubTree_ExA(%lx %p %s %lu %lx %lx)\n", + TRACE("CM_Query_And_Remove_SubTree_ExA(%lx %p %s %lu %lx %p)\n", dnAncestor, pVetoType, debugstr_a(pszVetoName), ulNameLength, ulFlags, hMachine); @@ -6060,7 +6171,7 @@ CM_Query_And_Remove_SubTree_ExW( LPWSTR lpDevInst; CONFIGRET ret; - TRACE("CM_Query_And_Remove_SubTree_ExW(%lx %p %s %lu %lx %lx)\n", + TRACE("CM_Query_And_Remove_SubTree_ExW(%lx %p %s %lu %lx %p)\n", dnAncestor, pVetoType, debugstr_w(pszVetoName), ulNameLength, ulFlags, hMachine); @@ -6317,7 +6428,7 @@ CM_Query_Remove_SubTree_Ex( _In_ ULONG ulFlags, _In_opt_ HMACHINE hMachine) { - TRACE("CM_Query_Remove_SubTree_Ex(%lx %lx %lx)\n", + TRACE("CM_Query_Remove_SubTree_Ex(%lx %lx %p)\n", dnAncestor, ulFlags, hMachine); return CR_CALL_NOT_IMPLEMENTED; @@ -6354,7 +6465,7 @@ CM_Reenumerate_DevNode_Ex( LPWSTR lpDevInst; CONFIGRET ret; - FIXME("CM_Reenumerate_DevNode_Ex(%lx %lx %lx)\n", + FIXME("CM_Reenumerate_DevNode_Ex(%lx %lx %p)\n", dnDevInst, ulFlags, hMachine); if (dnDevInst == 0) @@ -6401,14 +6512,97 @@ CM_Reenumerate_DevNode_Ex( } +/*********************************************************************** + * CM_Register_Device_Driver [SETUPAPI.@] + */ +CONFIGRET +WINAPI +CM_Register_Device_Driver( + _In_ DEVINST dnDevInst, + _In_ ULONG ulFlags) +{ + TRACE("CM_Register_Device_Driver(%lx 0x%08lx)\n", + dnDevInst, ulFlags); + + return CM_Register_Device_Driver_Ex(dnDevInst, ulFlags, NULL); +} + + +/*********************************************************************** + * CM_Register_Device_Driver_Ex [SETUPAPI.@] + */ +CONFIGRET +WINAPI +CM_Register_Device_Driver_Ex( + _In_ DEVINST dnDevInst, + _In_ ULONG ulFlags, + _In_opt_ HMACHINE hMachine) +{ + RPC_BINDING_HANDLE BindingHandle = NULL; + HSTRING_TABLE StringTable = NULL; + LPWSTR lpDevInst; + CONFIGRET ret; + + TRACE("CM_Register_Device_Driver_Ex(%lx 0x%08lx %p)\n", + dnDevInst, ulFlags, hMachine); + + if (dnDevInst == 0) + return CR_INVALID_DEVNODE; + + if (ulFlags & ~CM_REGISTER_DEVICE_DRIVER_BITS) + return CR_INVALID_FLAG; + + if (hMachine != NULL) + { + BindingHandle = ((PMACHINE_INFO)hMachine)->BindingHandle; + if (BindingHandle == NULL) + return CR_FAILURE; + + StringTable = ((PMACHINE_INFO)hMachine)->StringTable; + if (StringTable == 0) + return CR_FAILURE; + } + else + { + if (!PnpGetLocalHandles(&BindingHandle, &StringTable)) + return CR_FAILURE; + } + + lpDevInst = pSetupStringTableStringFromId(StringTable, dnDevInst); + if (lpDevInst == NULL) + return CR_INVALID_DEVNODE; + + RpcTryExcept + { + ret = PNP_RegisterDriver(BindingHandle, + lpDevInst, + ulFlags); + } + RpcExcept(EXCEPTION_EXECUTE_HANDLER) + { + ret = RpcStatusToCmStatus(RpcExceptionCode()); + } + RpcEndExcept; + + return ret; +} + + /*********************************************************************** * CM_Register_Device_InterfaceA [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Register_Device_InterfaceA( - DEVINST dnDevInst, LPGUID InterfaceClassGuid, LPCSTR pszReference, - LPSTR pszDeviceInterface, PULONG pulLength, ULONG ulFlags) +CONFIGRET +WINAPI +CM_Register_Device_InterfaceA( + _In_ DEVINST dnDevInst, + _In_ LPGUID InterfaceClassGuid, + _In_opt_ LPCSTR pszReference, + _Out_writes_(*pulLength) LPSTR pszDeviceInterface, + _Inout_ PULONG pulLength, + _In_ ULONG ulFlags) { - TRACE("%lx %s %s %p %p %lx\n", dnDevInst, debugstr_guid(InterfaceClassGuid), + TRACE("CM_Register_Device_InterfaceA(%lx %s %s %p %p %lx)\n", + dnDevInst, debugstr_guid(InterfaceClassGuid), pszReference, pszDeviceInterface, pulLength, ulFlags); return CM_Register_Device_Interface_ExA(dnDevInst, InterfaceClassGuid, @@ -6420,11 +6614,18 @@ CONFIGRET WINAPI CM_Register_Device_InterfaceA( /*********************************************************************** * CM_Register_Device_InterfaceW [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Register_Device_InterfaceW( - DEVINST dnDevInst, LPGUID InterfaceClassGuid, LPCWSTR pszReference, - LPWSTR pszDeviceInterface, PULONG pulLength, ULONG ulFlags) +CONFIGRET +WINAPI +CM_Register_Device_InterfaceW( + _In_ DEVINST dnDevInst, + _In_ LPGUID InterfaceClassGuid, + _In_opt_ LPCWSTR pszReference, + _Out_writes_(*pulLength) LPWSTR pszDeviceInterface, + _Inout_ PULONG pulLength, + _In_ ULONG ulFlags) { - TRACE("%lx %s %s %p %p %lx\n", dnDevInst, debugstr_guid(InterfaceClassGuid), + TRACE("CM_Register_Device_InterfaceW(%lx %s %s %p %p %lx)\n", + dnDevInst, debugstr_guid(InterfaceClassGuid), debugstr_w(pszReference), pszDeviceInterface, pulLength, ulFlags); return CM_Register_Device_Interface_ExW(dnDevInst, InterfaceClassGuid, @@ -6436,17 +6637,25 @@ CONFIGRET WINAPI CM_Register_Device_InterfaceW( /*********************************************************************** * CM_Register_Device_Interface_ExA [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Register_Device_Interface_ExA( - DEVINST dnDevInst, LPGUID InterfaceClassGuid, LPCSTR pszReference, - LPSTR pszDeviceInterface, PULONG pulLength, ULONG ulFlags, HMACHINE hMachine) +CONFIGRET +WINAPI +CM_Register_Device_Interface_ExA( + _In_ DEVINST dnDevInst, + _In_ LPGUID InterfaceClassGuid, + _In_opt_ LPCSTR pszReference, + _Out_writes_(*pulLength) LPSTR pszDeviceInterface, + _Inout_ PULONG pulLength, + _In_ ULONG ulFlags, + _In_opt_ HMACHINE hMachine) { LPWSTR pszReferenceW = NULL; LPWSTR pszDeviceInterfaceW = NULL; ULONG ulLength; CONFIGRET ret; - TRACE("%lx %s %s %p %p %lx %lx\n", dnDevInst, debugstr_guid(InterfaceClassGuid), - pszReference, pszDeviceInterface, pulLength, ulFlags, hMachine); + TRACE("CM_Register_Device_Interface_ExA(%lx %s %s %p %p %lx %p)\n", + dnDevInst, debugstr_guid(InterfaceClassGuid), debugstr_a(pszReference), + pszDeviceInterface, pulLength, ulFlags, hMachine); if (pulLength == NULL || pszDeviceInterface == NULL) return CR_INVALID_POINTER; @@ -6502,9 +6711,16 @@ Done: /*********************************************************************** * CM_Register_Device_Interface_ExW [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Register_Device_Interface_ExW( - DEVINST dnDevInst, LPGUID InterfaceClassGuid, LPCWSTR pszReference, - LPWSTR pszDeviceInterface, PULONG pulLength, ULONG ulFlags, HMACHINE hMachine) +CONFIGRET +WINAPI +CM_Register_Device_Interface_ExW( + _In_ DEVINST dnDevInst, + _In_ LPGUID InterfaceClassGuid, + _In_opt_ LPCWSTR pszReference, + _Out_writes_(*pulLength) LPWSTR pszDeviceInterface, + _Inout_ PULONG pulLength, + _In_ ULONG ulFlags, + _In_opt_ HMACHINE hMachine) { RPC_BINDING_HANDLE BindingHandle = NULL; HSTRING_TABLE StringTable = NULL; @@ -6512,8 +6728,9 @@ CONFIGRET WINAPI CM_Register_Device_Interface_ExW( ULONG ulTransferLength; CONFIGRET ret; - TRACE("%lx %s %s %p %p %lx %lx\n", dnDevInst, debugstr_guid(InterfaceClassGuid), - debugstr_w(pszReference), pszDeviceInterface, pulLength, ulFlags, hMachine); + TRACE("CM_Register_Device_Interface_ExW(%lx %s %s %p %p %lx %p)\n", + dnDevInst, debugstr_guid(InterfaceClassGuid), debugstr_w(pszReference), + pszDeviceInterface, pulLength, ulFlags, hMachine); if (dnDevInst == 0) return CR_INVALID_DEVNODE; @@ -6569,81 +6786,20 @@ CONFIGRET WINAPI CM_Register_Device_Interface_ExW( } -/*********************************************************************** - * CM_Register_Device_Driver [SETUPAPI.@] - */ -CONFIGRET WINAPI CM_Register_Device_Driver( - DEVINST dnDevInst, ULONG ulFlags) -{ - TRACE("%lx 0x%08lx\n", dnDevInst, ulFlags); - return CM_Register_Device_Driver_Ex(dnDevInst, ulFlags, NULL); -} - - -/*********************************************************************** - * CM_Register_Device_Driver [SETUPAPI.@] - */ -CONFIGRET WINAPI CM_Register_Device_Driver_Ex( - DEVINST dnDevInst, ULONG ulFlags, HMACHINE hMachine) -{ - RPC_BINDING_HANDLE BindingHandle = NULL; - HSTRING_TABLE StringTable = NULL; - LPWSTR lpDevInst; - CONFIGRET ret; - - TRACE("%lx 0x%08lx %p\n", dnDevInst, ulFlags, hMachine); - - if (dnDevInst == 0) - return CR_INVALID_DEVNODE; - - if (ulFlags & ~CM_REGISTER_DEVICE_DRIVER_BITS) - return CR_INVALID_FLAG; - - if (hMachine != NULL) - { - BindingHandle = ((PMACHINE_INFO)hMachine)->BindingHandle; - if (BindingHandle == NULL) - return CR_FAILURE; - - StringTable = ((PMACHINE_INFO)hMachine)->StringTable; - if (StringTable == 0) - return CR_FAILURE; - } - else - { - if (!PnpGetLocalHandles(&BindingHandle, &StringTable)) - return CR_FAILURE; - } - - lpDevInst = pSetupStringTableStringFromId(StringTable, dnDevInst); - if (lpDevInst == NULL) - return CR_INVALID_DEVNODE; - - RpcTryExcept - { - ret = PNP_RegisterDriver(BindingHandle, - lpDevInst, - ulFlags); - } - RpcExcept(EXCEPTION_EXECUTE_HANDLER) - { - ret = RpcStatusToCmStatus(RpcExceptionCode()); - } - RpcEndExcept; - - return ret; -} - - /*********************************************************************** * CM_Remove_SubTree [SETUPAPI.@] * * This function is obsolete in Windows XP and above. */ -CONFIGRET WINAPI CM_Remove_SubTree( - DEVINST dnAncestor, ULONG ulFlags) +CONFIGRET +WINAPI +CM_Remove_SubTree( + _In_ DEVINST dnAncestor, + _In_ ULONG ulFlags) { - TRACE("%lx %lx\n", dnAncestor, ulFlags); + TRACE("CM_Remove_SubTree(%lx %lx)\n", + dnAncestor, ulFlags); + return CR_CALL_NOT_IMPLEMENTED; } @@ -6653,10 +6809,16 @@ CONFIGRET WINAPI CM_Remove_SubTree( * * This function is obsolete in Windows XP and above. */ -CONFIGRET WINAPI CM_Remove_SubTree_Ex( - DEVINST dnAncestor, ULONG ulFlags, HMACHINE hMachine) +CONFIGRET +WINAPI +CM_Remove_SubTree_Ex( + _In_ DEVINST dnAncestor, + _In_ ULONG ulFlags, + _In_opt_ HMACHINE hMachine) { - TRACE("%lx %lx %lx\n", dnAncestor, ulFlags, hMachine); + TRACE("CM_Remove_SubTree_Ex(%lx %lx %p)\n", + dnAncestor, ulFlags, hMachine); + return CR_CALL_NOT_IMPLEMENTED; } @@ -6664,12 +6826,18 @@ CONFIGRET WINAPI CM_Remove_SubTree_Ex( /*********************************************************************** * CM_Request_Device_EjectA [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Request_Device_EjectA( - DEVINST dnDevInst, PPNP_VETO_TYPE pVetoType, LPSTR pszVetoName, - ULONG ulNameLength, ULONG ulFlags) +CONFIGRET +WINAPI +CM_Request_Device_EjectA( + _In_ DEVINST dnDevInst, + _Out_opt_ PPNP_VETO_TYPE pVetoType, + _Out_writes_opt_(ulNameLength) LPSTR pszVetoName, + _In_ ULONG ulNameLength, + _In_ ULONG ulFlags) { - TRACE("%lx %p %s %lu %lx\n", dnDevInst, pVetoType, pszVetoName, - ulNameLength, ulFlags); + TRACE("CM_Request_Device_EjectA(%lx %p %s %lu %lx)\n", + dnDevInst, pVetoType, debugstr_a(pszVetoName), ulNameLength, ulFlags); + return CM_Request_Device_Eject_ExA(dnDevInst, pVetoType, pszVetoName, ulNameLength, ulFlags, NULL); } @@ -6678,12 +6846,18 @@ CONFIGRET WINAPI CM_Request_Device_EjectA( /*********************************************************************** * CM_Request_Device_EjectW [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Request_Device_EjectW( - DEVINST dnDevInst, PPNP_VETO_TYPE pVetoType, LPWSTR pszVetoName, - ULONG ulNameLength, ULONG ulFlags) +CONFIGRET +WINAPI +CM_Request_Device_EjectW( + _In_ DEVINST dnDevInst, + _Out_opt_ PPNP_VETO_TYPE pVetoType, + _Out_writes_opt_(ulNameLength) LPWSTR pszVetoName, + _In_ ULONG ulNameLength, + _In_ ULONG ulFlags) { - TRACE("%lx %p %s %lu %lx\n", dnDevInst, pVetoType, debugstr_w(pszVetoName), - ulNameLength, ulFlags); + TRACE("CM_Request_Device_EjectW(%lx %p %s %lu %lx)\n", + dnDevInst, pVetoType, debugstr_w(pszVetoName), ulNameLength, ulFlags); + return CM_Request_Device_Eject_ExW(dnDevInst, pVetoType, pszVetoName, ulNameLength, ulFlags, NULL); } @@ -6692,15 +6866,21 @@ CONFIGRET WINAPI CM_Request_Device_EjectW( /*********************************************************************** * CM_Request_Device_Eject_ExA [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Request_Device_Eject_ExA( - DEVINST dnDevInst, PPNP_VETO_TYPE pVetoType, LPSTR pszVetoName, - ULONG ulNameLength, ULONG ulFlags, HMACHINE hMachine) +CONFIGRET +WINAPI +CM_Request_Device_Eject_ExA( + _In_ DEVINST dnDevInst, + _Out_opt_ PPNP_VETO_TYPE pVetoType, + _Out_writes_opt_(ulNameLength) LPSTR pszVetoName, + _In_ ULONG ulNameLength, + _In_ ULONG ulFlags, + _In_opt_ HMACHINE hMachine) { LPWSTR lpLocalVetoName; CONFIGRET ret; - TRACE("%lx %p %s %lu %lx %lx\n", dnDevInst, pVetoType, pszVetoName, - ulNameLength, ulFlags, hMachine); + TRACE("CM_Request_Device_Eject_ExA(%lx %p %s %lu %lx %p)\n", + dnDevInst, pVetoType, debugstr_a(pszVetoName), ulNameLength, ulFlags, hMachine); if (pszVetoName == NULL && ulNameLength == 0) return CR_INVALID_POINTER; @@ -6733,17 +6913,23 @@ CONFIGRET WINAPI CM_Request_Device_Eject_ExA( /*********************************************************************** * CM_Request_Device_Eject_ExW [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Request_Device_Eject_ExW( - DEVINST dnDevInst, PPNP_VETO_TYPE pVetoType, LPWSTR pszVetoName, - ULONG ulNameLength, ULONG ulFlags, HMACHINE hMachine) +CONFIGRET +WINAPI +CM_Request_Device_Eject_ExW( + _In_ DEVINST dnDevInst, + _Out_opt_ PPNP_VETO_TYPE pVetoType, + _Out_writes_opt_(ulNameLength) LPWSTR pszVetoName, + _In_ ULONG ulNameLength, + _In_ ULONG ulFlags, + _In_opt_ HMACHINE hMachine) { RPC_BINDING_HANDLE BindingHandle = NULL; HSTRING_TABLE StringTable = NULL; LPWSTR lpDevInst; CONFIGRET ret; - TRACE("%lx %p %s %lu %lx %lx\n", dnDevInst, pVetoType, - debugstr_w(pszVetoName), ulNameLength, ulFlags, hMachine); + TRACE("CM_Request_Device_Eject_ExW(%lx %p %s %lu %lx %p)\n", + dnDevInst, pVetoType, debugstr_w(pszVetoName), ulNameLength, ulFlags, hMachine); if (dnDevInst == 0) return CR_INVALID_DEVNODE; @@ -6796,9 +6982,12 @@ CONFIGRET WINAPI CM_Request_Device_Eject_ExW( /*********************************************************************** * CM_Request_Eject_PC [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Request_Eject_PC(VOID) +CONFIGRET +WINAPI +CM_Request_Eject_PC(VOID) { - TRACE("\n"); + TRACE("CM_Request_Eject_PC()\n"); + return CM_Request_Eject_PC_Ex(NULL); } @@ -6806,13 +6995,15 @@ CONFIGRET WINAPI CM_Request_Eject_PC(VOID) /*********************************************************************** * CM_Request_Eject_PC_Ex [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Request_Eject_PC_Ex( - HMACHINE hMachine) +CONFIGRET +WINAPI +CM_Request_Eject_PC_Ex( + _In_opt_ HMACHINE hMachine) { RPC_BINDING_HANDLE BindingHandle = NULL; CONFIGRET ret; - TRACE("%lx\n", hMachine); + TRACE("CM_Request_Eject_PC_Ex(%p)\n", hMachine); if (hMachine != NULL) { @@ -6843,10 +7034,13 @@ CONFIGRET WINAPI CM_Request_Eject_PC_Ex( /*********************************************************************** * CM_Run_Detection [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Run_Detection( - ULONG ulFlags) +CONFIGRET +WINAPI +CM_Run_Detection( + _In_ ULONG ulFlags) { - TRACE("%lx\n", ulFlags); + TRACE("CM_Run_Detection(%lx)\n", ulFlags); + return CM_Run_Detection_Ex(ulFlags, NULL); } @@ -6854,13 +7048,17 @@ CONFIGRET WINAPI CM_Run_Detection( /*********************************************************************** * CM_Run_Detection_Ex [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Run_Detection_Ex( - ULONG ulFlags, HMACHINE hMachine) +CONFIGRET +WINAPI +CM_Run_Detection_Ex( + _In_ ULONG ulFlags, + _In_opt_ HMACHINE hMachine) { RPC_BINDING_HANDLE BindingHandle = NULL; CONFIGRET ret; - TRACE("%lx %lx\n", ulFlags, hMachine); + TRACE("CM_Run_Detection_Ex(%lx %p)\n", + ulFlags, hMachine); if (!pSetupIsUserAdmin()) return CR_ACCESS_DENIED; @@ -6898,12 +7096,19 @@ CONFIGRET WINAPI CM_Run_Detection_Ex( /*********************************************************************** * CM_Set_Class_Registry_PropertyA [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Set_Class_Registry_PropertyA( - LPGUID ClassGuid, ULONG ulProperty, PCVOID Buffer, ULONG ulLength, - ULONG ulFlags, HMACHINE hMachine) +CONFIGRET +WINAPI +CM_Set_Class_Registry_PropertyA( + _In_ LPGUID ClassGuid, + _In_ ULONG ulProperty, + _In_reads_bytes_opt_(ulLength) PCVOID Buffer, + _In_ ULONG ulLength, + _In_ ULONG ulFlags, + _In_opt_ HMACHINE hMachine) { - FIXME("%p %lx %p %lu %lx %p\n", + FIXME("CM_Set_Class_Registry_PropertyA(%p %lx %p %lu %lx %p)\n", ClassGuid, ulProperty, Buffer, ulLength, ulFlags, hMachine); + return CR_CALL_NOT_IMPLEMENTED; } @@ -6911,12 +7116,19 @@ CONFIGRET WINAPI CM_Set_Class_Registry_PropertyA( /*********************************************************************** * CM_Set_Class_Registry_PropertyW [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Set_Class_Registry_PropertyW( - LPGUID ClassGuid, ULONG ulProperty, PCVOID Buffer, ULONG ulLength, - ULONG ulFlags, HMACHINE hMachine) +CONFIGRET +WINAPI +CM_Set_Class_Registry_PropertyW( + _In_ LPGUID ClassGuid, + _In_ ULONG ulProperty, + _In_reads_bytes_opt_(ulLength) PCVOID Buffer, + _In_ ULONG ulLength, + _In_ ULONG ulFlags, + _In_opt_ HMACHINE hMachine) { - FIXME("%p %lx %p %lu %lx %p\n", + FIXME("CM_Set_Class_Registry_PropertyW(%p %lx %p %lu %lx %p)\n", ClassGuid, ulProperty, Buffer, ulLength, ulFlags, hMachine); + return CR_CALL_NOT_IMPLEMENTED; } @@ -6924,10 +7136,16 @@ CONFIGRET WINAPI CM_Set_Class_Registry_PropertyW( /*********************************************************************** * CM_Set_DevNode_Problem [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Set_DevNode_Problem( - DEVINST dnDevInst, ULONG ulProblem, ULONG ulFlags) +CONFIGRET +WINAPI +CM_Set_DevNode_Problem( + _In_ DEVINST dnDevInst, + _In_ ULONG ulProblem, + _In_ ULONG ulFlags) { - TRACE("%lx %lx %lx\n", dnDevInst, ulProblem, ulFlags); + TRACE("CM_Set_DevNode_Problem(%lx %lx %lx)\n", + dnDevInst, ulProblem, ulFlags); + return CM_Set_DevNode_Problem_Ex(dnDevInst, ulProblem, ulFlags, NULL); } @@ -6935,15 +7153,21 @@ CONFIGRET WINAPI CM_Set_DevNode_Problem( /*********************************************************************** * CM_Set_DevNode_Problem_Ex [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Set_DevNode_Problem_Ex( - DEVINST dnDevInst, ULONG ulProblem, ULONG ulFlags, HMACHINE hMachine) +CONFIGRET +WINAPI +CM_Set_DevNode_Problem_Ex( + _In_ DEVINST dnDevInst, + _In_ ULONG ulProblem, + _In_ ULONG ulFlags, + _In_opt_ HMACHINE hMachine) { RPC_BINDING_HANDLE BindingHandle = NULL; HSTRING_TABLE StringTable = NULL; LPWSTR lpDevInst; CONFIGRET ret; - TRACE("%lx %lx %lx %lx\n", dnDevInst, ulProblem, ulFlags, hMachine); + TRACE("CM_Set_DevNode_Problem_Ex(%lx %lx %lx %p)\n", + dnDevInst, ulProblem, ulFlags, hMachine); if (dnDevInst == 0) return CR_INVALID_DEVNODE; @@ -6991,12 +7215,18 @@ CONFIGRET WINAPI CM_Set_DevNode_Problem_Ex( /*********************************************************************** * CM_Set_DevNode_Registry_PropertyA [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Set_DevNode_Registry_PropertyA( - DEVINST dnDevInst, ULONG ulProperty, PCVOID Buffer, ULONG ulLength, - ULONG ulFlags) +CONFIGRET +WINAPI +CM_Set_DevNode_Registry_PropertyA( + _In_ DEVINST dnDevInst, + _In_ ULONG ulProperty, + _In_reads_bytes_opt_(ulLength) PCVOID Buffer, + _In_ ULONG ulLength, + _In_ ULONG ulFlags) { - TRACE("%lx %lu %p %lx %lx\n", + TRACE("CM_Set_DevNode_Registry_PropertyA(%lx %lu %p %lx %lx)\n", dnDevInst, ulProperty, Buffer, ulLength, ulFlags); + return CM_Set_DevNode_Registry_Property_ExA(dnDevInst, ulProperty, Buffer, ulLength, ulFlags, NULL); @@ -7006,12 +7236,18 @@ CONFIGRET WINAPI CM_Set_DevNode_Registry_PropertyA( /*********************************************************************** * CM_Set_DevNode_Registry_PropertyW [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Set_DevNode_Registry_PropertyW( - DEVINST dnDevInst, ULONG ulProperty, PCVOID Buffer, ULONG ulLength, - ULONG ulFlags) +CONFIGRET +WINAPI +CM_Set_DevNode_Registry_PropertyW( + _In_ DEVINST dnDevInst, + _In_ ULONG ulProperty, + _In_reads_bytes_opt_(ulLength) PCVOID Buffer, + _In_ ULONG ulLength, + _In_ ULONG ulFlags) { - TRACE("%lx %lu %p %lx %lx\n", + TRACE("CM_Set_DevNode_Registry_PropertyW(%lx %lu %p %lx %lx)\n", dnDevInst, ulProperty, Buffer, ulLength, ulFlags); + return CM_Set_DevNode_Registry_Property_ExW(dnDevInst, ulProperty, Buffer, ulLength, ulFlags, NULL); @@ -7021,15 +7257,21 @@ CONFIGRET WINAPI CM_Set_DevNode_Registry_PropertyW( /*********************************************************************** * CM_Set_DevNode_Registry_Property_ExA [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Set_DevNode_Registry_Property_ExA( - DEVINST dnDevInst, ULONG ulProperty, PCVOID Buffer, ULONG ulLength, - ULONG ulFlags, HMACHINE hMachine) +CONFIGRET +WINAPI +CM_Set_DevNode_Registry_Property_ExA( + _In_ DEVINST dnDevInst, + _In_ ULONG ulProperty, + _In_reads_bytes_opt_(ulLength) PCVOID Buffer, + _In_ ULONG ulLength, + _In_ ULONG ulFlags, + _In_opt_ HMACHINE hMachine) { CONFIGRET ret = CR_SUCCESS; LPWSTR lpBuffer; ULONG ulType; - FIXME("%lx %lu %p %lx %lx %lx\n", + FIXME("CM_Set_DevNode_Registry_Property_ExA(%lx %lu %p %lx %lx %p)\n", dnDevInst, ulProperty, Buffer, ulLength, ulFlags, hMachine); if (Buffer == NULL && ulLength != 0) @@ -7101,9 +7343,15 @@ CONFIGRET WINAPI CM_Set_DevNode_Registry_Property_ExA( /*********************************************************************** * CM_Set_DevNode_Registry_Property_ExW [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Set_DevNode_Registry_Property_ExW( - DEVINST dnDevInst, ULONG ulProperty, PCVOID Buffer, ULONG ulLength, - ULONG ulFlags, HMACHINE hMachine) +CONFIGRET +WINAPI +CM_Set_DevNode_Registry_Property_ExW( + _In_ DEVINST dnDevInst, + _In_ ULONG ulProperty, + _In_reads_bytes_opt_(ulLength) PCVOID Buffer, + _In_ ULONG ulLength, + _In_ ULONG ulFlags, + _In_opt_ HMACHINE hMachine) { RPC_BINDING_HANDLE BindingHandle = NULL; HSTRING_TABLE StringTable = NULL; @@ -7111,7 +7359,7 @@ CONFIGRET WINAPI CM_Set_DevNode_Registry_Property_ExW( ULONG ulType; CONFIGRET ret; - TRACE("%lx %lu %p %lx %lx %lx\n", + TRACE("CM_Set_DevNode_Registry_Property_ExW(%lx %lu %p %lx %lx %p)\n", dnDevInst, ulProperty, Buffer, ulLength, ulFlags, hMachine); if (dnDevInst == 0) @@ -7172,10 +7420,15 @@ CONFIGRET WINAPI CM_Set_DevNode_Registry_Property_ExW( /*********************************************************************** * CM_Set_HW_Prof [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Set_HW_Prof( - ULONG ulHardwareProfile, ULONG ulFlags) +CONFIGRET +WINAPI +CM_Set_HW_Prof( + _In_ ULONG ulHardwareProfile, + _In_ ULONG ulFlags) { - TRACE("%lu %lu\n", ulHardwareProfile, ulFlags); + TRACE("CM_Set_HW_Prof(%lu %lx)\n", + ulHardwareProfile, ulFlags); + return CM_Set_HW_Prof_Ex(ulHardwareProfile, ulFlags, NULL); } @@ -7183,13 +7436,18 @@ CONFIGRET WINAPI CM_Set_HW_Prof( /*********************************************************************** * CM_Set_HW_Prof_Ex [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Set_HW_Prof_Ex( - ULONG ulHardwareProfile, ULONG ulFlags, HMACHINE hMachine) +CONFIGRET +WINAPI +CM_Set_HW_Prof_Ex( + _In_ ULONG ulHardwareProfile, + _In_ ULONG ulFlags, + _In_opt_ HMACHINE hMachine) { RPC_BINDING_HANDLE BindingHandle = NULL; CONFIGRET ret; - TRACE("%lu %lu %lx\n", ulHardwareProfile, ulFlags, hMachine); + TRACE("CM_Set_HW_Prof_Ex(%lu %lx %p)\n", + ulHardwareProfile, ulFlags, hMachine); if (!pSetupIsUserAdmin()) return CR_ACCESS_DENIED; @@ -7226,12 +7484,17 @@ CONFIGRET WINAPI CM_Set_HW_Prof_Ex( /*********************************************************************** * CM_Set_HW_Prof_FlagsA [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Set_HW_Prof_FlagsA( - DEVINSTID_A szDevInstName, ULONG ulConfig, ULONG ulValue, - ULONG ulFlags) +CONFIGRET +WINAPI +CM_Set_HW_Prof_FlagsA( + _In_ DEVINSTID_A szDevInstName, + _In_ ULONG ulConfig, + _In_ ULONG ulValue, + _In_ ULONG ulFlags) { - TRACE("%s %lu %lu %lx\n", szDevInstName, - ulConfig, ulValue, ulFlags); + TRACE("CM_Set_HW_Prof_FlagsA(%s %lu %lu %lx)\n", + debugstr_a(szDevInstName), ulConfig, ulValue, ulFlags); + return CM_Set_HW_Prof_Flags_ExA(szDevInstName, ulConfig, ulValue, ulFlags, NULL); } @@ -7240,12 +7503,17 @@ CONFIGRET WINAPI CM_Set_HW_Prof_FlagsA( /*********************************************************************** * CM_Set_HW_Prof_FlagsW [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Set_HW_Prof_FlagsW( - DEVINSTID_W szDevInstName, ULONG ulConfig, ULONG ulValue, - ULONG ulFlags) +CONFIGRET +WINAPI +CM_Set_HW_Prof_FlagsW( + _In_ DEVINSTID_W szDevInstName, + _In_ ULONG ulConfig, + _In_ ULONG ulValue, + _In_ ULONG ulFlags) { - TRACE("%s %lu %lu %lx\n", debugstr_w(szDevInstName), - ulConfig, ulValue, ulFlags); + TRACE("CM_Set_HW_Prof_FlagsW(%s %lu %lu %lx)\n", + debugstr_w(szDevInstName), ulConfig, ulValue, ulFlags); + return CM_Set_HW_Prof_Flags_ExW(szDevInstName, ulConfig, ulValue, ulFlags, NULL); } @@ -7254,15 +7522,20 @@ CONFIGRET WINAPI CM_Set_HW_Prof_FlagsW( /*********************************************************************** * CM_Set_HW_Prof_Flags_ExA [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Set_HW_Prof_Flags_ExA( - DEVINSTID_A szDevInstName, ULONG ulConfig, ULONG ulValue, - ULONG ulFlags, HMACHINE hMachine) +CONFIGRET +WINAPI +CM_Set_HW_Prof_Flags_ExA( + _In_ DEVINSTID_A szDevInstName, + _In_ ULONG ulConfig, + _In_ ULONG ulValue, + _In_ ULONG ulFlags, + _In_opt_ HMACHINE hMachine) { DEVINSTID_W pszDevIdW = NULL; CONFIGRET ret = CR_SUCCESS; - TRACE("%s %lu %lu %lx %lx\n", szDevInstName, - ulConfig, ulValue, ulFlags, hMachine); + TRACE("CM_Set_HW_Prof_Flags_ExA(%s %lu %lu %lx %p)\n", + debugstr_a(szDevInstName), ulConfig, ulValue, ulFlags, hMachine); if (szDevInstName != NULL) { @@ -7283,15 +7556,20 @@ CONFIGRET WINAPI CM_Set_HW_Prof_Flags_ExA( /*********************************************************************** * CM_Set_HW_Prof_Flags_ExW [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Set_HW_Prof_Flags_ExW( - DEVINSTID_W szDevInstName, ULONG ulConfig, ULONG ulValue, - ULONG ulFlags, HMACHINE hMachine) +CONFIGRET +WINAPI +CM_Set_HW_Prof_Flags_ExW( + _In_ DEVINSTID_W szDevInstName, + _In_ ULONG ulConfig, + _In_ ULONG ulValue, + _In_ ULONG ulFlags, + _In_opt_ HMACHINE hMachine) { RPC_BINDING_HANDLE BindingHandle = NULL; CONFIGRET ret; - FIXME("%s %lu %lu %lx %lx\n", debugstr_w(szDevInstName), - ulConfig, ulValue, ulFlags, hMachine); + FIXME("CM_Set_HW_Prof_Flags_ExW(%s %lu %lu %lx %p)\n", + debugstr_w(szDevInstName), ulConfig, ulValue, ulFlags, hMachine); if (szDevInstName == NULL) return CR_INVALID_POINTER; @@ -7331,10 +7609,15 @@ CONFIGRET WINAPI CM_Set_HW_Prof_Flags_ExW( /*********************************************************************** * CM_Setup_DevNode [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Setup_DevNode( - DEVINST dnDevInst, ULONG ulFlags) +CONFIGRET +WINAPI +CM_Setup_DevNode( + _In_ DEVINST dnDevInst, + _In_ ULONG ulFlags) { - TRACE("%lx %lx\n", dnDevInst, ulFlags); + TRACE("CM_Setup_DevNode(%lx %lx)\n", + dnDevInst, ulFlags); + return CM_Setup_DevNode_Ex(dnDevInst, ulFlags, NULL); } @@ -7342,15 +7625,20 @@ CONFIGRET WINAPI CM_Setup_DevNode( /*********************************************************************** * CM_Setup_DevNode_Ex [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Setup_DevNode_Ex( - DEVINST dnDevInst, ULONG ulFlags, HMACHINE hMachine) +CONFIGRET +WINAPI +CM_Setup_DevNode_Ex( + _In_ DEVINST dnDevInst, + _In_ ULONG ulFlags, + _In_opt_ HMACHINE hMachine) { RPC_BINDING_HANDLE BindingHandle = NULL; HSTRING_TABLE StringTable = NULL; LPWSTR lpDevInst; CONFIGRET ret; - FIXME("%lx %lx %lx\n", dnDevInst, ulFlags, hMachine); + FIXME("CM_Setup_DevNode_Ex(%lx %lx %p)\n", + dnDevInst, ulFlags, hMachine); if (!pSetupIsUserAdmin()) return CR_ACCESS_DENIED; @@ -7419,10 +7707,15 @@ CM_Test_Range_Available( /*********************************************************************** * CM_Uninstall_DevNode [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Uninstall_DevNode( - DEVINST dnPhantom, ULONG ulFlags) +CONFIGRET +WINAPI +CM_Uninstall_DevNode( + _In_ DEVINST dnPhantom, + _In_ ULONG ulFlags) { - TRACE("%lx %lx\n", dnPhantom, ulFlags); + TRACE("CM_Uninstall_DevNode(%lx %lx)\n", + dnPhantom, ulFlags); + return CM_Uninstall_DevNode_Ex(dnPhantom, ulFlags, NULL); } @@ -7430,15 +7723,20 @@ CONFIGRET WINAPI CM_Uninstall_DevNode( /*********************************************************************** * CM_Uninstall_DevNode_Ex [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Uninstall_DevNode_Ex( - DEVINST dnPhantom, ULONG ulFlags, HMACHINE hMachine) +CONFIGRET +WINAPI +CM_Uninstall_DevNode_Ex( + _In_ DEVINST dnPhantom, + _In_ ULONG ulFlags, + _In_opt_ HMACHINE hMachine) { RPC_BINDING_HANDLE BindingHandle = NULL; HSTRING_TABLE StringTable = NULL; LPWSTR lpDevInst; CONFIGRET ret; - TRACE("%lx %lx %lx\n", dnPhantom, ulFlags, hMachine); + TRACE("CM_Uninstall_DevNode_Ex(%lx %lx %p)\n", + dnPhantom, ulFlags, hMachine); if (dnPhantom == 0) return CR_INVALID_DEVNODE; @@ -7485,10 +7783,14 @@ CONFIGRET WINAPI CM_Uninstall_DevNode_Ex( /*********************************************************************** * CM_Unregister_Device_InterfaceA [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Unregister_Device_InterfaceA( - LPCSTR pszDeviceInterface, ULONG ulFlags) +CONFIGRET +WINAPI +CM_Unregister_Device_InterfaceA( + _In_ LPCSTR pszDeviceInterface, + _In_ ULONG ulFlags) { - TRACE("%s %lx\n", pszDeviceInterface, ulFlags); + TRACE("CM_Unregister_Device_InterfaceA(%s %lx)\n", + debugstr_a(pszDeviceInterface), ulFlags); return CM_Unregister_Device_Interface_ExA(pszDeviceInterface, ulFlags, NULL); @@ -7498,10 +7800,14 @@ CONFIGRET WINAPI CM_Unregister_Device_InterfaceA( /*********************************************************************** * CM_Unregister_Device_InterfaceW [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Unregister_Device_InterfaceW( - LPCWSTR pszDeviceInterface, ULONG ulFlags) +CONFIGRET +WINAPI +CM_Unregister_Device_InterfaceW( + _In_ LPCWSTR pszDeviceInterface, + _In_ ULONG ulFlags) { - TRACE("%s %lx\n", debugstr_w(pszDeviceInterface), ulFlags); + TRACE("CM_Unregister_Device_InterfaceW(%s %lx)\n", + debugstr_w(pszDeviceInterface), ulFlags); return CM_Unregister_Device_Interface_ExW(pszDeviceInterface, ulFlags, NULL); @@ -7511,13 +7817,18 @@ CONFIGRET WINAPI CM_Unregister_Device_InterfaceW( /*********************************************************************** * CM_Unregister_Device_Interface_ExA [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Unregister_Device_Interface_ExA( - LPCSTR pszDeviceInterface, ULONG ulFlags, HMACHINE hMachine) +CONFIGRET +WINAPI +CM_Unregister_Device_Interface_ExA( + _In_ LPCSTR pszDeviceInterface, + _In_ ULONG ulFlags, + _In_opt_ HMACHINE hMachine) { LPWSTR pszDeviceInterfaceW = NULL; CONFIGRET ret; - TRACE("%s %lx %lx\n", pszDeviceInterface, ulFlags, hMachine); + TRACE("CM_Unregister_Device_Interface_ExA(%s %lx %p)\n", + debugstr_a(pszDeviceInterface), ulFlags, hMachine); if (pszDeviceInterface == NULL) return CR_INVALID_POINTER; @@ -7538,13 +7849,18 @@ CONFIGRET WINAPI CM_Unregister_Device_Interface_ExA( /*********************************************************************** * CM_Unregister_Device_Interface_ExW [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Unregister_Device_Interface_ExW( - LPCWSTR pszDeviceInterface, ULONG ulFlags, HMACHINE hMachine) +CONFIGRET +WINAPI +CM_Unregister_Device_Interface_ExW( + _In_ LPCWSTR pszDeviceInterface, + _In_ ULONG ulFlags, + _In_opt_ HMACHINE hMachine) { RPC_BINDING_HANDLE BindingHandle = NULL; CONFIGRET ret; - TRACE("%s %lx %lx\n", debugstr_w(pszDeviceInterface), ulFlags, hMachine); + TRACE("CM_Unregister_Device_Interface_ExW(%s %lx %p)\n", + debugstr_w(pszDeviceInterface), ulFlags, hMachine); if (pszDeviceInterface == NULL) return CR_INVALID_POINTER;
6 years, 10 months
1
0
0
0
01/01: [PSDK][XDK] Remove DECLSPEC_* from windef.h, protect against redefinition in winnt.h
by Thomas Faber
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b9f88d594d9ec036474a0…
commit b9f88d594d9ec036474a09c6f27a9b9e5c878a18 Author: Thomas Faber <thomas.faber(a)reactos.org> AuthorDate: Sun Feb 4 19:24:00 2018 +0100 Commit: Thomas Faber <thomas.faber(a)reactos.org> CommitDate: Sun Feb 4 19:28:36 2018 +0100 [PSDK][XDK] Remove DECLSPEC_* from windef.h, protect against redefinition in winnt.h --- dll/win32/browseui/browseui.rc | 1 - sdk/include/psdk/windef.h | 23 ----------------------- sdk/include/xdk/ntbasedef.h | 12 ++++++++++-- 3 files changed, 10 insertions(+), 26 deletions(-) diff --git a/dll/win32/browseui/browseui.rc b/dll/win32/browseui/browseui.rc index 030d614112..aa8c3435a9 100644 --- a/dll/win32/browseui/browseui.rc +++ b/dll/win32/browseui/browseui.rc @@ -22,7 +22,6 @@ #define _INC_WINDOWS #define COM_NO_WINDOWS_H #include <shlobj.h> -#undef DECLSPEC_IMPORT #include "resource.h" diff --git a/sdk/include/psdk/windef.h b/sdk/include/psdk/windef.h index 0166f3c832..a456269b55 100644 --- a/sdk/include/psdk/windef.h +++ b/sdk/include/psdk/windef.h @@ -107,29 +107,6 @@ typedef int INT; #define PACKED #endif -#ifdef __GNUC__ -#define DECLSPEC_NORETURN __declspec(noreturn) -#define DECLARE_STDCALL_P( type ) __stdcall type -#elif defined(__WATCOMC__) -#define DECLSPEC_NORETURN -#define DECLARE_STDCALL_P( type ) type __stdcall -#elif defined(_MSC_VER) -#define DECLSPEC_NORETURN __declspec(noreturn) -#define DECLARE_STDCALL_P( type ) type __stdcall -#endif /* __GNUC__/__WATCOMC__ */ - -#define DECLSPEC_IMPORT __declspec(dllimport) -#define DECLSPEC_EXPORT __declspec(dllexport) -#ifndef DECLSPEC_NOINLINE -#if (_MSC_VER >= 1300) -#define DECLSPEC_NOINLINE __declspec(noinline) -#elif defined(__GNUC__) -#define DECLSPEC_NOINLINE __attribute__((noinline)) -#else -#define DECLSPEC_NOINLINE -#endif -#endif - #undef far #undef near #undef pascal diff --git a/sdk/include/xdk/ntbasedef.h b/sdk/include/xdk/ntbasedef.h index a1270d2428..7a1cded3cc 100644 --- a/sdk/include/xdk/ntbasedef.h +++ b/sdk/include/xdk/ntbasedef.h @@ -163,8 +163,16 @@ /* Import and Export Specifiers */ -/* Done the same way as in windef.h for now */ -#define DECLSPEC_IMPORT __declspec(dllimport) // MIDL? +#ifndef DECLSPEC_IMPORT + #define DECLSPEC_IMPORT __declspec(dllimport) // MIDL? +#endif /* DECLSPEC_IMPORT */ + +#ifndef DECLSPEC_EXPORT + #if defined(__REACTOS__) || defined(__WINESRC__) + #define DECLSPEC_EXPORT __declspec(dllexport) + #endif +#endif /* DECLSPEC_EXPORT */ + #define DECLSPEC_NORETURN __declspec(noreturn) #ifndef DECLSPEC_ADDRSAFE
6 years, 10 months
1
0
0
0
01/01: [TRANSLATION] Polish translation update (#357)
by Adam Słaboń
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=0d838f40a3201dc282e50…
commit 0d838f40a3201dc282e500e70b632537cad25cae Author: Adam Słaboń <asaillen456esx(a)gmail.com> AuthorDate: Sun Feb 4 18:45:20 2018 +0100 Commit: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito(a)reactos.org> CommitDate: Sun Feb 4 18:45:20 2018 +0100 [TRANSLATION] Polish translation update (#357) --- base/applications/fontview/lang/pl-PL.rc | 14 +++++++------- base/applications/mmc/lang/pl-PL.rc | 6 +++--- base/applications/mscutils/servman/lang/pl-PL.rc | 6 +++--- base/applications/notepad/lang/pl-PL.rc | 2 +- base/applications/rapps/lang/pl-PL.rc | 14 +++++++------- base/shell/explorer/lang/pl-PL.rc | 2 +- dll/shellext/acppage/lang/pl-PL.rc | 4 ++-- dll/shellext/deskmon/lang/pl-PL.rc | 2 +- 8 files changed, 25 insertions(+), 25 deletions(-) diff --git a/base/applications/fontview/lang/pl-PL.rc b/base/applications/fontview/lang/pl-PL.rc index 68098a0296..a06b32c656 100644 --- a/base/applications/fontview/lang/pl-PL.rc +++ b/base/applications/fontview/lang/pl-PL.rc @@ -18,13 +18,13 @@ BEGIN IDS_ERROR_NOMEM "Brakuje pamięci do ukończenia tej operacji." IDS_ERROR_NOFONT "Plik %1 nie jest poprawnym plikiem czcionki." IDS_ERROR_NOCLASS "Nie udało się zainicjować klasy window." - IDS_FILTER_LIST "All Supported Fonts (*.fon;*.fnt;*.ttf;*.ttc;*.otf;*.otc)\0*.fon;*.fnt;*.ttf;*.ttc;*.otf;*.otc\0\ -Font File (*.fon;*.fnt)\0*.fon;*.fnt\0\ -TrueType Font (*.ttf)\0*.ttf\0\ -TrueType Font Collection (*.ttc)\0*.ttc\0\ -OpenType Font (*.otf)\0*.otf\0\ -OpenType Font Collection (*.otc)\0*.otc\0\ -All Files (*.*)\0*.*\0" + IDS_FILTER_LIST "Wszystkie obsługiwane czcionki (*.fon;*.fnt;*.ttf;*.ttc;*.otf;*.otc)\0*.fon;*.fnt;*.ttf;*.ttc;*.otf;*.otc\0\ +Plik czcionki (*.fon;*.fnt)\0*.fon;*.fnt\0\ +Czcionka TrueType (*.ttf)\0*.ttf\0\ +Kolekcja czcionek TrueType (*.ttc)\0*.ttc\0\ +Czcionka OpenType (*.otf)\0*.otf\0\ +Kolekcja czcionek OpenType (*.otc)\0*.otc\0\ +Wszystkie pliki (*.*)\0*.*\0" IDS_PREVIOUS "< P&oprzednia" IDS_NEXT "&Następna >" END diff --git a/base/applications/mmc/lang/pl-PL.rc b/base/applications/mmc/lang/pl-PL.rc index 04c12fdbbb..e61c718dcc 100644 --- a/base/applications/mmc/lang/pl-PL.rc +++ b/base/applications/mmc/lang/pl-PL.rc @@ -18,7 +18,7 @@ BEGIN END POPUP "Pomo&c" BEGIN - MENUITEM "Konsola Zarządzania ReactOS - i&nformacje", IDM_HELP_ABOUT + MENUITEM "Konsola zarządzania ReactOS - i&nformacje", IDM_HELP_ABOUT END END @@ -39,12 +39,12 @@ BEGIN END POPUP "Pomo&c" BEGIN - MENUITEM "Konsola Zarządzania ReactOS - i&nformacje", IDM_HELP_ABOUT + MENUITEM "Konsola zarządzania ReactOS - i&nformacje", IDM_HELP_ABOUT END END STRINGTABLE BEGIN - IDS_APPTITLE "Konsola Zarządzania ReactOS" + IDS_APPTITLE "Konsola zarządzania ReactOS" IDS_CONSOLETITLE "Konsola%1!u!" END diff --git a/base/applications/mscutils/servman/lang/pl-PL.rc b/base/applications/mscutils/servman/lang/pl-PL.rc index a6e28b3cc3..30a564436c 100644 --- a/base/applications/mscutils/servman/lang/pl-PL.rc +++ b/base/applications/mscutils/servman/lang/pl-PL.rc @@ -74,11 +74,11 @@ BEGIN END IDD_ABOUTBOX DIALOGEX 22, 16, 190, 182 -CAPTION "Menedżer Usług - informacje" +CAPTION "Menedżer usług - informacje" FONT 8, "MS Shell Dlg", 0, 0 STYLE DS_SHELLFONT | WS_BORDER | WS_DLGFRAME | WS_SYSMENU | DS_MODALFRAME BEGIN - LTEXT "Menedżer Usług v0.8\nCopyright (C) 2005-2007\nby Ged Murphy (gedmurphy(a)reactos.org)", IDC_STATIC, 48, 7, 135, 40 + LTEXT "Menedżer usług v0.8\nCopyright (C) 2005-2007\nby Ged Murphy (gedmurphy(a)reactos.org)", IDC_STATIC, 48, 7, 135, 40 PUSHBUTTON "Zamknij", IDOK, 75, 162, 44, 15 ICON IDI_SM_ICON, IDC_STATIC, 10, 10, 7, 30 EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE @@ -336,7 +336,7 @@ END /* Application title */ STRINGTABLE BEGIN - IDS_APPNAME "Menedżer Usług ReactOS" + IDS_APPNAME "Menedżer usług ReactOS" END STRINGTABLE diff --git a/base/applications/notepad/lang/pl-PL.rc b/base/applications/notepad/lang/pl-PL.rc index 87b0e29736..aaad63e436 100644 --- a/base/applications/notepad/lang/pl-PL.rc +++ b/base/applications/notepad/lang/pl-PL.rc @@ -177,5 +177,5 @@ BEGIN STRING_LINE_COLUMN "Linia %d, kolumna %d" STRING_PRINTERROR "Nie można wydrukować pliku '%s'.\n\nUpewnij się, że drukarka jest włączona i poprawnie skonfigurowana." - STRING_TEXT_DOCUMENT "Text Document" + STRING_TEXT_DOCUMENT "Dokument tekstowy" END diff --git a/base/applications/rapps/lang/pl-PL.rc b/base/applications/rapps/lang/pl-PL.rc index 4fb36efac6..2852d4b3c0 100644 --- a/base/applications/rapps/lang/pl-PL.rc +++ b/base/applications/rapps/lang/pl-PL.rc @@ -98,7 +98,7 @@ BEGIN PUSHBUTTON "Anuluj", IDCANCEL, 150, 78, 60, 14 END -IDD_DOWNLOAD_DIALOG DIALOGEX 0, 0, 220, 72 +IDD_DOWNLOAD_DIALOG DIALOGEX 0, 0, 220, 220 STYLE DS_SHELLFONT | DS_CENTER | WS_BORDER | WS_CAPTION | WS_POPUP | WS_SYSMENU | WS_VISIBLE CAPTION "Pobierz %ls…" FONT 8, "MS Shell Dlg" @@ -160,13 +160,13 @@ END STRINGTABLE BEGIN IDS_AINFO_VERSION "\nWersja: " - IDS_AINFO_AVAILABLEVERSION "\nAvailable Version: " + IDS_AINFO_AVAILABLEVERSION "\nDostępna wersja: " IDS_AINFO_DESCRIPTION "\nOpis: " IDS_AINFO_SIZE "\nRozmiar: " IDS_AINFO_URLSITE "\nStrona: " IDS_AINFO_LICENSE "\nLicencja: " IDS_AINFO_URLDOWNLOAD "\nPobieranie: " - IDS_AINFO_LANGUAGES "\nLanguages: " + IDS_AINFO_LANGUAGES "\nJęzyki: " END STRINGTABLE @@ -218,7 +218,7 @@ BEGIN IDS_UNABLE_TO_WRITE "Nie można zapisać na dysku. Dysk może być pełny." IDS_SELECT_ALL "Zaznacz/Odznacz Wszystko" IDS_INSTALL_SELECTED "Instaluj Zaznaczone" - IDS_SELECTEDFORINST "Selected for installation" + IDS_SELECTEDFORINST "Wybrane do instalacji" END STRINGTABLE @@ -228,7 +228,7 @@ BEGIN IDS_STATUS_DOWNLOADED "Pobrane" IDS_STATUS_UPDATE_AVAILABLE "Dostępna aktualizacja" IDS_STATUS_DOWNLOADING "Pobieranie…" - IDS_STATUS_INSTALLING "Instalowanie……" + IDS_STATUS_INSTALLING "Instalowanie…" IDS_STATUS_WAITING "Oczekiwanie na instalację…" IDS_STATUS_FINISHED "Gotowe" END @@ -252,6 +252,6 @@ END STRINGTABLE BEGIN - IDS_DL_DIALOG_DB_DISP "Baza Programów" - IDS_DL_DIALOG_DB_DOWNLOAD_DISP "Aktualizowanie bazy Programów…" + IDS_DL_DIALOG_DB_DISP "Baza programów" + IDS_DL_DIALOG_DB_DOWNLOAD_DISP "Aktualizowanie bazy programów…" END diff --git a/base/shell/explorer/lang/pl-PL.rc b/base/shell/explorer/lang/pl-PL.rc index fc88968a62..062d743656 100644 --- a/base/shell/explorer/lang/pl-PL.rc +++ b/base/shell/explorer/lang/pl-PL.rc @@ -124,7 +124,7 @@ END IDD_CLASSICSTART_CUSTOMIZE DIALOGEX 0, 0, 232, 240, 0 STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_DLGFRAME -CAPTION "Customize Classic Start Menu" +CAPTION "Dostosuj klasyczne menu Start" FONT 8, "MS Shell Dlg" { GROUPBOX "Menu Start", IDC_STATIC, 8, 7, 218, 114 diff --git a/dll/shellext/acppage/lang/pl-PL.rc b/dll/shellext/acppage/lang/pl-PL.rc index 60a6201087..411465f5f7 100644 --- a/dll/shellext/acppage/lang/pl-PL.rc +++ b/dll/shellext/acppage/lang/pl-PL.rc @@ -37,7 +37,7 @@ END STRINGTABLE BEGIN IDS_COMPAT_TITLE "Zgodność" - IDS_FAILED_NETWORK "Nie można ustawić trybu zgodnośći dla tego programu, ponieważ znajduje się na dysku sieciowym." - IDS_FAILED_PROTECTED "Nie można ustawić trybu zgodnośći dla tego programu, ponieważ jest częścią systemu ReactOS." + IDS_FAILED_NETWORK "Nie można ustawić trybu zgodności dla tego programu, ponieważ znajduje się na dysku sieciowym." + IDS_FAILED_PROTECTED "Nie można ustawić trybu zgodności dla tego programu, ponieważ jest częścią systemu ReactOS." IDS_YOU_DID_NOT_ADD "Nie dodałeś trybu zgodności, czy chcesz to zrobić teraz?" END diff --git a/dll/shellext/deskmon/lang/pl-PL.rc b/dll/shellext/deskmon/lang/pl-PL.rc index 8daa32b6ee..c6c14a26e5 100644 --- a/dll/shellext/deskmon/lang/pl-PL.rc +++ b/dll/shellext/deskmon/lang/pl-PL.rc @@ -19,7 +19,7 @@ BEGIN LISTBOX IDC_MONITORLIST, 40, 13, 196, 30, WS_VSCROLL PUSHBUTTON "&Właściwości", IDC_MONITORPROPERTIES, 177, 35, 59, 14, WS_DISABLED GROUPBOX "Ustawienia monitora", IDS_MONITORSETTINGSGROUP, 7, 58, 237, 63 - LTEXT "&Częstotliwośći odświeżania ekranu:", IDS_REFRESHRATELABEL, 13, 73, 225, 8 + LTEXT "&Częstotliwości odświeżania ekranu:", IDS_REFRESHRATELABEL, 13, 73, 225, 8 COMBOBOX IDC_REFRESHRATE, 13, 85, 225, 200, WS_VSCROLL | CBS_DROPDOWNLIST | CBS_SORT AUTOCHECKBOX "&Ukryj tryby, których ten monitor nie może wyświetlić", IDC_PRUNINGCHECK, 13, 106, 225, 10 END
6 years, 10 months
1
0
0
0
02/02: Merge branch 'master' of https://github.com/reactos/reactos
by Alex Ionescu
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=1683934cd8583bb4947c0…
commit 1683934cd8583bb4947c035cd76ae08913053597 Merge: 16e0cca7e1 131678a025 Author: Alex Ionescu <aionescu(a)gmail.com> AuthorDate: Sun Feb 4 09:34:27 2018 -0800 Commit: Alex Ionescu <aionescu(a)gmail.com> CommitDate: Sun Feb 4 09:34:27 2018 -0800 Merge branch 'master' of
https://github.com/reactos/reactos
base/setup/usetup/CMakeLists.txt | 2 +- base/setup/usetup/cabinet.c | 1 + base/shell/explorer/syspager.cpp | 57 +- boot/environ/app/rosload/rosload.c | 2 +- dll/3rdparty/mbedtls/CMakeLists.txt | 1 - dll/shellext/netshell/lanstatusui.cpp | 4 +- dll/shellext/stobject/csystray.cpp | 2 +- dll/shellext/stobject/hotplug.cpp | 3 +- dll/win32/browseui/browseui.rc | 1 + dll/win32/setupapi/cfgmgr.c | 1201 +++++++++++++++++++++++---------- dll/win32/shell32/precomp.h | 5 + dll/win32/shell32/systray.cpp | 217 ++++-- sdk/include/psdk/shellapi.h | 15 +- sdk/include/reactos/undocshell.h | 31 +- 14 files changed, 1071 insertions(+), 471 deletions(-)
6 years, 10 months
1
0
0
0
01/02: [RTL]: Document and flesh out Boot Status Data (BSD) API/Structures
by Alex Ionescu
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=16e0cca7e13efe9a77905…
commit 16e0cca7e13efe9a77905b846a8f92619ff99ec5 Author: Alex Ionescu <aionescu(a)gmail.com> AuthorDate: Sun Feb 4 09:33:32 2018 -0800 Commit: Alex Ionescu <aionescu(a)gmail.com> CommitDate: Sun Feb 4 09:33:32 2018 -0800 [RTL]: Document and flesh out Boot Status Data (BSD) API/Structures [NDK]: Document latest RTL_BSD_DATA as of RS3 based on ext.dll WinDBG extension "!blackboxbsd" which outputs the entire structure field by field :). [NDK]: Update RTL_BSD_ITEM_TYPE thanks to ole32 symbols [RTL]: Move system volume APIs to sysvol.c [RTL]: Fill out BsdItemTable based on actual field offsets/sizes and not hardcoded magic numbers which we won't ask where they came from. [RTL]: Make RtlCreateBootStatusDataFile use an appropriate structure for initializing the buffer instead of "UCHAR Buffer[12] = {0xC,0,0,0, 1,0,0,0, 1, 0x1e, 1, 0};" which appears like magic knowledge. [RTL]: Rename "WriteMode" to "Read" in RtlGetSetBootStatusData since it's much less confusing. [RTL]: Some formatting fixes, SAL updates. --- sdk/include/ndk/rtltypes.h | 100 ++++- sdk/lib/rtl/CMakeLists.txt | 1 + sdk/lib/rtl/bootdata.c | 820 +++++------------------------------ sdk/lib/rtl/{bootdata.c => sysvol.c} | 194 --------- 4 files changed, 213 insertions(+), 902 deletions(-) diff --git a/sdk/include/ndk/rtltypes.h b/sdk/include/ndk/rtltypes.h index 0abde3e0c0..1371f4c86f 100644 --- a/sdk/include/ndk/rtltypes.h +++ b/sdk/include/ndk/rtltypes.h @@ -414,9 +414,6 @@ C_ASSERT(FIELD_OFFSET(LARGE_INTEGER, LowPart) == 0); #define RTL_CONSTANT_LARGE_INTEGER(quad_part) { { (quad_part), (quad_part)>>32 } } #define RTL_MAKE_LARGE_INTEGER(low_part, high_part) { { (low_part), (high_part) } } - -#ifdef NTOS_MODE_USER - // // Boot Status Data Field Types // @@ -428,9 +425,20 @@ typedef enum _RTL_BSD_ITEM_TYPE RtlBsdItemAabTimeout, RtlBsdItemBootGood, RtlBsdItemBootShutdown, + RtlBsdSleepInProgress, + RtlBsdPowerTransition, + RtlBsdItemBootAttemptCount, + RtlBsdItemBootCheckpoint, + RtlBsdItemBootId, + RtlBsdItemShutdownBootId, + RtlBsdItemReportedAbnormalShutdownBootId, + RtlBsdItemErrorInfo, + RtlBsdItemPowerButtonPressInfo, + RtlBsdItemChecksum, RtlBsdItemMax } RTL_BSD_ITEM_TYPE, *PRTL_BSD_ITEM_TYPE; +#ifdef NTOS_MODE_USER // // Table and Compare result types // @@ -1238,6 +1246,92 @@ typedef struct _RTL_HANDLE_TABLE PRTL_HANDLE_TABLE_ENTRY MaxReservedHandles; } RTL_HANDLE_TABLE, *PRTL_HANDLE_TABLE; +// +// RTL Boot Status Data Item +// +typedef struct _RTL_BSD_ITEM +{ + RTL_BSD_ITEM_TYPE Type; + PVOID DataBuffer; + ULONG DataLength; +} RTL_BSD_ITEM, *PRTL_BSD_ITEM; + +// +// Data Sub-Structures for "bootstat.dat" RTL Data File +// +typedef struct _RTL_BSD_DATA_POWER_TRANSITION +{ + LARGE_INTEGER PowerButtonTimestamp; + struct + { + UCHAR SystemRunning : 1; + UCHAR ConnectedStandbyInProgress : 1; + UCHAR UserShutdownInProgress : 1; + UCHAR SystemShutdownInProgress : 1; + UCHAR SleepInProgress : 4; + } Flags; + UCHAR ConnectedStandbyScenarioInstanceId; + UCHAR ConnectedStandbyEntryReason; + UCHAR ConnectedStandbyExitReason; + USHORT SystemSleepTransitionCount; + LARGE_INTEGER LastReferenceTime; + ULONG LastReferenceTimeChecksum; + ULONG LastUpdateBootId; +} RTL_BSD_DATA_POWER_TRANSITION, *PRTL_BSD_DATA_POWER_TRANSITION; + +typedef struct _RTL_BSD_DATA_ERROR_INFO +{ + ULONG BootId; + ULONG RepeatCount; + ULONG OtherErrorCount; + ULONG Code; + ULONG OtherErrorCount2; +} RTL_BSD_DATA_ERROR_INFO, *PRTL_BSD_DATA_ERROR_INFO; + +typedef struct _RTL_BSD_POWER_BUTTON_PRESS_INFO +{ + LARGE_INTEGER LastPressTime; + ULONG CumulativePressCount; + USHORT LastPressBootId; + UCHAR LastPowerWatchdogStage; + struct + { + UCHAR WatchdogArmed : 1; + UCHAR ShutdownInProgress : 1; + } Flags; + LARGE_INTEGER LastReleaseTime; + ULONG CumulativeReleaseCount; + USHORT LastReleaseBootId; + USHORT ErrorCount; + UCHAR CurrentConnectedStandbyPhase; + ULONG TransitionLatestCheckpointId; + ULONG TransitionLatestCheckpointType; + ULONG TransitionLatestCheckpointSequenceNumber; +} RTL_BSD_POWER_BUTTON_PRESS_INFO, *PRTL_BSD_POWER_BUTTON_PRESS_INFO; + +// +// Main Structure for "bootstat.dat" RTL Data File +// +typedef struct _RTL_BSD_DATA +{ + ULONG Version; // RtlBsdItemVersionNumber + ULONG ProductType; // RtlBsdItemProductType + BOOLEAN AabEnabled; // RtlBsdItemAabEnabled + UCHAR AabTimeout; // RtlBsdItemAabTimeout + BOOLEAN LastBootSucceeded; // RtlBsdItemBootGood + BOOLEAN LastBootShutdown; // RtlBsdItemBootShutdown + BOOLEAN SleepInProgress; // RtlBsdSleepInProgress + RTL_BSD_DATA_POWER_TRANSITION PowerTransition; // RtlBsdPowerTransition + UCHAR BootAttemptCount; // RtlBsdItemBootAttemptCount + UCHAR LastBootCheckpoint; // RtlBsdItemBootCheckpoint + UCHAR Checksum; // RtlBsdItemChecksum + ULONG LastBootId; // RtlBsdItemBootId + ULONG LastSuccessfulShutdownBootId; // RtlBsdItemShutdownBootId + ULONG LastReportedAbnormalShutdownBootId; // RtlBsdItemReportedAbnormalShutdownBootId + RTL_BSD_DATA_ERROR_INFO ErrorInfo; // RtlBsdItemErrorInfo + RTL_BSD_POWER_BUTTON_PRESS_INFO PowerButtonPressInfo; // RtlBsdItemPowerButtonPressInfo +} RTL_BSD_DATA, *PRTL_BSD_DATA; + #ifdef NTOS_MODE_USER // // Exception Record diff --git a/sdk/lib/rtl/CMakeLists.txt b/sdk/lib/rtl/CMakeLists.txt index 7279a2e2ea..573e4c0802 100644 --- a/sdk/lib/rtl/CMakeLists.txt +++ b/sdk/lib/rtl/CMakeLists.txt @@ -56,6 +56,7 @@ list(APPEND SOURCE slist.c sid.c splaytree.c + sysvol.c thread.c time.c timezone.c diff --git a/sdk/lib/rtl/bootdata.c b/sdk/lib/rtl/bootdata.c index 77d367426d..b674eb2545 100644 --- a/sdk/lib/rtl/bootdata.c +++ b/sdk/lib/rtl/bootdata.c @@ -1,715 +1,118 @@ /* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * PURPOSE: Boot Data implementation + * PROJECT: ReactOS Runtime Library + * LICENSE: See COPYING in the top level directory * FILE: lib/rtl/bootdata.c - * PROGRAMMERS: + * PURPOSE: Boot Status Data Implementation + * PROGRAMMERS: Alex Ionescu (alex.ionescu(a)reactos.org) + * Eric Kohl */ /* INCLUDES *****************************************************************/ #include <rtl.h> - #define NDEBUG #include <debug.h> -typedef struct _RTL_BSD_ITEM +typedef struct _RTL_BSD_ITEM_TABLE_ENTRY { - ULONG Offset; - ULONG Size; -} RTL_BSD_ITEM, *PRTL_BSD_ITEM; + UCHAR Offset; + UCHAR Size; +} RTL_BSD_ITEM_TABLE_ENTRY; /* FUNCTIONS *****************************************************************/ -static SID_IDENTIFIER_AUTHORITY LocalSystemAuthority = {SECURITY_NT_AUTHORITY}; - -static RTL_BSD_ITEM BsdItemTable[6] = {{0, 4}, {4, 4,}, {8, 1}, {9, 1}, {10, 1}, {11, 1}}; - -static NTSTATUS -RtlpSysVolCreateSecurityDescriptor(OUT PISECURITY_DESCRIPTOR *SecurityDescriptor, - OUT PSID *SystemSid) -{ - PSECURITY_DESCRIPTOR AbsSD = NULL; - PSID LocalSystemSid = NULL; - PACL Dacl = NULL; - ULONG DaclSize; - NTSTATUS Status; - - /* create the local SYSTEM SID */ - Status = RtlAllocateAndInitializeSid(&LocalSystemAuthority, - 1, - SECURITY_LOCAL_SYSTEM_RID, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - &LocalSystemSid); - if (!NT_SUCCESS(Status)) - { - return Status; - } - - /* allocate and initialize the security descriptor */ - AbsSD = RtlpAllocateMemory(sizeof(SECURITY_DESCRIPTOR), - 'dSeS'); - if (AbsSD == NULL) - { - Status = STATUS_NO_MEMORY; - goto Cleanup; - } - - Status = RtlCreateSecurityDescriptor(AbsSD, - SECURITY_DESCRIPTOR_REVISION); - if (!NT_SUCCESS(Status)) - { - goto Cleanup; - } - - /* allocate and create the DACL */ - DaclSize = sizeof(ACL) + sizeof(ACE) + - RtlLengthSid(LocalSystemSid); - Dacl = RtlpAllocateMemory(DaclSize, - 'cAeS'); - if (Dacl == NULL) - { - Status = STATUS_NO_MEMORY; - goto Cleanup; - } - - Status = RtlCreateAcl(Dacl, - DaclSize, - ACL_REVISION); - if (!NT_SUCCESS(Status)) - { - goto Cleanup; - } - - Status = RtlAddAccessAllowedAceEx(Dacl, - ACL_REVISION, - OBJECT_INHERIT_ACE | CONTAINER_INHERIT_ACE, - STANDARD_RIGHTS_ALL | SPECIFIC_RIGHTS_ALL, - LocalSystemSid); - if (!NT_SUCCESS(Status)) - { - goto Cleanup; - } - - /* set the DACL in the security descriptor */ - Status = RtlSetDaclSecurityDescriptor(AbsSD, - TRUE, - Dacl, - FALSE); - - /* all done */ - if (NT_SUCCESS(Status)) - { - *SecurityDescriptor = AbsSD; - *SystemSid = LocalSystemSid; - } - else - { -Cleanup: - if (LocalSystemSid != NULL) - { - RtlFreeSid(LocalSystemSid); - } - - if (Dacl != NULL) - { - RtlpFreeMemory(Dacl, - 'cAeS'); - } - - if (AbsSD != NULL) - { - RtlpFreeMemory(AbsSD, - 'dSeS'); - } - } - - return Status; -} - -static NTSTATUS -RtlpSysVolCheckOwnerAndSecurity(IN HANDLE DirectoryHandle, - IN PISECURITY_DESCRIPTOR SecurityDescriptor) +PRTL_BSD_DATA DummyBsd; +RTL_BSD_ITEM_TABLE_ENTRY BsdItemTable[RtlBsdItemMax] = { - PSECURITY_DESCRIPTOR RelSD = NULL; - PSECURITY_DESCRIPTOR NewRelSD = NULL; - PSECURITY_DESCRIPTOR AbsSD = NULL; -#ifdef _WIN64 - BOOLEAN AbsSDAllocated = FALSE; -#endif - PSID AdminSid = NULL; - PSID LocalSystemSid = NULL; - ULONG DescriptorSize; - ULONG AbsSDSize, RelSDSize = 0; - PACL Dacl; - BOOLEAN DaclPresent, DaclDefaulted; - PSID OwnerSid; - BOOLEAN OwnerDefaulted; - ULONG AceIndex; - PACE Ace = NULL; - NTSTATUS Status; - - /* find out how much memory we need to allocate for the self-relative - descriptor we're querying */ - Status = ZwQuerySecurityObject(DirectoryHandle, - OWNER_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION, - NULL, - 0, - &DescriptorSize); - if (Status != STATUS_BUFFER_TOO_SMALL) - { - /* looks like the FS doesn't support security... return success */ - Status = STATUS_SUCCESS; - goto Cleanup; - } - - /* allocate enough memory for the security descriptor */ - RelSD = RtlpAllocateMemory(DescriptorSize, - 'dSeS'); - if (RelSD == NULL) - { - Status = STATUS_NO_MEMORY; - goto Cleanup; - } - - /* query the self-relative security descriptor */ - Status = ZwQuerySecurityObject(DirectoryHandle, - OWNER_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION, - RelSD, - DescriptorSize, - &DescriptorSize); - if (!NT_SUCCESS(Status)) - { - /* FIXME - handle the case where someone else modified the owner and/or - DACL while we allocated memory. But that should be *very* - unlikely.... */ - goto Cleanup; - } - - /* query the owner and DACL from the descriptor */ - Status = RtlGetOwnerSecurityDescriptor(RelSD, - &OwnerSid, - &OwnerDefaulted); - if (!NT_SUCCESS(Status)) - { - goto Cleanup; - } - - Status = RtlGetDaclSecurityDescriptor(RelSD, - &DaclPresent, - &Dacl, - &DaclDefaulted); - if (!NT_SUCCESS(Status)) - { - goto Cleanup; - } - - /* create the Administrators SID */ - Status = RtlAllocateAndInitializeSid(&LocalSystemAuthority, - 2, - SECURITY_BUILTIN_DOMAIN_RID, - DOMAIN_ALIAS_RID_ADMINS, - 0, - 0, - 0, - 0, - 0, - 0, - &AdminSid); - if (!NT_SUCCESS(Status)) - { - goto Cleanup; - } - - /* create the local SYSTEM SID */ - Status = RtlAllocateAndInitializeSid(&LocalSystemAuthority, - 1, - SECURITY_LOCAL_SYSTEM_RID, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - &LocalSystemSid); - if (!NT_SUCCESS(Status)) - { - goto Cleanup; - } - - /* check if the Administrators are the owner and at least a not-NULL DACL - is present */ - if (OwnerSid != NULL && - RtlEqualSid(OwnerSid, - AdminSid) && - DaclPresent && Dacl != NULL) - { - /* check the DACL for an Allowed ACE for the SYSTEM account */ - AceIndex = 0; - do - { - Status = RtlGetAce(Dacl, - AceIndex++, - (PVOID*)&Ace); - if (!NT_SUCCESS(Status)) - { - Ace = NULL; - } - else if (Ace != NULL && Ace->Header.AceType == ACCESS_ALLOWED_ACE_TYPE) - { - /* check if the the ACE is a set of allowed permissions for the - local SYSTEM account */ - if (RtlEqualSid((PSID)(Ace + 1), - LocalSystemSid)) - { - /* check if the ACE is inherited by noncontainer and - container objects, if not attempt to change that */ - if (!(Ace->Header.AceFlags & OBJECT_INHERIT_ACE) || - !(Ace->Header.AceFlags & CONTAINER_INHERIT_ACE)) - { - Ace->Header.AceFlags |= OBJECT_INHERIT_ACE | CONTAINER_INHERIT_ACE; - Status = ZwSetSecurityObject(DirectoryHandle, - DACL_SECURITY_INFORMATION, - RelSD); - } - else - { - /* all done, we have access */ - Status = STATUS_SUCCESS; - } - - goto Cleanup; - } - } - } while (Ace != NULL); - } - - AbsSDSize = DescriptorSize; - - /* because we need to change any existing data we need to convert it to - an absolute security descriptor first */ - Status = RtlSelfRelativeToAbsoluteSD2(RelSD, - &AbsSDSize); -#ifdef _WIN64 - if (Status == STATUS_BUFFER_TOO_SMALL) - { - /* this error code can only be returned on 64 bit builds because - the size of an absolute security descriptor is greater than the - size of a self-relative security descriptor */ - ASSERT(AbsSDSize > DescriptorSize); - - AbsSD = RtlpAllocateMemory(DescriptorSize, - 'dSeS'); - if (AbsSD == NULL) - { - Status = STATUS_NO_MEMORY; - goto Cleanup; - } - - AbsSDAllocated = TRUE; - - /* make a raw copy of the self-relative descriptor */ - RtlCopyMemory(AbsSD, - RelSD, - DescriptorSize); - - /* finally convert it */ - Status = RtlSelfRelativeToAbsoluteSD2(AbsSD, - &AbsSDSize); - } - else -#endif - { - AbsSD = RelSD; - } - - if (!NT_SUCCESS(Status)) - { - goto Cleanup; - } - - /* set the owner SID */ - Status = RtlSetOwnerSecurityDescriptor(AbsSD, - AdminSid, - FALSE); - if (!NT_SUCCESS(Status)) - { - goto Cleanup; - } - - /* set the DACL in the security descriptor */ - Status = RtlSetDaclSecurityDescriptor(AbsSD, - TRUE, - SecurityDescriptor->Dacl, - FALSE); - if (!NT_SUCCESS(Status)) - { - goto Cleanup; - } - - /* convert it back to a self-relative descriptor, find out how much - memory we need */ - Status = RtlAbsoluteToSelfRelativeSD(AbsSD, - NULL, - &RelSDSize); - if (Status != STATUS_BUFFER_TOO_SMALL) - { - goto Cleanup; - } - - /* allocate enough memory for the new self-relative descriptor */ - NewRelSD = RtlpAllocateMemory(RelSDSize, - 'dSeS'); - if (NewRelSD == NULL) - { - Status = STATUS_NO_MEMORY; - goto Cleanup; - } - - /* convert the security descriptor to self-relative format */ - Status = RtlAbsoluteToSelfRelativeSD(AbsSD, - NewRelSD, - &RelSDSize); - if (Status == STATUS_BUFFER_TOO_SMALL) - { - goto Cleanup; - } - - /* finally attempt to change the security information */ - Status = ZwSetSecurityObject(DirectoryHandle, - OWNER_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION, - NewRelSD); - -Cleanup: - if (AdminSid != NULL) { - RtlFreeSid(AdminSid); - } - - if (LocalSystemSid != NULL) + FIELD_OFFSET(RTL_BSD_DATA, Version), + sizeof(&DummyBsd->Version) + }, // RtlBsdItemVersionNumber { - RtlFreeSid(LocalSystemSid); - } - - if (RelSD != NULL) + FIELD_OFFSET(RTL_BSD_DATA, ProductType), + sizeof(&DummyBsd->ProductType) + }, // RtlBsdItemProductType { - RtlpFreeMemory(RelSD, - 'dSeS'); - } - - if (NewRelSD != NULL) + FIELD_OFFSET(RTL_BSD_DATA, AabEnabled), + sizeof(&DummyBsd->AabEnabled) + }, // RtlBsdItemAabEnabled { - RtlpFreeMemory(NewRelSD, - 'dSeS'); - } - -#ifdef _WIN64 - if (AbsSDAllocated) + FIELD_OFFSET(RTL_BSD_DATA, AabTimeout), + sizeof(&DummyBsd->AabTimeout) + }, // RtlBsdItemAabTimeout { - RtlpFreeMemory(AbsSD, - 'dSeS'); - } -#endif - - return Status; -} - -static NTSTATUS -RtlpSysVolTakeOwnership(IN PUNICODE_STRING DirectoryPath, - IN PSECURITY_DESCRIPTOR SecurityDescriptor) -{ - TOKEN_PRIVILEGES TokenPrivileges; - OBJECT_ATTRIBUTES ObjectAttributes; - SECURITY_DESCRIPTOR AbsSD; - PSID AdminSid = NULL; - IO_STATUS_BLOCK IoStatusBlock; - BOOLEAN TokenEnabled = FALSE; - HANDLE hToken = NULL; - HANDLE hDirectory = NULL; - NTSTATUS Status; - ULONG ReturnLength; - - Status = ZwOpenProcessToken(NtCurrentProcess(), - TOKEN_QUERY | TOKEN_ADJUST_PRIVILEGES, - &hToken); - if (!NT_SUCCESS(Status)) + FIELD_OFFSET(RTL_BSD_DATA, LastBootSucceeded), + sizeof(&DummyBsd->LastBootSucceeded) + }, // RtlBsdItemBootGood { - goto Cleanup; - } - - /* attempt to enable the SE_TAKE_OWNERSHIP_PRIVILEGE privilege */ - TokenPrivileges.PrivilegeCount = 1; - TokenPrivileges.Privileges[0].Luid.LowPart = SE_TAKE_OWNERSHIP_PRIVILEGE; - TokenPrivileges.Privileges[0].Luid.HighPart = 0; - TokenPrivileges.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED; - Status = ZwAdjustPrivilegesToken(hToken, - FALSE, - &TokenPrivileges, - sizeof(TokenPrivileges), - &TokenPrivileges, - &ReturnLength); - if (!NT_SUCCESS(Status)) + FIELD_OFFSET(RTL_BSD_DATA, LastBootShutdown), + sizeof(&DummyBsd->LastBootShutdown) + }, // RtlBsdItemBootShutdown { - goto Cleanup; - } - TokenEnabled = (TokenPrivileges.PrivilegeCount != 0); - - /* open the directory */ - InitializeObjectAttributes(&ObjectAttributes, - DirectoryPath, - 0, - NULL, - SecurityDescriptor); - - Status = ZwOpenFile(&hDirectory, - SYNCHRONIZE | WRITE_OWNER, - &ObjectAttributes, - &IoStatusBlock, - FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, - FILE_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_NONALERT); - if (!NT_SUCCESS(Status)) + FIELD_OFFSET(RTL_BSD_DATA, SleepInProgress), + sizeof(&DummyBsd->SleepInProgress) + }, // RtlBsdSleepInProgress { - goto Cleanup; - } - - /* create the Administrators SID */ - Status = RtlAllocateAndInitializeSid(&LocalSystemAuthority, - 2, - SECURITY_BUILTIN_DOMAIN_RID, - DOMAIN_ALIAS_RID_ADMINS, - 0, - 0, - 0, - 0, - 0, - 0, - &AdminSid); - if (!NT_SUCCESS(Status)) + FIELD_OFFSET(RTL_BSD_DATA, PowerTransition), + sizeof(&DummyBsd->PowerTransition) + }, // RtlBsdPowerTransition { - goto Cleanup; - } - - /* create the security descriptor */ - Status = RtlCreateSecurityDescriptor(&AbsSD, - SECURITY_DESCRIPTOR_REVISION); - if (!NT_SUCCESS(Status)) + FIELD_OFFSET(RTL_BSD_DATA, BootAttemptCount), + sizeof(&DummyBsd->BootAttemptCount) + }, // RtlBsdItemBootAttemptCount { - goto Cleanup; - } - - Status = RtlSetOwnerSecurityDescriptor(&AbsSD, - AdminSid, - FALSE); - if (!NT_SUCCESS(Status)) + FIELD_OFFSET(RTL_BSD_DATA, LastBootCheckpoint), + sizeof(&DummyBsd->LastBootCheckpoint) + }, // RtlBsdItemBootCheckpoint { - goto Cleanup; - } - - /* attempt to take ownership */ - Status = ZwSetSecurityObject(hDirectory, - OWNER_SECURITY_INFORMATION, - &AbsSD); - -Cleanup: - if (TokenEnabled) + FIELD_OFFSET(RTL_BSD_DATA, LastBootId), + sizeof(&DummyBsd->LastBootId) + }, // RtlBsdItemBootId { - ZwAdjustPrivilegesToken(hToken, - FALSE, - &TokenPrivileges, - 0, - NULL, - NULL); - } - - if (AdminSid != NULL) + FIELD_OFFSET(RTL_BSD_DATA, LastSuccessfulShutdownBootId), + sizeof(&DummyBsd->LastSuccessfulShutdownBootId) + }, // RtlBsdItemShutdownBootId { - RtlFreeSid(AdminSid); - } - - if (hDirectory != NULL) + FIELD_OFFSET(RTL_BSD_DATA, LastReportedAbnormalShutdownBootId), + sizeof(&DummyBsd->LastReportedAbnormalShutdownBootId) + }, // RtlBsdItemReportedAbnormalShutdownBootId { - ZwClose(hDirectory); - } - - if (hToken != NULL) + FIELD_OFFSET(RTL_BSD_DATA, ErrorInfo), + sizeof(&DummyBsd->ErrorInfo) + }, // RtlBsdItemErrorInfo { - ZwClose(hToken); - } - - return Status; -} - -/* -* @implemented -*/ -NTSTATUS -NTAPI -RtlCreateSystemVolumeInformationFolder(IN PUNICODE_STRING VolumeRootPath) -{ - OBJECT_ATTRIBUTES ObjectAttributes; - IO_STATUS_BLOCK IoStatusBlock; - HANDLE hDirectory; - UNICODE_STRING DirectoryName, NewPath; - ULONG PathLen; - PISECURITY_DESCRIPTOR SecurityDescriptor = NULL; - PSID SystemSid = NULL; - BOOLEAN AddSep = FALSE; - NTSTATUS Status; - - PAGED_CODE_RTL(); - - RtlInitUnicodeString(&DirectoryName, - L"System Volume Information"); - - PathLen = VolumeRootPath->Length + DirectoryName.Length; - - /* make sure we don't overflow while appending the strings */ - if (PathLen > 0xFFFC) - { - return STATUS_INVALID_PARAMETER; - } - - if (VolumeRootPath->Buffer[(VolumeRootPath->Length / sizeof(WCHAR)) - 1] != L'\\') - { - AddSep = TRUE; - PathLen += sizeof(WCHAR); - } - - /* allocate the new string */ - NewPath.MaximumLength = (USHORT)PathLen + sizeof(WCHAR); - NewPath.Buffer = RtlpAllocateStringMemory(NewPath.MaximumLength, - TAG_USTR); - if (NewPath.Buffer == NULL) - { - return STATUS_INSUFFICIENT_RESOURCES; - } - - /* create the new path string */ - NewPath.Length = VolumeRootPath->Length; - RtlCopyMemory(NewPath.Buffer, - VolumeRootPath->Buffer, - NewPath.Length); - if (AddSep) - { - NewPath.Buffer[NewPath.Length / sizeof(WCHAR)] = L'\\'; - NewPath.Length += sizeof(WCHAR); - } - RtlCopyMemory(NewPath.Buffer + (NewPath.Length / sizeof(WCHAR)), - DirectoryName.Buffer, - DirectoryName.Length); - NewPath.Length += DirectoryName.Length; - NewPath.Buffer[NewPath.Length / sizeof(WCHAR)] = L'\0'; - - ASSERT(NewPath.Length == PathLen); - ASSERT(NewPath.Length == NewPath.MaximumLength - sizeof(WCHAR)); - - /* create the security descriptor for the new directory */ - Status = RtlpSysVolCreateSecurityDescriptor(&SecurityDescriptor, - &SystemSid); - if (NT_SUCCESS(Status)) + FIELD_OFFSET(RTL_BSD_DATA, PowerButtonPressInfo), + sizeof(&DummyBsd->PowerButtonPressInfo) + }, // RtlBsdItemPowerButtonPressInfo { - /* create or open the directory */ - InitializeObjectAttributes(&ObjectAttributes, - &NewPath, - 0, - NULL, - SecurityDescriptor); - - Status = ZwCreateFile(&hDirectory, - SYNCHRONIZE | WRITE_OWNER | WRITE_DAC | READ_CONTROL, - &ObjectAttributes, - &IoStatusBlock, - NULL, - FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN, - FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, - FILE_OPEN_IF, - FILE_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_NONALERT, - NULL, - 0); - if (!NT_SUCCESS(Status)) - { - Status = RtlpSysVolTakeOwnership(&NewPath, - SecurityDescriptor); - - if (NT_SUCCESS(Status)) - { - /* successfully took ownership, attempt to open it */ - Status = ZwCreateFile(&hDirectory, - SYNCHRONIZE | WRITE_OWNER | WRITE_DAC | READ_CONTROL, - &ObjectAttributes, - &IoStatusBlock, - NULL, - FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN, - FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, - FILE_OPEN_IF, - FILE_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_NONALERT, - NULL, - 0); - } - } - - if (NT_SUCCESS(Status)) - { - /* check security now and adjust it if neccessary */ - Status = RtlpSysVolCheckOwnerAndSecurity(hDirectory, - SecurityDescriptor); - ZwClose(hDirectory); - } - - /* free allocated memory */ - ASSERT(SecurityDescriptor != NULL); - ASSERT(SecurityDescriptor->Dacl != NULL); - - RtlpFreeMemory(SecurityDescriptor->Dacl, - 'cAeS'); - RtlpFreeMemory(SecurityDescriptor, - 'dSeS'); - - RtlFreeSid(SystemSid); - } - - RtlpFreeStringMemory(NewPath.Buffer, - TAG_USTR); - return Status; -} + FIELD_OFFSET(RTL_BSD_DATA, Checksum), + sizeof(&DummyBsd->Checksum) + }, // RtlBsdItemChecksum +}; /* -* @implemented -*/ + * @implemented + */ NTSTATUS NTAPI -RtlCreateBootStatusDataFile(VOID) +RtlCreateBootStatusDataFile ( + VOID + ) { - OBJECT_ATTRIBUTES ObjectAttributes; IO_STATUS_BLOCK IoStatusBlock; LARGE_INTEGER AllocationSize; LARGE_INTEGER ByteOffset; - UNICODE_STRING FileName; + UNICODE_STRING FileName = + RTL_CONSTANT_STRING(L"\\SystemRoot\\bootstat.dat"); + OBJECT_ATTRIBUTES ObjectAttributes = + RTL_CONSTANT_OBJECT_ATTRIBUTES(&FileName, OBJ_CASE_INSENSITIVE); HANDLE FileHandle; NTSTATUS Status; + RTL_BSD_DATA InitialBsd; - /* Initialize the file name */ - RtlInitUnicodeString(&FileName, - L"\\SystemRoot\\bootstat.dat"); - - /* Initialize the object attributes */ - InitializeObjectAttributes(&ObjectAttributes, - &FileName, - OBJ_CASE_INSENSITIVE, - NULL, - NULL); - + /* Create the boot status data file */ AllocationSize.QuadPart = 0x800; DBG_UNREFERENCED_LOCAL_VARIABLE(AllocationSize); - - /* Create the boot status data file */ Status = ZwCreateFile(&FileHandle, FILE_GENERIC_READ | FILE_GENERIC_WRITE, &ObjectAttributes, @@ -723,17 +126,23 @@ RtlCreateBootStatusDataFile(VOID) 0); if (NT_SUCCESS(Status)) { - // FIXME: Initialize the buffer in a better way. - UCHAR Buffer[12] = {0xC,0,0,0, 1,0,0,0, 1, 0x1e, 1, 0}; + /* Setup a sane looking initial BSD */ + RtlZeroMemory(&InitialBsd, sizeof(InitialBsd)); + InitialBsd.Version = sizeof(InitialBsd); + InitialBsd.ProductType = NtProductWinNt; + InitialBsd.AabEnabled = 1; + InitialBsd.AabTimeout = 30; + InitialBsd.LastBootSucceeded = TRUE; + /* Write it to disk */ ByteOffset.QuadPart = 0; Status = ZwWriteFile(FileHandle, NULL, NULL, NULL, &IoStatusBlock, - &Buffer, - 12, //BufferSize, + &InitialBsd, + sizeof(InitialBsd), &ByteOffset, NULL); } @@ -745,34 +154,40 @@ RtlCreateBootStatusDataFile(VOID) } /* -* @implemented -*/ + * @implemented + */ NTSTATUS NTAPI -RtlGetSetBootStatusData(IN HANDLE FileHandle, - IN BOOLEAN WriteMode, - IN RTL_BSD_ITEM_TYPE DataClass, - IN PVOID Buffer, - IN ULONG BufferSize, - OUT PULONG ReturnLength) +RtlGetSetBootStatusData ( + _In_ HANDLE FileHandle, + _In_ BOOLEAN Read, + _In_ RTL_BSD_ITEM_TYPE DataClass, + _In_ PVOID Buffer, + _In_ ULONG BufferSize, + _Out_opt_ PULONG ReturnLength + ) { IO_STATUS_BLOCK IoStatusBlock; LARGE_INTEGER ByteOffset; NTSTATUS Status; DPRINT("RtlGetSetBootStatusData (%p %u %d %p %lu %p)\n", - FileHandle, WriteMode, DataClass, Buffer, BufferSize, ReturnLength); + FileHandle, Read, DataClass, Buffer, BufferSize, ReturnLength); if (DataClass >= RtlBsdItemMax) + { return STATUS_INVALID_PARAMETER; + } if (BufferSize > BsdItemTable[DataClass].Size) + { return STATUS_BUFFER_TOO_SMALL; + } ByteOffset.HighPart = 0; ByteOffset.LowPart = BsdItemTable[DataClass].Offset; - if (WriteMode) + if (Read) { Status = ZwReadFile(FileHandle, NULL, @@ -800,39 +215,34 @@ RtlGetSetBootStatusData(IN HANDLE FileHandle, if (NT_SUCCESS(Status)) { if (ReturnLength) + { *ReturnLength = BsdItemTable[DataClass].Size; + } } return Status; } /* -* @implemented -*/ + * @implemented + */ NTSTATUS NTAPI -RtlLockBootStatusData(OUT PHANDLE FileHandle) +RtlLockBootStatusData ( + _Out_ PHANDLE FileHandle + ) { - OBJECT_ATTRIBUTES ObjectAttributes; - IO_STATUS_BLOCK IoStatusBlock; - UNICODE_STRING FileName; + UNICODE_STRING FileName = + RTL_CONSTANT_STRING(L"\\SystemRoot\\bootstat.dat"); + OBJECT_ATTRIBUTES ObjectAttributes = + RTL_CONSTANT_OBJECT_ATTRIBUTES(&FileName, OBJ_CASE_INSENSITIVE); HANDLE LocalFileHandle; NTSTATUS Status; + IO_STATUS_BLOCK IoStatusBlock; /* Intialize the file handle */ *FileHandle = NULL; - /* Initialize the file name */ - RtlInitUnicodeString(&FileName, - L"\\SystemRoot\\bootstat.dat"); - - /* Initialize the object attributes */ - InitializeObjectAttributes(&ObjectAttributes, - &FileName, - 0, - NULL, - NULL); - /* Open the boot status data file */ Status = ZwOpenFile(&LocalFileHandle, FILE_ALL_ACCESS, @@ -850,18 +260,18 @@ RtlLockBootStatusData(OUT PHANDLE FileHandle) } /* -* @implemented -*/ + * @implemented + */ NTSTATUS NTAPI -RtlUnlockBootStatusData(IN HANDLE FileHandle) +RtlUnlockBootStatusData ( + _In_ HANDLE FileHandle + ) { IO_STATUS_BLOCK IoStatusBlock; /* Flush the file and close it */ - ZwFlushBuffersFile(FileHandle, - &IoStatusBlock); - + ZwFlushBuffersFile(FileHandle, &IoStatusBlock); return ZwClose(FileHandle); } diff --git a/sdk/lib/rtl/bootdata.c b/sdk/lib/rtl/sysvol.c similarity index 80% copy from sdk/lib/rtl/bootdata.c copy to sdk/lib/rtl/sysvol.c index 77d367426d..67c79df065 100644 --- a/sdk/lib/rtl/bootdata.c +++ b/sdk/lib/rtl/sysvol.c @@ -9,22 +9,13 @@ /* INCLUDES *****************************************************************/ #include <rtl.h> - #define NDEBUG #include <debug.h> -typedef struct _RTL_BSD_ITEM -{ - ULONG Offset; - ULONG Size; -} RTL_BSD_ITEM, *PRTL_BSD_ITEM; - /* FUNCTIONS *****************************************************************/ static SID_IDENTIFIER_AUTHORITY LocalSystemAuthority = {SECURITY_NT_AUTHORITY}; -static RTL_BSD_ITEM BsdItemTable[6] = {{0, 4}, {4, 4,}, {8, 1}, {9, 1}, {10, 1}, {11, 1}}; - static NTSTATUS RtlpSysVolCreateSecurityDescriptor(OUT PISECURITY_DESCRIPTOR *SecurityDescriptor, OUT PSID *SystemSid) @@ -680,189 +671,4 @@ RtlCreateSystemVolumeInformationFolder(IN PUNICODE_STRING VolumeRootPath) return Status; } -/* -* @implemented -*/ -NTSTATUS -NTAPI -RtlCreateBootStatusDataFile(VOID) -{ - OBJECT_ATTRIBUTES ObjectAttributes; - IO_STATUS_BLOCK IoStatusBlock; - LARGE_INTEGER AllocationSize; - LARGE_INTEGER ByteOffset; - UNICODE_STRING FileName; - HANDLE FileHandle; - NTSTATUS Status; - - /* Initialize the file name */ - RtlInitUnicodeString(&FileName, - L"\\SystemRoot\\bootstat.dat"); - - /* Initialize the object attributes */ - InitializeObjectAttributes(&ObjectAttributes, - &FileName, - OBJ_CASE_INSENSITIVE, - NULL, - NULL); - - AllocationSize.QuadPart = 0x800; - DBG_UNREFERENCED_LOCAL_VARIABLE(AllocationSize); - - /* Create the boot status data file */ - Status = ZwCreateFile(&FileHandle, - FILE_GENERIC_READ | FILE_GENERIC_WRITE, - &ObjectAttributes, - &IoStatusBlock, - NULL, //&AllocationSize, - FILE_ATTRIBUTE_SYSTEM, - 0, - FILE_CREATE, - FILE_SYNCHRONOUS_IO_NONALERT, - NULL, - 0); - if (NT_SUCCESS(Status)) - { - // FIXME: Initialize the buffer in a better way. - UCHAR Buffer[12] = {0xC,0,0,0, 1,0,0,0, 1, 0x1e, 1, 0}; - - ByteOffset.QuadPart = 0; - Status = ZwWriteFile(FileHandle, - NULL, - NULL, - NULL, - &IoStatusBlock, - &Buffer, - 12, //BufferSize, - &ByteOffset, - NULL); - } - - /* Close the file */ - ZwClose(FileHandle); - - return Status; -} - -/* -* @implemented -*/ -NTSTATUS -NTAPI -RtlGetSetBootStatusData(IN HANDLE FileHandle, - IN BOOLEAN WriteMode, - IN RTL_BSD_ITEM_TYPE DataClass, - IN PVOID Buffer, - IN ULONG BufferSize, - OUT PULONG ReturnLength) -{ - IO_STATUS_BLOCK IoStatusBlock; - LARGE_INTEGER ByteOffset; - NTSTATUS Status; - - DPRINT("RtlGetSetBootStatusData (%p %u %d %p %lu %p)\n", - FileHandle, WriteMode, DataClass, Buffer, BufferSize, ReturnLength); - - if (DataClass >= RtlBsdItemMax) - return STATUS_INVALID_PARAMETER; - - if (BufferSize > BsdItemTable[DataClass].Size) - return STATUS_BUFFER_TOO_SMALL; - - ByteOffset.HighPart = 0; - ByteOffset.LowPart = BsdItemTable[DataClass].Offset; - - if (WriteMode) - { - Status = ZwReadFile(FileHandle, - NULL, - NULL, - NULL, - &IoStatusBlock, - Buffer, - BufferSize, - &ByteOffset, - NULL); - } - else - { - Status = ZwWriteFile(FileHandle, - NULL, - NULL, - NULL, - &IoStatusBlock, - Buffer, - BufferSize, - &ByteOffset, - NULL); - } - - if (NT_SUCCESS(Status)) - { - if (ReturnLength) - *ReturnLength = BsdItemTable[DataClass].Size; - } - - return Status; -} - -/* -* @implemented -*/ -NTSTATUS -NTAPI -RtlLockBootStatusData(OUT PHANDLE FileHandle) -{ - OBJECT_ATTRIBUTES ObjectAttributes; - IO_STATUS_BLOCK IoStatusBlock; - UNICODE_STRING FileName; - HANDLE LocalFileHandle; - NTSTATUS Status; - - /* Intialize the file handle */ - *FileHandle = NULL; - - /* Initialize the file name */ - RtlInitUnicodeString(&FileName, - L"\\SystemRoot\\bootstat.dat"); - - /* Initialize the object attributes */ - InitializeObjectAttributes(&ObjectAttributes, - &FileName, - 0, - NULL, - NULL); - - /* Open the boot status data file */ - Status = ZwOpenFile(&LocalFileHandle, - FILE_ALL_ACCESS, - &ObjectAttributes, - &IoStatusBlock, - 0, - FILE_SYNCHRONOUS_IO_NONALERT); - if (NT_SUCCESS(Status)) - { - /* Return the file handle */ - *FileHandle = LocalFileHandle; - } - - return Status; -} - -/* -* @implemented -*/ -NTSTATUS -NTAPI -RtlUnlockBootStatusData(IN HANDLE FileHandle) -{ - IO_STATUS_BLOCK IoStatusBlock; - - /* Flush the file and close it */ - ZwFlushBuffersFile(FileHandle, - &IoStatusBlock); - - return ZwClose(FileHandle); -} - /* EOF */
6 years, 10 months
1
0
0
0
04/04: [SHELL32] Rewrite the wrapping code for shell taskbar notifications.
by Hermès Bélusca-Maïto
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=131678a025601690d655e…
commit 131678a025601690d655e35ad4b968c1b98297c7 Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> AuthorDate: Sun Feb 4 18:02:41 2018 +0100 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Sun Feb 4 18:11:50 2018 +0100 [SHELL32] Rewrite the wrapping code for shell taskbar notifications. - Introduce the TRAYNOTIFYDATAW structure, as documented by Geoff Chappell in "WM_COPYDATA for Taskbar Interface", at
http://www.geoffchappell.com/studies/windows/shell/shell32/api/shlnot/copyd…
that is the data structure passed between shell32 and explorer for communicating shell notify icon information. - In Shell_NotifyIcon(), correctly capture the (ANSI and) UNICODE structures provided by the caller, properly taking into account for the different NOTIFYICONDATA structure sizes existing out there. The different strings are now properly null-terminated (especially szTip if it needs to be truncated out), and the flags validated. - Remove the now unneeded "SHELL_NotifyIcon()" helper function. [EXPLORER] Use TRAYNOTIFYDATAW and adjust the callers. --- base/shell/explorer/syspager.cpp | 45 ++++---- dll/win32/shell32/precomp.h | 5 + dll/win32/shell32/systray.cpp | 217 ++++++++++++++++++++++++++------------- sdk/include/reactos/undocshell.h | 31 ++++-- 4 files changed, 193 insertions(+), 105 deletions(-) diff --git a/base/shell/explorer/syspager.cpp b/base/shell/explorer/syspager.cpp index 9ba0f2fc99..32d4b45c6c 100644 --- a/base/shell/explorer/syspager.cpp +++ b/base/shell/explorer/syspager.cpp @@ -21,14 +21,6 @@ #include "precomp.h" -// Data comes from shell32/systray.cpp -> TrayNotifyCDS_Dummy -typedef struct _SYS_PAGER_COPY_DATA -{ - DWORD cookie; - DWORD notify_code; - NOTIFYICONDATA nicon_data; -} SYS_PAGER_COPY_DATA, *PSYS_PAGER_COPY_DATA; - struct InternalIconData : NOTIFYICONDATA { // Must keep a separate copy since the original is unioned with uTimeout. @@ -236,7 +228,7 @@ public: COM_INTERFACE_ENTRY_IID(IID_IOleWindow, IOleWindow) END_COM_MAP() - BOOL NotifyIcon(DWORD notify_code, _In_ CONST NOTIFYICONDATA *iconData); + BOOL NotifyIcon(DWORD dwMessage, _In_ CONST NOTIFYICONDATA *iconData); void GetSize(IN BOOL IsHorizontal, IN PSIZE size); DECLARE_WND_CLASS_EX(szSysPagerWndClass, CS_DBLCLKS, COLOR_3DFACE) @@ -454,22 +446,18 @@ UINT WINAPI CIconWatcher::WatcherThread(_In_opt_ LPVOID lpParam) TRACE("Pid %lu owns a notification icon and has stopped without deleting it. We'll cleanup on its behalf", Icon->ProcessId); - int len = FIELD_OFFSET(SYS_PAGER_COPY_DATA, nicon_data) + Icon->IconData.cbSize; - PSYS_PAGER_COPY_DATA pnotify_data = (PSYS_PAGER_COPY_DATA)new BYTE[len]; - pnotify_data->cookie = 1; - pnotify_data->notify_code = NIM_DELETE; - memcpy(&pnotify_data->nicon_data, &Icon->IconData, Icon->IconData.cbSize); + TRAYNOTIFYDATAW tnid = {0}; + tnid.dwSignature = NI_NOTIFY_SIG; + tnid.dwMessage = NIM_DELETE; + CopyMemory(&tnid.nid, &Icon->IconData, Icon->IconData.cbSize); COPYDATASTRUCT data; data.dwData = 1; - data.cbData = len; - data.lpData = pnotify_data; - - BOOL Success = FALSE; - ::SendMessage(This->m_hwndSysTray, WM_COPYDATA, (WPARAM)&Icon->IconData, (LPARAM)&data); - - delete pnotify_data; + data.cbData = sizeof(tnid); + data.lpData = &tnid; + BOOL Success = ::SendMessage(This->m_hwndSysTray, WM_COPYDATA, + (WPARAM)&Icon->IconData, (LPARAM)&data); if (!Success) { // If we failed to handle the delete message, forcibly remove it @@ -1263,14 +1251,14 @@ LRESULT CSysPagerWnd::OnDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& b return TRUE; } -BOOL CSysPagerWnd::NotifyIcon(DWORD notify_code, _In_ CONST NOTIFYICONDATA *iconData) +BOOL CSysPagerWnd::NotifyIcon(DWORD dwMessage, _In_ CONST NOTIFYICONDATA *iconData) { BOOL ret = FALSE; int VisibleButtonCount = Toolbar.GetVisibleButtonCount(); - TRACE("NotifyIcon received. Code=%d\n", notify_code); - switch (notify_code) + TRACE("NotifyIcon received. Code=%d\n", dwMessage); + switch (dwMessage) { case NIM_ADD: ret = Toolbar.AddButton(iconData); @@ -1295,7 +1283,7 @@ BOOL CSysPagerWnd::NotifyIcon(DWORD notify_code, _In_ CONST NOTIFYICONDATA *icon case NIM_SETVERSION: ret = Toolbar.SwitchVersion(iconData); default: - TRACE("NotifyIcon received with unknown code %d.\n", notify_code); + TRACE("NotifyIcon received with unknown code %d.\n", dwMessage); return FALSE; } @@ -1420,9 +1408,12 @@ LRESULT CSysPagerWnd::OnCopyData(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& PCOPYDATASTRUCT cpData = (PCOPYDATASTRUCT)lParam; if (cpData->dwData == 1) { - PSYS_PAGER_COPY_DATA pData = (PSYS_PAGER_COPY_DATA)cpData->lpData; - return NotifyIcon(pData->notify_code, &pData->nicon_data); + /* A taskbar NotifyIcon notification */ + PTRAYNOTIFYDATAW pData = (PTRAYNOTIFYDATAW)cpData->lpData; + if (pData->dwSignature == NI_NOTIFY_SIG) + return NotifyIcon(pData->dwMessage, &pData->nid); } + // TODO: Handle other types of taskbar notifications return FALSE; } diff --git a/dll/win32/shell32/precomp.h b/dll/win32/shell32/precomp.h index 03166e37e6..f059e5b0b9 100644 --- a/dll/win32/shell32/precomp.h +++ b/dll/win32/shell32/precomp.h @@ -17,6 +17,7 @@ #include <wincon.h> #include <commdlg.h> #include <ddeml.h> + #include <shlwapi.h> #include <shlobj.h> #include <shobjidl.h> @@ -36,7 +37,11 @@ #include <shlguid_undoc.h> #include <shlobj_undoc.h> #include <shlwapi_undoc.h> + +#include <shellapi.h> +#undef ShellExecute #include <undocshell.h> + #include <browseui_undoc.h> #include <shellutils.h> diff --git a/dll/win32/shell32/systray.cpp b/dll/win32/shell32/systray.cpp index aa07708d4d..482abf0e1b 100644 --- a/dll/win32/shell32/systray.cpp +++ b/dll/win32/shell32/systray.cpp @@ -1,5 +1,6 @@ /* * Copyright 2004 Martin Fuchs + * Copyright 2018 Hermes Belusca-Maito * * Pass on icon notification messages to the systray implementation * in the currently running shell. @@ -23,91 +24,101 @@ WINE_DEFAULT_DEBUG_CHANNEL(shell); -/* copy data structure for tray notifications */ -typedef struct TrayNotifyCDS_Dummy { - DWORD cookie; - DWORD notify_code; - DWORD nicon_data[1]; // placeholder for NOTIFYICONDATA structure -} TrayNotifyCDS_Dummy; - -/* The only difference between Shell_NotifyIconA and Shell_NotifyIconW is the call to SendMessageA/W. */ -static BOOL SHELL_NotifyIcon(DWORD dwMessage, void* pnid, HWND nid_hwnd, DWORD nid_size, BOOL unicode) -{ - HWND hwnd; - COPYDATASTRUCT data; - - BOOL ret = FALSE; - int len = FIELD_OFFSET(TrayNotifyCDS_Dummy, nicon_data) + nid_size; - - TrayNotifyCDS_Dummy* pnotify_data = (TrayNotifyCDS_Dummy*) alloca(len); - - pnotify_data->cookie = 1; - pnotify_data->notify_code = dwMessage; - memcpy(&pnotify_data->nicon_data, pnid, nid_size); - - data.dwData = 1; - data.cbData = len; - data.lpData = pnotify_data; - - for(hwnd = 0; (hwnd = FindWindowExW(0, hwnd, L"Shell_TrayWnd", NULL)); ) - if ((unicode ? SendMessageW : SendMessageA)(hwnd, WM_COPYDATA, (WPARAM)nid_hwnd, (LPARAM)&data)) - ret = TRUE; - - return ret; -} - - /************************************************************************* - * Shell_NotifyIcon [SHELL32.296] + * Shell_NotifyIcon [SHELL32.296] * Shell_NotifyIconA [SHELL32.297] */ BOOL WINAPI Shell_NotifyIconA(DWORD dwMessage, PNOTIFYICONDATAA pnid) { NOTIFYICONDATAW nidW; - DWORD cbSize; - - /* Validate the cbSize as Windows XP does */ - if (pnid->cbSize != NOTIFYICONDATAA_V1_SIZE && - pnid->cbSize != NOTIFYICONDATAA_V2_SIZE && - pnid->cbSize != sizeof(NOTIFYICONDATAA)) - { - WARN("Invalid cbSize (%d) - using only Win95 fields (size=%d)\n", - pnid->cbSize, NOTIFYICONDATAA_V1_SIZE); - cbSize = NOTIFYICONDATAA_V1_SIZE; - } - else - cbSize = pnid->cbSize; + DWORD cbSize, dwValidFlags; + /* Initialize and capture the basic data fields */ ZeroMemory(&nidW, sizeof(nidW)); - nidW.cbSize = sizeof(nidW); + nidW.cbSize = sizeof(nidW); // Use a default size for the moment nidW.hWnd = pnid->hWnd; nidW.uID = pnid->uID; nidW.uFlags = pnid->uFlags; nidW.uCallbackMessage = pnid->uCallbackMessage; nidW.hIcon = pnid->hIcon; - /* szTip */ - if (pnid->uFlags & NIF_TIP) - MultiByteToWideChar(CP_ACP, 0, pnid->szTip, -1, nidW.szTip, _countof(nidW.szTip)); - - if (cbSize >= NOTIFYICONDATAA_V2_SIZE) + /* Validate the structure size and the flags */ + cbSize = pnid->cbSize; + dwValidFlags = NIF_MESSAGE | NIF_ICON | NIF_TIP; + if (cbSize == sizeof(NOTIFYICONDATAA)) + { + nidW.cbSize = sizeof(nidW); + dwValidFlags |= NIF_STATE | NIF_INFO | NIF_GUID /* | NIF_REALTIME | NIF_SHOWTIP */; + } + else if (cbSize == NOTIFYICONDATAA_V3_SIZE) + { + nidW.cbSize = NOTIFYICONDATAW_V3_SIZE; + dwValidFlags |= NIF_STATE | NIF_INFO | NIF_GUID; + } + else if (cbSize == NOTIFYICONDATAA_V2_SIZE) + { + nidW.cbSize = NOTIFYICONDATAW_V2_SIZE; + dwValidFlags |= NIF_STATE | NIF_INFO; + } + else // if cbSize == NOTIFYICONDATAA_V1_SIZE or something else { - nidW.dwState = pnid->dwState; - nidW.dwStateMask = pnid->dwStateMask; + if (cbSize != NOTIFYICONDATAA_V1_SIZE) + { + WARN("Invalid cbSize (%d) - using only Win95 fields (size=%d)\n", + cbSize, NOTIFYICONDATAA_V1_SIZE); + cbSize = NOTIFYICONDATAA_V1_SIZE; + } + nidW.cbSize = NOTIFYICONDATAW_V1_SIZE; + } + nidW.uFlags &= dwValidFlags; + + /* Capture the other data fields */ - /* szInfo, szInfoTitle */ - if (pnid->uFlags & NIF_INFO) + if (nidW.uFlags & NIF_TIP) + { + /* + * Depending on the size of the NOTIFYICONDATA structure + * we should convert part of, or all the szTip string. + */ + if (cbSize <= NOTIFYICONDATAA_V1_SIZE) + { +#define NIDV1_TIP_SIZE_A (NOTIFYICONDATAA_V1_SIZE - FIELD_OFFSET(NOTIFYICONDATAA, szTip))/sizeof(CHAR) + MultiByteToWideChar(CP_ACP, 0, pnid->szTip, NIDV1_TIP_SIZE_A, + nidW.szTip, _countof(nidW.szTip)); + /* Truncate the string */ + nidW.szTip[NIDV1_TIP_SIZE_A - 1] = 0; +#undef NIDV1_TIP_SIZE_A + } + else { - MultiByteToWideChar(CP_ACP, 0, pnid->szInfo, -1, nidW.szInfo, _countof(nidW.szInfo)); - MultiByteToWideChar(CP_ACP, 0, pnid->szInfoTitle, -1, nidW.szInfoTitle, _countof(nidW.szInfoTitle)); + MultiByteToWideChar(CP_ACP, 0, pnid->szTip, -1, + nidW.szTip, _countof(nidW.szTip)); } + } - nidW.uTimeout = pnid->uTimeout; + if (cbSize >= NOTIFYICONDATAA_V2_SIZE) + { + nidW.dwState = pnid->dwState; + nidW.dwStateMask = pnid->dwStateMask; + nidW.uTimeout = pnid->uTimeout; nidW.dwInfoFlags = pnid->dwInfoFlags; + + if (nidW.uFlags & NIF_INFO) + { + MultiByteToWideChar(CP_ACP, 0, pnid->szInfo, -1, + nidW.szInfo, _countof(nidW.szInfo)); + MultiByteToWideChar(CP_ACP, 0, pnid->szInfoTitle, -1, + nidW.szInfoTitle, _countof(nidW.szInfoTitle)); + } } + if ((cbSize >= NOTIFYICONDATAA_V3_SIZE) && (nidW.uFlags & NIF_GUID)) + nidW.guidItem = pnid->guidItem; + if (cbSize >= sizeof(NOTIFYICONDATAA)) nidW.hBalloonIcon = pnid->hBalloonIcon; + + /* Call the unicode function */ return Shell_NotifyIconW(dwMessage, &nidW); } @@ -116,19 +127,81 @@ BOOL WINAPI Shell_NotifyIconA(DWORD dwMessage, PNOTIFYICONDATAA pnid) */ BOOL WINAPI Shell_NotifyIconW(DWORD dwMessage, PNOTIFYICONDATAW pnid) { - DWORD cbSize; + BOOL ret = FALSE; + HWND hShellTrayWnd; + DWORD cbSize, dwValidFlags; + TRAYNOTIFYDATAW tnid; + COPYDATASTRUCT data; - /* Validate the cbSize so that WM_COPYDATA doesn't crash the application */ - if (pnid->cbSize != NOTIFYICONDATAW_V1_SIZE && - pnid->cbSize != NOTIFYICONDATAW_V2_SIZE && - pnid->cbSize != sizeof(NOTIFYICONDATAW)) + /* Find a handle to the shell tray window */ + hShellTrayWnd = FindWindowW(L"Shell_TrayWnd", NULL); + if (!hShellTrayWnd) + return FALSE; // None found, bail out + + /* Validate the structure size and the flags */ + cbSize = pnid->cbSize; + dwValidFlags = NIF_MESSAGE | NIF_ICON | NIF_TIP; + if (cbSize == sizeof(NOTIFYICONDATAW)) + { + dwValidFlags |= NIF_STATE | NIF_INFO | NIF_GUID /* | NIF_REALTIME | NIF_SHOWTIP */; + } + else if (cbSize == NOTIFYICONDATAW_V3_SIZE) + { + dwValidFlags |= NIF_STATE | NIF_INFO | NIF_GUID; + } + else if (cbSize == NOTIFYICONDATAW_V2_SIZE) { - WARN("Invalid cbSize (%d) - using only Win95 fields (size=%d)\n", - pnid->cbSize, NOTIFYICONDATAW_V1_SIZE); - cbSize = NOTIFYICONDATAW_V1_SIZE; + dwValidFlags |= NIF_STATE | NIF_INFO; } - else - cbSize = pnid->cbSize; + else // if cbSize == NOTIFYICONDATAW_V1_SIZE or something else + { + if (cbSize != NOTIFYICONDATAW_V1_SIZE) + { + WARN("Invalid cbSize (%d) - using only Win95 fields (size=%d)\n", + cbSize, NOTIFYICONDATAW_V1_SIZE); + cbSize = NOTIFYICONDATAW_V1_SIZE; + } + } + + /* Build the data structure */ + ZeroMemory(&tnid, sizeof(tnid)); + tnid.dwSignature = NI_NOTIFY_SIG; + tnid.dwMessage = dwMessage; + + /* Copy only the needed data, everything else is zeroed out */ + CopyMemory(&tnid.nid, pnid, cbSize); + /* Adjust the size (the NOTIFYICONDATA structure is the full-fledged one) and the flags */ + tnid.nid.cbSize = sizeof(tnid.nid); + tnid.nid.uFlags &= dwValidFlags; + + /* Be sure the szTip member (that could be cut-off) is correctly NULL-terminated */ + if (tnid.nid.uFlags & NIF_TIP) + { + if (cbSize <= NOTIFYICONDATAW_V1_SIZE) + { +#define NIDV1_TIP_SIZE_W (NOTIFYICONDATAW_V1_SIZE - FIELD_OFFSET(NOTIFYICONDATAW, szTip))/sizeof(WCHAR) + tnid.nid.szTip[NIDV1_TIP_SIZE_W - 1] = 0; +#undef NIDV1_TIP_SIZE_W + } + else + { + tnid.nid.szTip[_countof(tnid.nid.szTip) - 1] = 0; + } + } + + /* Be sure the info strings are correctly NULL-terminated */ + if (tnid.nid.uFlags & NIF_INFO) + { + tnid.nid.szInfo[_countof(tnid.nid.szInfo) - 1] = 0; + tnid.nid.szInfoTitle[_countof(tnid.nid.szInfoTitle) - 1] = 0; + } + + /* Send the data */ + data.dwData = 1; + data.cbData = sizeof(tnid); + data.lpData = &tnid; + if (SendMessageW(hShellTrayWnd, WM_COPYDATA, (WPARAM)pnid->hWnd, (LPARAM)&data)) + ret = TRUE; - return SHELL_NotifyIcon(dwMessage, pnid, pnid->hWnd, cbSize, TRUE); + return ret; } diff --git a/sdk/include/reactos/undocshell.h b/sdk/include/reactos/undocshell.h index 4a68feb63e..e74f201f86 100644 --- a/sdk/include/reactos/undocshell.h +++ b/sdk/include/reactos/undocshell.h @@ -30,10 +30,29 @@ extern "C" { #define DBIMF_NOMARGINS 0x2000 #endif // NTDDI_LONGHORN +#if defined (_SHELLAPI_H) || defined (_INC_SHELLAPI) + /**************************************************************************** - * Taskbar WM_COMMAND identifiers + * Taskbar interface WM_COPYDATA structures + * See
http://www.geoffchappell.com/studies/windows/shell/shell32/api/shlnot/copyd…
*/ +/* Data structure for Shell_NotifyIcon messages */ +typedef struct _TRAYNOTIFYDATAW +{ + DWORD dwSignature; + DWORD dwMessage; + NOTIFYICONDATAW nid; // Always use the latest NOTIFYICONDATAW structure version. +} TRAYNOTIFYDATAW, *PTRAYNOTIFYDATAW; +// Note: One could also introduce TRAYNOTIFYDATAA + +#define NI_NOTIFY_SIG 0x34753423 /* TRAYNOTIFYDATA */ + +#endif /* defined (_SHELLAPI_H) || defined (_INC_SHELLAPI) */ + +/**************************************************************************** + * Taskbar WM_COMMAND identifiers + */ #define TWM_DOEXITWINDOWS (WM_USER + 342) #define TWM_CYCLEFOCUS (WM_USER + 348) @@ -79,8 +98,8 @@ BOOL WINAPI StrRetToStrNW(LPWSTR,DWORD,LPSTRRET,const ITEMIDLIST*); /**************************************************************************** -* SHChangeNotifyRegister API -*/ + * SHChangeNotifyRegister API + */ #define SHCNRF_InterruptLevel 0x0001 #define SHCNRF_ShellLevel 0x0002 #define SHCNRF_RecursiveInterrupt 0x1000 /* Must be combined with SHCNRF_InterruptLevel */ @@ -580,7 +599,7 @@ BOOL WINAPI GUIDFromStringW( _In_ PCWSTR psz, _Out_ LPGUID pguid ); - + static inline ULONG Win32DbgPrint(const char *filename, int line, const char *lpFormat, ...) { @@ -838,7 +857,7 @@ typedef struct tagSHELL_LINK_INFOW /***************************************************************************** * SHELL_LINK_INFO_VOLUME_IDA/W - * If cbVolumeLabelOffset != 0x00000014 (should be 0x00000010) then use + * If cbVolumeLabelOffset != 0x00000014 (should be 0x00000010) then use * SHELL_LINK_INFO_VOLUME_IDA * If cbVolumeLabelOffset == 0x00000014 then use SHELL_LINK_INFO_VOLUME_IDW */ @@ -958,7 +977,7 @@ typedef struct tagEXP_VISTA_ID_LIST { /* .cbSize >= 0x0000000a, .dwSignature = 0xa000000c */ DATABLOCK_HEADER dbh; - /* Specifies an alternate IDList that can be used instead + /* Specifies an alternate IDList that can be used instead of the "normal" IDList (SLDF_HAS_ID_LIST) */ /* LPITEMIDLIST pIDList; (variable) */ } EXP_VISTA_ID_LIST, *LPEXP_VISTA_ID_LIST;
6 years, 10 months
1
0
0
0
03/04: [STOBJECT] Don't hardcode variable type in sizeof.
by Hermès Bélusca-Maïto
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=4207397963f4adaa3c191…
commit 4207397963f4adaa3c19104e075646a9c3b956e2 Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> AuthorDate: Sun Feb 4 17:21:58 2018 +0100 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Sun Feb 4 18:11:49 2018 +0100 [STOBJECT] Don't hardcode variable type in sizeof. --- dll/shellext/stobject/csystray.cpp | 2 +- dll/shellext/stobject/hotplug.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dll/shellext/stobject/csystray.cpp b/dll/shellext/stobject/csystray.cpp index 89bd5c5ac0..d1e51c116e 100644 --- a/dll/shellext/stobject/csystray.cpp +++ b/dll/shellext/stobject/csystray.cpp @@ -125,7 +125,7 @@ HRESULT CSysTray::NotifyIcon(INT code, UINT uId, HICON hIcon, LPCWSTR szTip, DWO TRACE("NotifyIcon code=%d, uId=%d, hIcon=%p, szTip=%S\n", code, uId, hIcon, szTip); - nim.cbSize = sizeof(NOTIFYICONDATA); + nim.cbSize = sizeof(nim); nim.uFlags = NIF_MESSAGE | NIF_ICON | NIF_STATE | NIF_TIP; nim.hIcon = hIcon; nim.uID = uId; diff --git a/dll/shellext/stobject/hotplug.cpp b/dll/shellext/stobject/hotplug.cpp index 5c6d3099a8..9af5eef972 100644 --- a/dll/shellext/stobject/hotplug.cpp +++ b/dll/shellext/stobject/hotplug.cpp @@ -101,7 +101,8 @@ HRESULT EnumHotpluggedDevices(CSimpleArray<DEVINST> &devList) HRESULT NotifyBalloon(CSysTray* pSysTray, LPCWSTR szTitle = NULL, LPCWSTR szInfo = NULL, UINT uId = ID_ICON_HOTPLUG) { NOTIFYICONDATA nim = { 0 }; - nim.cbSize = sizeof(NOTIFYICONDATA); + + nim.cbSize = sizeof(nim); nim.uID = uId; nim.hWnd = pSysTray->GetHWnd();
6 years, 10 months
1
0
0
0
02/04: [PSDK] Fix NIF_STATE definition and add NIF_GUID.
by Hermès Bélusca-Maïto
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=a64c33e78795a39a11a7e…
commit a64c33e78795a39a11a7e8aa372d272642a6fb28 Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> AuthorDate: Sun Feb 4 17:19:40 2018 +0100 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Sun Feb 4 18:11:48 2018 +0100 [PSDK] Fix NIF_STATE definition and add NIF_GUID. --- sdk/include/psdk/shellapi.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sdk/include/psdk/shellapi.h b/sdk/include/psdk/shellapi.h index 2e26e59868..ee35759c19 100644 --- a/sdk/include/psdk/shellapi.h +++ b/sdk/include/psdk/shellapi.h @@ -81,8 +81,8 @@ extern "C" { #define NIF_MESSAGE 1 #define NIF_ICON 2 #define NIF_TIP 4 -#define NIF_STATE 8 #if _WIN32_IE >= 0x0500 +#define NIF_STATE 8 #define NIF_INFO 16 #define NIS_HIDDEN 1 #define NIS_SHAREDICON 2 @@ -92,6 +92,7 @@ extern "C" { #define NIIF_ERROR 3 #define NIIF_USER 4 #if _WIN32_IE >= 0x0600 +#define NIF_GUID 32 #define NIIF_ICON_MASK 0xf #define NIIF_NOSOUND 0x10 #endif /* _WIN32_IE >= 0x0600 */
6 years, 10 months
1
0
0
0
01/04: [BROWSEUI] Shut a warning down ("windef.h(121) : warning RC4005: 'DECLSPEC_IMPORT' : redefinition" when compiling the resource).
by Hermès Bélusca-Maïto
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=e2c6c3cfc78d21fe955fc…
commit e2c6c3cfc78d21fe955fcf7da88a97284f79622d Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> AuthorDate: Sun Feb 4 17:18:25 2018 +0100 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Sun Feb 4 18:11:47 2018 +0100 [BROWSEUI] Shut a warning down ("windef.h(121) : warning RC4005: 'DECLSPEC_IMPORT' : redefinition" when compiling the resource). --- dll/win32/browseui/browseui.rc | 1 + 1 file changed, 1 insertion(+) diff --git a/dll/win32/browseui/browseui.rc b/dll/win32/browseui/browseui.rc index aa8c3435a9..030d614112 100644 --- a/dll/win32/browseui/browseui.rc +++ b/dll/win32/browseui/browseui.rc @@ -22,6 +22,7 @@ #define _INC_WINDOWS #define COM_NO_WINDOWS_H #include <shlobj.h> +#undef DECLSPEC_IMPORT #include "resource.h"
6 years, 10 months
1
0
0
0
01/01: [SETUPAPI] Fix the coding style, add annotations and fix the debug messages.
by Eric Kohl
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=65d3bf7482b9fd5728ef2…
commit 65d3bf7482b9fd5728ef2ad22bb17a38686636df Author: Eric Kohl <eric.kohl(a)reactos.org> AuthorDate: Sun Feb 4 15:40:35 2018 +0100 Commit: Eric Kohl <eric.kohl(a)reactos.org> CommitDate: Sun Feb 4 15:41:13 2018 +0100 [SETUPAPI] Fix the coding style, add annotations and fix the debug messages. --- dll/win32/setupapi/cfgmgr.c | 997 +++++++++++++++++++++++++++++++------------- 1 file changed, 706 insertions(+), 291 deletions(-) diff --git a/dll/win32/setupapi/cfgmgr.c b/dll/win32/setupapi/cfgmgr.c index 4ccd7ae8f5..c77d8fd8db 100644 --- a/dll/win32/setupapi/cfgmgr.c +++ b/dll/win32/setupapi/cfgmgr.c @@ -740,6 +740,7 @@ CM_Add_Empty_Log_Conf( { TRACE("CM_Add_Empty_Log_Conf(%p %p %lu %lx)\n", plcLogConf, dnDevInst, Priority, ulFlags); + return CM_Add_Empty_Log_Conf_Ex(plcLogConf, dnDevInst, Priority, ulFlags, NULL); } @@ -847,7 +848,8 @@ CM_Add_IDA( _In_ ULONG ulFlags) { TRACE("CM_Add_IDA(%p %s %lx)\n", - dnDevInst, pszID, ulFlags); + dnDevInst, debugstr_a(pszID), ulFlags); + return CM_Add_ID_ExA(dnDevInst, pszID, ulFlags, NULL); } @@ -864,6 +866,7 @@ CM_Add_IDW( { TRACE("CM_Add_IDW(%p %s %lx)\n", dnDevInst, debugstr_w(pszID), ulFlags); + return CM_Add_ID_ExW(dnDevInst, pszID, ulFlags, NULL); } @@ -883,7 +886,7 @@ CM_Add_ID_ExA( CONFIGRET ret; TRACE("CM_Add_ID_ExA(%p %s %lx %p)\n", - dnDevInst, pszID, ulFlags, hMachine); + dnDevInst, debugstr_a(pszID), ulFlags, hMachine); if (pSetupCaptureAndConvertAnsiArg(pszID, &pszIDW)) return CR_INVALID_DATA; @@ -1034,12 +1037,13 @@ CM_Add_Res_Des( _Out_opt_ PRES_DES prdResDes, _In_ LOG_CONF lcLogConf, _In_ RESOURCEID ResourceID, - _In_ PCVOID ResourceData, + _In_reads_bytes_(ResourceLen) PCVOID ResourceData, _In_ ULONG ResourceLen, _In_ ULONG ulFlags) { TRACE("CM_Add_Res_Des(%p %p %lu %p %lu %lx)\n", prdResDes, lcLogConf, ResourceID, ResourceData, ResourceLen, ulFlags); + return CM_Add_Res_Des_Ex(prdResDes, lcLogConf, ResourceID, ResourceData, ResourceLen, ulFlags, NULL); } @@ -1054,7 +1058,7 @@ CM_Add_Res_Des_Ex( _Out_opt_ PRES_DES prdResDes, _In_ LOG_CONF lcLogConf, _In_ RESOURCEID ResourceID, - _In_ PCVOID ResourceData, + _In_reads_bytes_(ResourceLen) PCVOID ResourceData, _In_ ULONG ResourceLen, _In_ ULONG ulFlags, _In_opt_ HMACHINE hMachine) @@ -1080,7 +1084,7 @@ CM_Connect_MachineA( CONFIGRET ret; TRACE("CM_Connect_MachineA(%s %p)\n", - UNCServerName, phMachine); + debugstr_a(UNCServerName), phMachine); if (UNCServerName == NULL || *UNCServerName == 0) return CM_Connect_MachineW(NULL, phMachine); @@ -1178,6 +1182,7 @@ CM_Create_DevNodeA( { TRACE("CM_Create_DevNodeA(%p %s %p %lx)\n", pdnDevInst, debugstr_a(pDeviceID), dnParent, ulFlags); + return CM_Create_DevNode_ExA(pdnDevInst, pDeviceID, dnParent, ulFlags, NULL); } @@ -1196,6 +1201,7 @@ CM_Create_DevNodeW( { TRACE("CM_Create_DevNodeW(%p %s %p %lx)\n", pdnDevInst, debugstr_w(pDeviceID), dnParent, ulFlags); + return CM_Create_DevNode_ExW(pdnDevInst, pDeviceID, dnParent, ulFlags, NULL); } @@ -1327,7 +1333,8 @@ CM_Create_Range_List( { PINTERNAL_RANGE_LIST pRangeList = NULL; - FIXME("CM_Create_Range_List(%p %lx)\n", prlh, ulFlags); + FIXME("CM_Create_Range_List(%p %lx)\n", + prlh, ulFlags); if (ulFlags != 0) return CR_INVALID_FLAG; @@ -1370,6 +1377,7 @@ CM_Delete_Class_Key( { TRACE("CM_Delete_Class_Key(%p %lx)\n", ClassGuid, ulFlags); + return CM_Delete_Class_Key_Ex(ClassGuid, ulFlags, NULL); } @@ -1440,6 +1448,7 @@ CM_Delete_DevNode_Key( { TRACE("CM_Delete_DevNode_Key(%p %lu %lx)\n", dnDevNode, ulHardwareProfile, ulFlags); + return CM_Delete_DevNode_Key_Ex(dnDevNode, ulHardwareProfile, ulFlags, NULL); } @@ -1476,6 +1485,7 @@ CM_Delete_Range( { FIXME("CM_Delete_Range(%I64u %I64u %p %lx)\n", ullStartValue, ullEndValue, rlh, ulFlags); + return CR_CALL_NOT_IMPLEMENTED; } @@ -1491,6 +1501,7 @@ CM_Disable_DevNode( { TRACE("CM_Disable_DevNode(%p %lx)\n", dnDevInst, ulFlags); + return CM_Disable_DevNode_Ex(dnDevInst, ulFlags, NULL); } @@ -1603,6 +1614,7 @@ CM_Dup_Range_List( { FIXME("CM_Dup_Range_List(%p %p %lx)\n", rlhOld, rlhNew, ulFlags); + return CR_CALL_NOT_IMPLEMENTED; } @@ -1616,7 +1628,9 @@ CM_Enable_DevNode( _In_ DEVINST dnDevInst, _In_ ULONG ulFlags) { - TRACE("CM_Enable_DevNode(%p %lx)\n", dnDevInst, ulFlags); + TRACE("CM_Enable_DevNode(%p %lx)\n", + dnDevInst, ulFlags); + return CM_Enable_DevNode_Ex(dnDevInst, ulFlags, NULL); } @@ -1636,7 +1650,8 @@ CM_Enable_DevNode_Ex( LPWSTR lpDevInst; CONFIGRET ret; - TRACE("CM_Enable_DevNode_Ex(%p %lx %p)\n", dnDevInst, ulFlags, hMachine); + TRACE("CM_Enable_DevNode_Ex(%p %lx %p)\n", + dnDevInst, ulFlags, hMachine); if (!pSetupIsUserAdmin()) return CR_ACCESS_DENIED; @@ -1776,7 +1791,7 @@ CONFIGRET WINAPI CM_Enumerate_EnumeratorsA( _In_ ULONG ulEnumIndex, - _Out_ PCHAR Buffer, + _Out_writes_(*pulLength) PCHAR Buffer, _Inout_ PULONG pulLength, _In_ ULONG ulFlags) { @@ -1795,7 +1810,7 @@ CONFIGRET WINAPI CM_Enumerate_EnumeratorsW( _In_ ULONG ulEnumIndex, - _Out_ PWCHAR Buffer, + _Out_writes_(*pulLength) PWCHAR Buffer, _Inout_ PULONG pulLength, _In_ ULONG ulFlags) { @@ -1814,7 +1829,7 @@ CONFIGRET WINAPI CM_Enumerate_Enumerators_ExA( _In_ ULONG ulEnumIndex, - _Out_ PCHAR Buffer, + _Out_writes_(*pulLength) PCHAR Buffer, _Inout_ PULONG pulLength, _In_ ULONG ulFlags, _In_opt_ HMACHINE hMachine) @@ -1865,7 +1880,7 @@ CONFIGRET WINAPI CM_Enumerate_Enumerators_ExW( _In_ ULONG ulEnumIndex, - _Out_ PWCHAR Buffer, + _Out_writes_(*pulLength) PWCHAR Buffer, _Inout_ PULONG pulLength, _In_ ULONG ulFlags, _In_opt_ HMACHINE hMachine) @@ -1932,6 +1947,7 @@ CM_Find_Range( { FIXME("CM_Find_Range(%p %I64u %lu %I64u %I64u %p %lx)\n", pullStart, ullStart, ulLength, ullAlignment, ullEnd, rlh, ulFlags); + return CR_CALL_NOT_IMPLEMENTED; } @@ -2295,11 +2311,17 @@ CM_Get_Child_Ex( /*********************************************************************** * CM_Get_Class_Key_NameA [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Get_Class_Key_NameA( - LPGUID ClassGuid, LPSTR pszKeyName, PULONG pulLength, ULONG ulFlags) +CONFIGRET +WINAPI +CM_Get_Class_Key_NameA( + _In_ LPGUID ClassGuid, + _Out_writes_opt_(*pulLength) LPSTR pszKeyName, + _Inout_ PULONG pulLength, + _In_ ULONG ulFlags) { - TRACE("%p %p %p %lx\n", + TRACE("CM_Get_Class_Key_NameA(%p %p %p %lx)\n", ClassGuid, pszKeyName, pulLength, ulFlags); + return CM_Get_Class_Key_Name_ExA(ClassGuid, pszKeyName, pulLength, ulFlags, NULL); } @@ -2308,11 +2330,17 @@ CONFIGRET WINAPI CM_Get_Class_Key_NameA( /*********************************************************************** * CM_Get_Class_Key_NameW [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Get_Class_Key_NameW( - LPGUID ClassGuid, LPWSTR pszKeyName, PULONG pulLength, ULONG ulFlags) +CONFIGRET +WINAPI +CM_Get_Class_Key_NameW( + _In_ LPGUID ClassGuid, + _Out_writes_opt_(*pulLength) LPWSTR pszKeyName, + _Inout_ PULONG pulLength, + _In_ ULONG ulFlags) { - TRACE("%p %p %p %lx\n", + TRACE("CM_Get_Class_Key_NameW(%p %p %p %lx)\n", ClassGuid, pszKeyName, pulLength, ulFlags); + return CM_Get_Class_Key_Name_ExW(ClassGuid, pszKeyName, pulLength, ulFlags, NULL); } @@ -2321,16 +2349,21 @@ CONFIGRET WINAPI CM_Get_Class_Key_NameW( /*********************************************************************** * CM_Get_Class_Key_Name_ExA [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Get_Class_Key_Name_ExA( - LPGUID ClassGuid, LPSTR pszKeyName, PULONG pulLength, ULONG ulFlags, - HMACHINE hMachine) +CONFIGRET +WINAPI +CM_Get_Class_Key_Name_ExA( + _In_ LPGUID ClassGuid, + _Out_writes_opt_(*pulLength) LPSTR pszKeyName, + _Inout_ PULONG pulLength, + _In_ ULONG ulFlags, + _In_opt_ HMACHINE hMachine) { WCHAR szBuffer[MAX_GUID_STRING_LEN]; CONFIGRET ret = CR_SUCCESS; ULONG ulLength; ULONG ulOrigLength; - TRACE("%p %p %p %lx %lx\n", + TRACE("CM_Get_Class_Key_Name_ExA(%p %p %p %lx %lx)\n", ClassGuid, pszKeyName, pulLength, ulFlags, hMachine); if (ClassGuid == NULL || pszKeyName == NULL || pulLength == NULL) @@ -2364,11 +2397,16 @@ CONFIGRET WINAPI CM_Get_Class_Key_Name_ExA( /*********************************************************************** * CM_Get_Class_Key_Name_ExW [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Get_Class_Key_Name_ExW( - LPGUID ClassGuid, LPWSTR pszKeyName, PULONG pulLength, ULONG ulFlags, - HMACHINE hMachine) +CONFIGRET +WINAPI +CM_Get_Class_Key_Name_ExW( + _In_ LPGUID ClassGuid, + _Out_writes_opt_(*pulLength) LPWSTR pszKeyName, + _Inout_ PULONG pulLength, + _In_ ULONG ulFlags, + _In_opt_ HMACHINE hMachine) { - TRACE("%p %p %p %lx %lx\n", + TRACE("CM_Get_Class_Key_Name_ExW(%p %p %p %lx %lx)\n", ClassGuid, pszKeyName, pulLength, ulFlags, hMachine); if (ClassGuid == NULL || pszKeyName == NULL || pulLength == NULL) @@ -2395,10 +2433,17 @@ CONFIGRET WINAPI CM_Get_Class_Key_Name_ExW( /*********************************************************************** * CM_Get_Class_NameA [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Get_Class_NameA( - LPGUID ClassGuid, PCHAR Buffer, PULONG pulLength, ULONG ulFlags) +CONFIGRET +WINAPI +CM_Get_Class_NameA( + _In_ LPGUID ClassGuid, + _Out_writes_opt_(*pulLength) PCHAR Buffer, + _Inout_ PULONG pulLength, + _In_ ULONG ulFlags) { - TRACE("%p %p %p %lx\n", ClassGuid, Buffer, pulLength, ulFlags); + TRACE("CM_Get_Class_NameA(%p %p %p %lx)\n", + ClassGuid, Buffer, pulLength, ulFlags); + return CM_Get_Class_Name_ExA(ClassGuid, Buffer, pulLength, ulFlags, NULL); } @@ -2407,10 +2452,17 @@ CONFIGRET WINAPI CM_Get_Class_NameA( /*********************************************************************** * CM_Get_Class_NameW [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Get_Class_NameW( - LPGUID ClassGuid, PWCHAR Buffer, PULONG pulLength, ULONG ulFlags) +CONFIGRET +WINAPI +CM_Get_Class_NameW( + _In_ LPGUID ClassGuid, + _Out_writes_opt_(*pulLength) PWCHAR Buffer, + _Inout_ PULONG pulLength, + _In_ ULONG ulFlags) { - TRACE("%p %p %p %lx\n", ClassGuid, Buffer, pulLength, ulFlags); + TRACE("CM_Get_Class_NameW(%p %p %p %lx)\n", + ClassGuid, Buffer, pulLength, ulFlags); + return CM_Get_Class_Name_ExW(ClassGuid, Buffer, pulLength, ulFlags, NULL); } @@ -2419,16 +2471,21 @@ CONFIGRET WINAPI CM_Get_Class_NameW( /*********************************************************************** * CM_Get_Class_Name_ExA [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Get_Class_Name_ExA( - LPGUID ClassGuid, PCHAR Buffer, PULONG pulLength, ULONG ulFlags, - HMACHINE hMachine) +CONFIGRET +WINAPI +CM_Get_Class_Name_ExA( + _In_ LPGUID ClassGuid, + _Out_writes_opt_(*pulLength) PCHAR Buffer, + _Inout_ PULONG pulLength, + _In_ ULONG ulFlags, + _In_opt_ HMACHINE hMachine) { WCHAR szBuffer[MAX_CLASS_NAME_LEN]; CONFIGRET ret = CR_SUCCESS; ULONG ulLength; ULONG ulOrigLength; - TRACE("%p %p %p %lx %lx\n", + TRACE("CM_Get_Class_Name_ExA(%p %p %p %lx %lx)\n", ClassGuid, Buffer, pulLength, ulFlags, hMachine); if (ClassGuid == NULL || Buffer == NULL || pulLength == NULL) @@ -2462,16 +2519,20 @@ CONFIGRET WINAPI CM_Get_Class_Name_ExA( /*********************************************************************** * CM_Get_Class_Name_ExW [SETUPAPI.@] */ -CONFIGRET WINAPI +CONFIGRET +WINAPI CM_Get_Class_Name_ExW( - LPGUID ClassGuid, PWCHAR Buffer, PULONG pulLength, ULONG ulFlags, - HMACHINE hMachine) + _In_ LPGUID ClassGuid, + _Out_writes_opt_(*pulLength) PWCHAR Buffer, + _Inout_ PULONG pulLength, + _In_ ULONG ulFlags, + _In_opt_ HMACHINE hMachine) { WCHAR szGuidString[MAX_GUID_STRING_LEN]; RPC_BINDING_HANDLE BindingHandle = NULL; CONFIGRET ret; - TRACE("%p %p %p %lx %lx\n", + TRACE("CM_Get_Class_Name_ExW(%p %p %p %lx %lx\n", ClassGuid, Buffer, pulLength, ulFlags, hMachine); if (ClassGuid == NULL || Buffer == NULL || pulLength == NULL) @@ -2518,16 +2579,23 @@ CM_Get_Class_Name_ExW( /*********************************************************************** * CM_Get_Class_Registry_PropertyA [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Get_Class_Registry_PropertyA( - LPGUID ClassGuid, ULONG ulProperty, PULONG pulRegDataType, - PVOID Buffer, PULONG pulLength, ULONG ulFlags, HMACHINE hMachine) +CONFIGRET +WINAPI +CM_Get_Class_Registry_PropertyA( + LPGUID ClassGuid, + ULONG ulProperty, + PULONG pulRegDataType, + PVOID Buffer, + PULONG pulLength, + ULONG ulFlags, + HMACHINE hMachine) { PWSTR BufferW = NULL; ULONG ulLength = 0; ULONG ulType; CONFIGRET ret; - TRACE("%p %lu %p %p %p %lx %lx\n", + TRACE("CM_Get_Class_Registry_PropertyA(%p %lu %p %p %p %lx %lx)\n", ClassGuid, ulProperty, pulRegDataType, Buffer, pulLength, ulFlags, hMachine); @@ -2590,9 +2658,16 @@ CONFIGRET WINAPI CM_Get_Class_Registry_PropertyA( /*********************************************************************** * CM_Get_Class_Registry_PropertyW [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Get_Class_Registry_PropertyW( - LPGUID ClassGuid, ULONG ulProperty, PULONG pulRegDataType, - PVOID Buffer, PULONG pulLength, ULONG ulFlags, HMACHINE hMachine) +CONFIGRET +WINAPI +CM_Get_Class_Registry_PropertyW( + LPGUID ClassGuid, + ULONG ulProperty, + PULONG pulRegDataType, + PVOID Buffer, + PULONG pulLength, + ULONG ulFlags, + HMACHINE hMachine) { RPC_BINDING_HANDLE BindingHandle = NULL; WCHAR szGuidString[PNP_MAX_GUID_STRING_LEN + 1]; @@ -2600,7 +2675,7 @@ CONFIGRET WINAPI CM_Get_Class_Registry_PropertyW( ULONG ulTransferLength = 0; CONFIGRET ret; - TRACE("%p %lu %p %p %p %lx %lx\n", + TRACE("CM_Get_Class_Registry_PropertyW(%p %lu %p %p %p %lx %lx)\n", ClassGuid, ulProperty, pulRegDataType, Buffer, pulLength, ulFlags, hMachine); @@ -2662,10 +2737,16 @@ CONFIGRET WINAPI CM_Get_Class_Registry_PropertyW( /*********************************************************************** * CM_Get_Depth [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Get_Depth( - PULONG pulDepth, DEVINST dnDevInst, ULONG ulFlags) +CONFIGRET +WINAPI +CM_Get_Depth( + _Out_ PULONG pulDepth, + _In_ DEVINST dnDevInst, + _In_ ULONG ulFlags) { - TRACE("%p %lx %lx\n", pulDepth, dnDevInst, ulFlags); + TRACE("CM_Get_Depth(%p %lx %lx)\n", + pulDepth, dnDevInst, ulFlags); + return CM_Get_Depth_Ex(pulDepth, dnDevInst, ulFlags, NULL); } @@ -2673,15 +2754,20 @@ CONFIGRET WINAPI CM_Get_Depth( /*********************************************************************** * CM_Get_Depth_Ex [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Get_Depth_Ex( - PULONG pulDepth, DEVINST dnDevInst, ULONG ulFlags, HMACHINE hMachine) +CONFIGRET +WINAPI +CM_Get_Depth_Ex( + _Out_ PULONG pulDepth, + _In_ DEVINST dnDevInst, + _In_ ULONG ulFlags, + _In_opt_ HMACHINE hMachine) { RPC_BINDING_HANDLE BindingHandle = NULL; HSTRING_TABLE StringTable = NULL; LPWSTR lpDevInst; CONFIGRET ret; - TRACE("%p %lx %lx %lx\n", + TRACE("CM_Get_Depth_Ex(%p %lx %lx %lx)\n", pulDepth, dnDevInst, ulFlags, hMachine); if (pulDepth == NULL) @@ -2733,12 +2819,20 @@ CONFIGRET WINAPI CM_Get_Depth_Ex( /*********************************************************************** * CM_Get_DevNode_Custom_PropertyA [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Get_DevNode_Custom_PropertyA( - DEVINST dnDevInst, PCSTR pszCustomPropertyName, PULONG pulRegDataType, - PVOID Buffer, PULONG pulLength, ULONG ulFlags) +CONFIGRET +WINAPI +CM_Get_DevNode_Custom_PropertyA( + _In_ DEVINST dnDevInst, + _In_ PCSTR pszCustomPropertyName, + _Out_opt_ PULONG pulRegDataType, + _Out_writes_bytes_opt_(*pulLength) PVOID Buffer, + _Inout_ PULONG pulLength, + _In_ ULONG ulFlags) { - TRACE("%lx %s %p %p %p %lx\n", dnDevInst, pszCustomPropertyName, - pulRegDataType, Buffer, pulLength, ulFlags); + TRACE("CM_Get_DevNode_Custom_PropertyA(%lx %s %p %p %p %lx)\n", + dnDevInst, pszCustomPropertyName, pulRegDataType, + Buffer, pulLength, ulFlags); + return CM_Get_DevNode_Custom_Property_ExA(dnDevInst, pszCustomPropertyName, pulRegDataType, Buffer, pulLength, ulFlags, NULL); @@ -2748,12 +2842,20 @@ CONFIGRET WINAPI CM_Get_DevNode_Custom_PropertyA( /*********************************************************************** * CM_Get_DevNode_Custom_PropertyW [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Get_DevNode_Custom_PropertyW( - DEVINST dnDevInst, PCWSTR pszCustomPropertyName, PULONG pulRegDataType, - PVOID Buffer, PULONG pulLength, ULONG ulFlags) +CONFIGRET +WINAPI +CM_Get_DevNode_Custom_PropertyW( + _In_ DEVINST dnDevInst, + _In_ PCWSTR pszCustomPropertyName, + _Out_opt_ PULONG pulRegDataType, + _Out_writes_bytes_opt_(*pulLength) PVOID Buffer, + _Inout_ PULONG pulLength, + _In_ ULONG ulFlags) { - TRACE("%lx %s %p %p %p %lx\n", dnDevInst, debugstr_w(pszCustomPropertyName), - pulRegDataType, Buffer, pulLength, ulFlags); + TRACE("CM_Get_DevNode_Custom_PropertyW(%lx %s %p %p %p %lx)\n", + dnDevInst, debugstr_w(pszCustomPropertyName), pulRegDataType, + Buffer, pulLength, ulFlags); + return CM_Get_DevNode_Custom_Property_ExW(dnDevInst, pszCustomPropertyName, pulRegDataType, Buffer, pulLength, ulFlags, NULL); @@ -2763,9 +2865,16 @@ CONFIGRET WINAPI CM_Get_DevNode_Custom_PropertyW( /*********************************************************************** * CM_Get_DevNode_Custom_Property_ExA [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Get_DevNode_Custom_Property_ExA( - DEVINST dnDevInst, PCSTR pszCustomPropertyName, PULONG pulRegDataType, - PVOID Buffer, PULONG pulLength, ULONG ulFlags, HMACHINE hMachine) +CONFIGRET +WINAPI +CM_Get_DevNode_Custom_Property_ExA( + _In_ DEVINST dnDevInst, + _In_ PCSTR pszCustomPropertyName, + _Out_opt_ PULONG pulRegDataType, + _Out_writes_bytes_opt_(*pulLength) PVOID Buffer, + _Inout_ PULONG pulLength, + _In_ ULONG ulFlags, + _In_opt_ HMACHINE hMachine) { LPWSTR pszPropertyNameW = NULL; PVOID BufferW; @@ -2773,8 +2882,9 @@ CONFIGRET WINAPI CM_Get_DevNode_Custom_Property_ExA( ULONG ulDataType = REG_NONE; CONFIGRET ret; - TRACE("%lx %s %p %p %p %lx %p\n", dnDevInst, pszCustomPropertyName, - pulRegDataType, Buffer, pulLength, ulFlags, hMachine); + TRACE("CM_Get_DevNode_Custom_Property_ExA(%lx %s %p %p %p %lx %p)\n", + dnDevInst, pszCustomPropertyName, pulRegDataType, + Buffer, pulLength, ulFlags, hMachine); if (!pulLength) return CR_INVALID_POINTER; @@ -2843,9 +2953,16 @@ CONFIGRET WINAPI CM_Get_DevNode_Custom_Property_ExA( /*********************************************************************** * CM_Get_DevNode_Custom_Property_ExW [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Get_DevNode_Custom_Property_ExW( - DEVINST dnDevInst, PCWSTR pszCustomPropertyName, PULONG pulRegDataType, - PVOID Buffer, PULONG pulLength, ULONG ulFlags, HMACHINE hMachine) +CONFIGRET +WINAPI +CM_Get_DevNode_Custom_Property_ExW( + _In_ DEVINST dnDevInst, + _In_ PCWSTR pszCustomPropertyName, + _Out_opt_ PULONG pulRegDataType, + _Out_writes_bytes_opt_(*pulLength) PVOID Buffer, + _Inout_ PULONG pulLength, + _In_ ULONG ulFlags, + _In_opt_ HMACHINE hMachine) { RPC_BINDING_HANDLE BindingHandle = NULL; HSTRING_TABLE StringTable = NULL; @@ -2854,9 +2971,9 @@ CONFIGRET WINAPI CM_Get_DevNode_Custom_Property_ExW( ULONG ulTransferLength; CONFIGRET ret = CR_SUCCESS; - TRACE("%lx %s %p %p %p %lx %p\n", dnDevInst, - debugstr_w(pszCustomPropertyName), pulRegDataType, Buffer, - pulLength, ulFlags, hMachine); + TRACE("CM_Get_DevNode_Custom_Property_ExW(%lx %s %p %p %p %lx %p)\n", + dnDevInst, debugstr_w(pszCustomPropertyName), pulRegDataType, + Buffer, pulLength, ulFlags, hMachine); if (dnDevInst == 0) return CR_INVALID_DEVNODE; @@ -2921,11 +3038,17 @@ CONFIGRET WINAPI CM_Get_DevNode_Custom_Property_ExW( /*********************************************************************** * CM_Get_DevNode_Registry_PropertyA [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Get_DevNode_Registry_PropertyA( - DEVINST dnDevInst, ULONG ulProperty, PULONG pulRegDataType, - PVOID Buffer, PULONG pulLength, ULONG ulFlags) +CONFIGRET +WINAPI +CM_Get_DevNode_Registry_PropertyA( + _In_ DEVINST dnDevInst, + _In_ ULONG ulProperty, + _Out_opt_ PULONG pulRegDataType, + _Out_writes_bytes_opt_(*pulLength) PVOID Buffer, + _Inout_ PULONG pulLength, + _In_ ULONG ulFlags) { - TRACE("%lx %lu %p %p %p %lx\n", + TRACE("CM_Get_DevNode_Registry_PropertyA(%lx %lu %p %p %p %lx)\n", dnDevInst, ulProperty, pulRegDataType, Buffer, pulLength, ulFlags); return CM_Get_DevNode_Registry_Property_ExA(dnDevInst, ulProperty, @@ -2937,11 +3060,17 @@ CONFIGRET WINAPI CM_Get_DevNode_Registry_PropertyA( /*********************************************************************** * CM_Get_DevNode_Registry_PropertyW [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Get_DevNode_Registry_PropertyW( - DEVINST dnDevInst, ULONG ulProperty, PULONG pulRegDataType, - PVOID Buffer, PULONG pulLength, ULONG ulFlags) +CONFIGRET +WINAPI +CM_Get_DevNode_Registry_PropertyW( + _In_ DEVINST dnDevInst, + _In_ ULONG ulProperty, + _Out_opt_ PULONG pulRegDataType, + _Out_writes_bytes_opt_(*pulLength) PVOID Buffer, + _Inout_ PULONG pulLength, + _In_ ULONG ulFlags) { - TRACE("%lx %lu %p %p %p %lx\n", + TRACE("CM_Get_DevNode_Registry_PropertyW(%lx %lu %p %p %p %lx)\n", dnDevInst, ulProperty, pulRegDataType, Buffer, pulLength, ulFlags); return CM_Get_DevNode_Registry_Property_ExW(dnDevInst, ulProperty, @@ -2953,16 +3082,23 @@ CONFIGRET WINAPI CM_Get_DevNode_Registry_PropertyW( /*********************************************************************** * CM_Get_DevNode_Registry_Property_ExA [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Get_DevNode_Registry_Property_ExA( - DEVINST dnDevInst, ULONG ulProperty, PULONG pulRegDataType, - PVOID Buffer, PULONG pulLength, ULONG ulFlags, HMACHINE hMachine) +CONFIGRET +WINAPI +CM_Get_DevNode_Registry_Property_ExA( + _In_ DEVINST dnDevInst, + _In_ ULONG ulProperty, + _Out_opt_ PULONG pulRegDataType, + _Out_writes_bytes_opt_(*pulLength) PVOID Buffer, + _Inout_ PULONG pulLength, + _In_ ULONG ulFlags, + _In_opt_ HMACHINE hMachine) { PVOID BufferW; ULONG LengthW; ULONG ulDataType = REG_NONE; CONFIGRET ret; - TRACE("%lx %lu %p %p %p %lx %lx\n", + TRACE("CM_Get_DevNode_Registry_Property_ExA(%lx %lu %p %p %p %lx %lx)\n", dnDevInst, ulProperty, pulRegDataType, Buffer, pulLength, ulFlags, hMachine); @@ -3026,9 +3162,16 @@ CONFIGRET WINAPI CM_Get_DevNode_Registry_Property_ExA( /*********************************************************************** * CM_Get_DevNode_Registry_Property_ExW [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Get_DevNode_Registry_Property_ExW( - DEVINST dnDevInst, ULONG ulProperty, PULONG pulRegDataType, - PVOID Buffer, PULONG pulLength, ULONG ulFlags, HMACHINE hMachine) +CONFIGRET +WINAPI +CM_Get_DevNode_Registry_Property_ExW( + _In_ DEVINST dnDevInst, + _In_ ULONG ulProperty, + _Out_opt_ PULONG pulRegDataType, + _Out_writes_bytes_opt_(*pulLength) PVOID Buffer, + _Inout_ PULONG pulLength, + _In_ ULONG ulFlags, + _In_opt_ HMACHINE hMachine) { RPC_BINDING_HANDLE BindingHandle = NULL; HSTRING_TABLE StringTable = NULL; @@ -3037,7 +3180,7 @@ CONFIGRET WINAPI CM_Get_DevNode_Registry_Property_ExW( ULONG ulDataType = REG_NONE; ULONG ulTransferLength = 0; - TRACE("%lx %lu %p %p %p %lx %lx\n", + TRACE("CM_Get_DevNode_Registry_Property_ExW(%lx %lu %p %p %p %lx %lx)\n", dnDevInst, ulProperty, pulRegDataType, Buffer, pulLength, ulFlags, hMachine); @@ -3112,12 +3255,17 @@ CONFIGRET WINAPI CM_Get_DevNode_Registry_Property_ExW( /*********************************************************************** * CM_Get_DevNode_Status [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Get_DevNode_Status( - PULONG pulStatus, PULONG pulProblemNumber, DEVINST dnDevInst, - ULONG ulFlags) +CONFIGRET +WINAPI +CM_Get_DevNode_Status( + _Out_ PULONG pulStatus, + _Out_ PULONG pulProblemNumber, + _In_ DEVINST dnDevInst, + _In_ ULONG ulFlags) { - TRACE("%p %p %lx %lx\n", + TRACE("CM_Get_DevNode_Status(%p %p %lx %lx)\n", pulStatus, pulProblemNumber, dnDevInst, ulFlags); + return CM_Get_DevNode_Status_Ex(pulStatus, pulProblemNumber, dnDevInst, ulFlags, NULL); } @@ -3126,17 +3274,21 @@ CONFIGRET WINAPI CM_Get_DevNode_Status( /*********************************************************************** * CM_Get_DevNode_Status_Ex [SETUPAPI.@] */ -CONFIGRET WINAPI +CONFIGRET +WINAPI CM_Get_DevNode_Status_Ex( - PULONG pulStatus, PULONG pulProblemNumber, DEVINST dnDevInst, - ULONG ulFlags, HMACHINE hMachine) + _Out_ PULONG pulStatus, + _Out_ PULONG pulProblemNumber, + _In_ DEVINST dnDevInst, + _In_ ULONG ulFlags, + _In_opt_ HMACHINE hMachine) { RPC_BINDING_HANDLE BindingHandle = NULL; HSTRING_TABLE StringTable = NULL; LPWSTR lpDevInst; CONFIGRET ret; - TRACE("%p %p %lx %lx %lx\n", + TRACE("CM_Get_DevNode_Status_Ex(%p %p %lx %lx %lx)\n", pulStatus, pulProblemNumber, dnDevInst, ulFlags, hMachine); if (pulStatus == NULL || pulProblemNumber == NULL) @@ -3189,11 +3341,17 @@ CM_Get_DevNode_Status_Ex( /*********************************************************************** * CM_Get_Device_IDA [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Get_Device_IDA( - DEVINST dnDevInst, PCHAR Buffer, ULONG BufferLen, ULONG ulFlags) +CONFIGRET +WINAPI +CM_Get_Device_IDA( + _In_ DEVINST dnDevInst, + _Out_writes_(BufferLen) PCHAR Buffer, + _In_ ULONG BufferLen, + _In_ ULONG ulFlags) { - TRACE("%lx %p %ld %ld\n", + TRACE("CM_Get_Device_IDA(%lx %p %ld %lx)\n", dnDevInst, Buffer, BufferLen, ulFlags); + return CM_Get_Device_ID_ExA(dnDevInst, Buffer, BufferLen, ulFlags, NULL); } @@ -3201,11 +3359,17 @@ CONFIGRET WINAPI CM_Get_Device_IDA( /*********************************************************************** * CM_Get_Device_IDW [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Get_Device_IDW( - DEVINST dnDevInst, PWCHAR Buffer, ULONG BufferLen, ULONG ulFlags) +CONFIGRET +WINAPI +CM_Get_Device_IDW( + _In_ DEVINST dnDevInst, + _Out_writes_(BufferLen) PWCHAR Buffer, + _In_ ULONG BufferLen, + _In_ ULONG ulFlags) { - TRACE("%lx %p %ld %ld\n", + TRACE("CM_Get_Device_IDW(%lx %p %ld %lx)\n", dnDevInst, Buffer, BufferLen, ulFlags); + return CM_Get_Device_ID_ExW(dnDevInst, Buffer, BufferLen, ulFlags, NULL); } @@ -3213,14 +3377,19 @@ CONFIGRET WINAPI CM_Get_Device_IDW( /*********************************************************************** * CM_Get_Device_ID_ExA [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Get_Device_ID_ExA( - DEVINST dnDevInst, PCHAR Buffer, ULONG BufferLen, ULONG ulFlags, - HMACHINE hMachine) +CONFIGRET +WINAPI +CM_Get_Device_ID_ExA( + _In_ DEVINST dnDevInst, + _Out_writes_(BufferLen) PCHAR Buffer, + _In_ ULONG BufferLen, + _In_ ULONG ulFlags, + _In_opt_ HMACHINE hMachine) { WCHAR szBufferW[MAX_DEVICE_ID_LEN]; CONFIGRET ret = CR_SUCCESS; - TRACE("%lx %p %ld %ld %lx\n", + TRACE("CM_Get_Device_ID_ExA(%lx %p %ld %ld %lx)\n", dnDevInst, Buffer, BufferLen, ulFlags, hMachine); if (Buffer == NULL) @@ -3251,13 +3420,18 @@ CONFIGRET WINAPI CM_Get_Device_ID_ExA( /*********************************************************************** * CM_Get_Device_ID_ExW [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Get_Device_ID_ExW( - DEVINST dnDevInst, PWCHAR Buffer, ULONG BufferLen, ULONG ulFlags, - HMACHINE hMachine) +CONFIGRET +WINAPI +CM_Get_Device_ID_ExW( + _In_ DEVINST dnDevInst, + _Out_writes_(BufferLen) PWCHAR Buffer, + _In_ ULONG BufferLen, + _In_ ULONG ulFlags, + _In_opt_ HMACHINE hMachine) { HSTRING_TABLE StringTable = NULL; - TRACE("%lx %p %ld %ld %lx\n", + TRACE("CM_Get_Device_ID_ExW(%lx %p %ld %lx %lx)\n", dnDevInst, Buffer, BufferLen, ulFlags, hMachine); if (dnDevInst == 0) @@ -3294,10 +3468,17 @@ CONFIGRET WINAPI CM_Get_Device_ID_ExW( /*********************************************************************** * CM_Get_Device_ID_ListA [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Get_Device_ID_ListA( - PCSTR pszFilter, PCHAR Buffer, ULONG BufferLen, ULONG ulFlags) +CONFIGRET +WINAPI +CM_Get_Device_ID_ListA( + _In_ PCSTR pszFilter, + _Out_writes_(BufferLen) PCHAR Buffer, + _In_ ULONG BufferLen, + _In_ ULONG ulFlags) { - TRACE("%p %p %ld %ld\n", pszFilter, Buffer, BufferLen, ulFlags); + TRACE("CM_Get_Device_ID_ListA(%p %p %ld %lx)\n", + pszFilter, Buffer, BufferLen, ulFlags); + return CM_Get_Device_ID_List_ExA(pszFilter, Buffer, BufferLen, ulFlags, NULL); } @@ -3306,10 +3487,17 @@ CONFIGRET WINAPI CM_Get_Device_ID_ListA( /*********************************************************************** * CM_Get_Device_ID_ListW [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Get_Device_ID_ListW( - PCWSTR pszFilter, PWCHAR Buffer, ULONG BufferLen, ULONG ulFlags) +CONFIGRET +WINAPI +CM_Get_Device_ID_ListW( + _In_ PCWSTR pszFilter, + _Out_writes_(BufferLen) PWCHAR Buffer, + _In_ ULONG BufferLen, + _In_ ULONG ulFlags) { - TRACE("%p %p %ld %ld\n", pszFilter, Buffer, BufferLen, ulFlags); + TRACE("CM_Get_Device_ID_ListW(%p %p %ld %lx)\n", + pszFilter, Buffer, BufferLen, ulFlags); + return CM_Get_Device_ID_List_ExW(pszFilter, Buffer, BufferLen, ulFlags, NULL); } @@ -3318,15 +3506,20 @@ CONFIGRET WINAPI CM_Get_Device_ID_ListW( /*********************************************************************** * CM_Get_Device_ID_List_ExA [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Get_Device_ID_List_ExA( - PCSTR pszFilter, PCHAR Buffer, ULONG BufferLen, ULONG ulFlags, - HMACHINE hMachine) +CONFIGRET +WINAPI +CM_Get_Device_ID_List_ExA( + _In_ PCSTR pszFilter, + _Out_writes_(BufferLen) PCHAR Buffer, + _In_ ULONG BufferLen, + _In_ ULONG ulFlags, + _In_opt_ HMACHINE hMachine) { LPWSTR BufferW = NULL; LPWSTR pszFilterW = NULL; CONFIGRET ret = CR_SUCCESS; - TRACE("%p %p %ld %ld %lx\n", + TRACE("CM_Get_Device_ID_List_ExA(%p %p %ld %lx %lx)\n", pszFilter, Buffer, BufferLen, ulFlags, hMachine); BufferW = MyMalloc(BufferLen * sizeof(WCHAR)); @@ -3378,14 +3571,19 @@ Done: /*********************************************************************** * CM_Get_Device_ID_List_ExW [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Get_Device_ID_List_ExW( - PCWSTR pszFilter, PWCHAR Buffer, ULONG BufferLen, ULONG ulFlags, - HMACHINE hMachine) +CONFIGRET +WINAPI +CM_Get_Device_ID_List_ExW( + _In_ PCWSTR pszFilter, + _Out_writes_(BufferLen) PWCHAR Buffer, + _In_ ULONG BufferLen, + _In_ ULONG ulFlags, + _In_opt_ HMACHINE hMachine) { RPC_BINDING_HANDLE BindingHandle = NULL; CONFIGRET ret; - TRACE("%p %p %ld %ld %lx\n", + TRACE("CM_Get_Device_ID_List_ExW(%p %p %ld %lx %lx)\n", pszFilter, Buffer, BufferLen, ulFlags, hMachine); if (Buffer == NULL || BufferLen == 0) @@ -3429,10 +3627,16 @@ CONFIGRET WINAPI CM_Get_Device_ID_List_ExW( /*********************************************************************** * CM_Get_Device_ID_List_SizeA [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Get_Device_ID_List_SizeA( - PULONG pulLen, PCSTR pszFilter, ULONG ulFlags) +CONFIGRET +WINAPI +CM_Get_Device_ID_List_SizeA( + _Out_ PULONG pulLen, + _In_opt_ PCSTR pszFilter, + _In_ ULONG ulFlags) { - TRACE("%p %s %ld\n", pulLen, pszFilter, ulFlags); + TRACE("CM_Get_Device_ID_List_SizeA(%p %s %lx)\n", + pulLen, debugstr_a(pszFilter), ulFlags); + return CM_Get_Device_ID_List_Size_ExA(pulLen, pszFilter, ulFlags, NULL); } @@ -3440,10 +3644,16 @@ CONFIGRET WINAPI CM_Get_Device_ID_List_SizeA( /*********************************************************************** * CM_Get_Device_ID_List_SizeW [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Get_Device_ID_List_SizeW( - PULONG pulLen, PCWSTR pszFilter, ULONG ulFlags) +CONFIGRET +WINAPI +CM_Get_Device_ID_List_SizeW( + _Out_ PULONG pulLen, + _In_opt_ PCWSTR pszFilter, + _In_ ULONG ulFlags) { - TRACE("%p %s %ld\n", pulLen, debugstr_w(pszFilter), ulFlags); + TRACE("CM_Get_Device_ID_List_SizeW(%p %s %lx)\n", + pulLen, debugstr_w(pszFilter), ulFlags); + return CM_Get_Device_ID_List_Size_ExW(pulLen, pszFilter, ulFlags, NULL); } @@ -3451,13 +3661,19 @@ CONFIGRET WINAPI CM_Get_Device_ID_List_SizeW( /*********************************************************************** * CM_Get_Device_ID_List_Size_ExA [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Get_Device_ID_List_Size_ExA( - PULONG pulLen, PCSTR pszFilter, ULONG ulFlags, HMACHINE hMachine) +CONFIGRET +WINAPI +CM_Get_Device_ID_List_Size_ExA( + _Out_ PULONG pulLen, + _In_opt_ PCSTR pszFilter, + _In_ ULONG ulFlags, + _In_opt_ HMACHINE hMachine) { LPWSTR pszFilterW = NULL; CONFIGRET ret = CR_SUCCESS; - FIXME("%p %s %lx %lx\n", pulLen, pszFilter, ulFlags, hMachine); + FIXME("CM_Get_Device_ID_List_Size_ExA(%p %s %lx %lx)\n", + pulLen, debugstr_a(pszFilter), ulFlags, hMachine); if (pszFilter == NULL) { @@ -3486,13 +3702,19 @@ CONFIGRET WINAPI CM_Get_Device_ID_List_Size_ExA( /*********************************************************************** * CM_Get_Device_ID_List_Size_ExW [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Get_Device_ID_List_Size_ExW( - PULONG pulLen, PCWSTR pszFilter, ULONG ulFlags, HMACHINE hMachine) +CONFIGRET +WINAPI +CM_Get_Device_ID_List_Size_ExW( + _Out_ PULONG pulLen, + _In_opt_ PCWSTR pszFilter, + _In_ ULONG ulFlags, + _In_opt_ HMACHINE hMachine) { RPC_BINDING_HANDLE BindingHandle = NULL; CONFIGRET ret; - FIXME("%p %s %ld %lx\n", pulLen, debugstr_w(pszFilter), ulFlags, hMachine); + FIXME("CM_Get_Device_ID_List_Size_ExW(%p %s %lx %lx)\n", + pulLen, debugstr_w(pszFilter), ulFlags, hMachine); if (pulLen == NULL) return CR_INVALID_POINTER; @@ -3534,10 +3756,16 @@ CONFIGRET WINAPI CM_Get_Device_ID_List_Size_ExW( /*********************************************************************** * CM_Get_Device_ID_Size [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Get_Device_ID_Size( - PULONG pulLen, DEVINST dnDevInst, ULONG ulFlags) +CONFIGRET +WINAPI +CM_Get_Device_ID_Size( + _Out_ PULONG pulLen, + _In_ DEVINST dnDevInst, + _In_ ULONG ulFlags) { - TRACE("%p %lx %lx\n", pulLen, dnDevInst, ulFlags); + TRACE("CM_Get_Device_ID_Size(%p %lx %lx)\n", + pulLen, dnDevInst, ulFlags); + return CM_Get_Device_ID_Size_Ex(pulLen, dnDevInst, ulFlags, NULL); } @@ -3545,13 +3773,19 @@ CONFIGRET WINAPI CM_Get_Device_ID_Size( /*********************************************************************** * CM_Get_Device_ID_Size_Ex [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Get_Device_ID_Size_Ex( - PULONG pulLen, DEVINST dnDevInst, ULONG ulFlags, HMACHINE hMachine) +CONFIGRET +WINAPI +CM_Get_Device_ID_Size_Ex( + _Out_ PULONG pulLen, + _In_ DEVINST dnDevInst, + _In_ ULONG ulFlags, + _In_opt_ HMACHINE hMachine) { HSTRING_TABLE StringTable = NULL; LPWSTR DeviceId; - TRACE("%p %lx %lx %lx\n", pulLen, dnDevInst, ulFlags, hMachine); + TRACE("CM_Get_Device_ID_Size_Ex(%p %lx %lx %lx)\n", + pulLen, dnDevInst, ulFlags, hMachine); if (pulLen == NULL) return CR_INVALID_POINTER; @@ -3590,11 +3824,17 @@ CONFIGRET WINAPI CM_Get_Device_ID_Size_Ex( /*********************************************************************** * CM_Get_Device_Interface_AliasA [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Get_Device_Interface_AliasA( - LPCSTR pszDeviceInterface, LPGUID AliasInterfaceGuid, - LPSTR pszAliasDeviceInterface, PULONG pulLength, ULONG ulFlags) +CONFIGRET +WINAPI +CM_Get_Device_Interface_AliasA( + _In_ LPCSTR pszDeviceInterface, + _In_ LPGUID AliasInterfaceGuid, + _Out_writes_(*pulLength) LPSTR pszAliasDeviceInterface, + _Inout_ PULONG pulLength, + _In_ ULONG ulFlags) { - TRACE("%p %p %p %p %lu\n", pszDeviceInterface, AliasInterfaceGuid, + TRACE("CM_Get_Device_Interface_AliasA(%p %p %p %p %lx)\n", + pszDeviceInterface, AliasInterfaceGuid, pszAliasDeviceInterface, pulLength, ulFlags); return CM_Get_Device_Interface_Alias_ExA(pszDeviceInterface, @@ -3606,11 +3846,17 @@ CONFIGRET WINAPI CM_Get_Device_Interface_AliasA( /*********************************************************************** * CM_Get_Device_Interface_AliasW [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Get_Device_Interface_AliasW( - LPCWSTR pszDeviceInterface, LPGUID AliasInterfaceGuid, - LPWSTR pszAliasDeviceInterface, PULONG pulLength, ULONG ulFlags) +CONFIGRET +WINAPI +CM_Get_Device_Interface_AliasW( + _In_ LPCWSTR pszDeviceInterface, + _In_ LPGUID AliasInterfaceGuid, + _Out_writes_(*pulLength) LPWSTR pszAliasDeviceInterface, + _Inout_ PULONG pulLength, + _In_ ULONG ulFlags) { - TRACE("%p %p %p %p %lu\n", pszDeviceInterface, AliasInterfaceGuid, + TRACE("CM_Get_Device_Interface_AliasW(%p %p %p %p %lx)\n", + pszDeviceInterface, AliasInterfaceGuid, pszAliasDeviceInterface, pulLength, ulFlags); return CM_Get_Device_Interface_Alias_ExW(pszDeviceInterface, @@ -3622,11 +3868,18 @@ CONFIGRET WINAPI CM_Get_Device_Interface_AliasW( /*********************************************************************** * CM_Get_Device_Interface_Alias_ExA [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Get_Device_Interface_Alias_ExA( - LPCSTR pszDeviceInterface, LPGUID AliasInterfaceGuid, LPSTR pszAliasDeviceInterface, - PULONG pulLength, ULONG ulFlags, HMACHINE hMachine) +CONFIGRET +WINAPI +CM_Get_Device_Interface_Alias_ExA( + _In_ LPCSTR pszDeviceInterface, + _In_ LPGUID AliasInterfaceGuid, + _Out_writes_(*pulLength) LPSTR pszAliasDeviceInterface, + _Inout_ PULONG pulLength, + _In_ ULONG ulFlags, + _In_opt_ HMACHINE hMachine) { - FIXME("%p %p %p %p %lu %lx\n", pszDeviceInterface, AliasInterfaceGuid, + FIXME("CM_Get_Device_Interface_Alias_ExA(%p %p %p %p %lx %lx)\n", + pszDeviceInterface, AliasInterfaceGuid, pszAliasDeviceInterface, pulLength, ulFlags, hMachine); return CR_CALL_NOT_IMPLEMENTED; @@ -3636,15 +3889,22 @@ CONFIGRET WINAPI CM_Get_Device_Interface_Alias_ExA( /*********************************************************************** * CM_Get_Device_Interface_Alias_ExW [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Get_Device_Interface_Alias_ExW( - LPCWSTR pszDeviceInterface, LPGUID AliasInterfaceGuid, LPWSTR pszAliasDeviceInterface, - PULONG pulLength, ULONG ulFlags, HMACHINE hMachine) +CONFIGRET +WINAPI +CM_Get_Device_Interface_Alias_ExW( + _In_ LPCWSTR pszDeviceInterface, + _In_ LPGUID AliasInterfaceGuid, + _Out_writes_(*pulLength) LPWSTR pszAliasDeviceInterface, + _Inout_ PULONG pulLength, + _In_ ULONG ulFlags, + _In_opt_ HMACHINE hMachine) { RPC_BINDING_HANDLE BindingHandle = NULL; ULONG ulTransferLength; CONFIGRET ret = CR_SUCCESS; - TRACE("%p %p %p %p %lu %lx\n", pszDeviceInterface, AliasInterfaceGuid, + TRACE("CM_Get_Device_Interface_Alias_ExW(%p %p %p %p %lx %lx)\n", + pszDeviceInterface, AliasInterfaceGuid, pszAliasDeviceInterface, pulLength, ulFlags, hMachine); if (pszDeviceInterface == NULL || @@ -3693,12 +3953,18 @@ CONFIGRET WINAPI CM_Get_Device_Interface_Alias_ExW( /*********************************************************************** * CM_Get_Device_Interface_ListA (SETUPAPI.@) */ -CONFIGRET WINAPI CM_Get_Device_Interface_ListA( - LPGUID InterfaceClassGuid, DEVINSTID_A pDeviceID, PCHAR Buffer, - ULONG BufferLen, ULONG ulFlags) +CONFIGRET +WINAPI +CM_Get_Device_Interface_ListA( + _In_ LPGUID InterfaceClassGuid, + _In_opt_ DEVINSTID_A pDeviceID, + _Out_writes_(BufferLen) PCHAR Buffer, + _In_ ULONG BufferLen, + _In_ ULONG ulFlags) { - TRACE("%s %s %p %lu 0x%08lx\n", debugstr_guid(InterfaceClassGuid), - pDeviceID, Buffer, BufferLen, ulFlags); + TRACE("CM_Get_Device_Interface_ListA(%s %s %p %lu 0x%08lx)\n", + debugstr_guid(InterfaceClassGuid), debugstr_a(pDeviceID), + Buffer, BufferLen, ulFlags); return CM_Get_Device_Interface_List_ExA(InterfaceClassGuid, pDeviceID, Buffer, BufferLen, ulFlags, NULL); @@ -3708,12 +3974,18 @@ CONFIGRET WINAPI CM_Get_Device_Interface_ListA( /*********************************************************************** * CM_Get_Device_Interface_ListW (SETUPAPI.@) */ -CONFIGRET WINAPI CM_Get_Device_Interface_ListW( - LPGUID InterfaceClassGuid, DEVINSTID_W pDeviceID, PWCHAR Buffer, - ULONG BufferLen, ULONG ulFlags) +CONFIGRET +WINAPI +CM_Get_Device_Interface_ListW( + _In_ LPGUID InterfaceClassGuid, + _In_opt_ DEVINSTID_W pDeviceID, + _Out_writes_(BufferLen) PWCHAR Buffer, + _In_ ULONG BufferLen, + _In_ ULONG ulFlags) { - TRACE("%s %s %p %lu 0x%08lx\n", debugstr_guid(InterfaceClassGuid), - debugstr_w(pDeviceID), Buffer, BufferLen, ulFlags); + TRACE("CM_Get_Device_Interface_ListW(%s %s %p %lu 0x%08lx)\n", + debugstr_guid(InterfaceClassGuid), debugstr_w(pDeviceID), + Buffer, BufferLen, ulFlags); return CM_Get_Device_Interface_List_ExW(InterfaceClassGuid, pDeviceID, Buffer, BufferLen, ulFlags, NULL); @@ -3723,16 +3995,23 @@ CONFIGRET WINAPI CM_Get_Device_Interface_ListW( /*********************************************************************** * CM_Get_Device_Interface_List_ExA (SETUPAPI.@) */ -CONFIGRET WINAPI CM_Get_Device_Interface_List_ExA( - LPGUID InterfaceClassGuid, DEVINSTID_A pDeviceID, PCHAR Buffer, - ULONG BufferLen, ULONG ulFlags, HMACHINE hMachine) +CONFIGRET +WINAPI +CM_Get_Device_Interface_List_ExA( + _In_ LPGUID InterfaceClassGuid, + _In_opt_ DEVINSTID_A pDeviceID, + _Out_writes_(BufferLen) PCHAR Buffer, + _In_ ULONG BufferLen, + _In_ ULONG ulFlags, + _In_opt_ HMACHINE hMachine) { DEVINSTID_W pDeviceIdW = NULL; PWCHAR BufferW = NULL; CONFIGRET ret = CR_SUCCESS; - TRACE("%s %s %p %lu 0x%08lx %p\n", debugstr_guid(InterfaceClassGuid), - pDeviceID, Buffer, BufferLen, ulFlags, hMachine); + TRACE("CM_Get_Device_Interface_List_ExA(%s %s %p %lu 0x%08lx %p)\n", + debugstr_guid(InterfaceClassGuid), debugstr_a(pDeviceID), + Buffer, BufferLen, ulFlags, hMachine); if (Buffer == NULL || BufferLen == 0) @@ -3781,16 +4060,23 @@ Done: /*********************************************************************** * CM_Get_Device_Interface_List_ExW (SETUPAPI.@) */ -CONFIGRET WINAPI CM_Get_Device_Interface_List_ExW( - LPGUID InterfaceClassGuid, DEVINSTID_W pDeviceID, PWCHAR Buffer, - ULONG BufferLen, ULONG ulFlags, HMACHINE hMachine) +CONFIGRET +WINAPI +CM_Get_Device_Interface_List_ExW( + _In_ LPGUID InterfaceClassGuid, + _In_opt_ DEVINSTID_W pDeviceID, + _Out_writes_(BufferLen) PWCHAR Buffer, + _In_ ULONG BufferLen, + _In_ ULONG ulFlags, + _In_opt_ HMACHINE hMachine) { RPC_BINDING_HANDLE BindingHandle = NULL; PNP_RPC_BUFFER_SIZE BufferSize = 0; CONFIGRET ret = CR_SUCCESS; - TRACE("%s %s %p %lu 0x%08lx %p\n", debugstr_guid(InterfaceClassGuid), - debugstr_w(pDeviceID), Buffer, BufferLen, ulFlags, hMachine); + TRACE("CM_Get_Device_Interface_List_ExW(%s %s %p %lu 0x%08lx %p)\n", + debugstr_guid(InterfaceClassGuid), debugstr_w(pDeviceID), + Buffer, BufferLen, ulFlags, hMachine); if (Buffer == NULL || BufferLen == 0) @@ -3836,52 +4122,65 @@ CONFIGRET WINAPI CM_Get_Device_Interface_List_ExW( /*********************************************************************** * CM_Get_Device_Interface_List_SizeA (SETUPAPI.@) */ -CONFIGRET WINAPI CM_Get_Device_Interface_List_SizeA( - PULONG pulLen, LPGUID InterfaceClassGuid, DEVINSTID_A pDeviceId, - ULONG ulFlags) +CONFIGRET +WINAPI +CM_Get_Device_Interface_List_SizeA( + _Out_ PULONG pulLen, + _In_ LPGUID InterfaceClassGuid, + _In_opt_ DEVINSTID_A pDeviceID, + _In_ ULONG ulFlags) { - TRACE("%p %p %s 0x%08lx\n", pulLen, InterfaceClassGuid, - pDeviceId, ulFlags); + TRACE("CM_Get_Device_Interface_List_SizeA(%p %p %s 0x%08lx)\n", + pulLen, InterfaceClassGuid, debugstr_a(pDeviceID), ulFlags); return CM_Get_Device_Interface_List_Size_ExA(pulLen, InterfaceClassGuid, - pDeviceId, ulFlags, NULL); + pDeviceID, ulFlags, NULL); } /*********************************************************************** * CM_Get_Device_Interface_List_SizeW (SETUPAPI.@) */ -CONFIGRET WINAPI CM_Get_Device_Interface_List_SizeW( - PULONG pulLen, LPGUID InterfaceClassGuid, DEVINSTID_W pDeviceId, - ULONG ulFlags) +CONFIGRET +WINAPI +CM_Get_Device_Interface_List_SizeW( + _Out_ PULONG pulLen, + _In_ LPGUID InterfaceClassGuid, + _In_opt_ DEVINSTID_W pDeviceID, + _In_ ULONG ulFlags) { - TRACE("%p %p %s 0x%08lx\n", pulLen, InterfaceClassGuid, - debugstr_w(pDeviceId), ulFlags); + TRACE("CM_Get_Device_Interface_List_SizeW(%p %p %s 0x%08lx)\n", + pulLen, InterfaceClassGuid, debugstr_w(pDeviceID), ulFlags); return CM_Get_Device_Interface_List_Size_ExW(pulLen, InterfaceClassGuid, - pDeviceId, ulFlags, NULL); + pDeviceID, ulFlags, NULL); } /*********************************************************************** * CM_Get_Device_Interface_List_Size_ExA (SETUPAPI.@) */ -CONFIGRET WINAPI CM_Get_Device_Interface_List_Size_ExA( - PULONG pulLen, LPGUID InterfaceClassGuid, DEVINSTID_A pDeviceId, - ULONG ulFlags, HMACHINE hMachine) +CONFIGRET +WINAPI +CM_Get_Device_Interface_List_Size_ExA( + _Out_ PULONG pulLen, + _In_ LPGUID InterfaceClassGuid, + _In_opt_ DEVINSTID_A pDeviceID, + _In_ ULONG ulFlags, + _In_opt_ HMACHINE hMachine) { DEVINSTID_W pDeviceIdW = NULL; CONFIGRET ret = CR_SUCCESS; - TRACE("%p %p %s 0x%08lx %p\n", pulLen, InterfaceClassGuid, - pDeviceId, ulFlags, hMachine); + TRACE("CM_Get_Device_Interface_List_Size_ExA(%p %p %s 0x%08lx %p)\n", + pulLen, InterfaceClassGuid, debugstr_a(pDeviceID), ulFlags, hMachine); if (pulLen == NULL) return CR_INVALID_POINTER; - if (pDeviceId != NULL) + if (pDeviceID != NULL) { - if (!pSetupCaptureAndConvertAnsiArg(pDeviceId, &pDeviceIdW)) + if (!pSetupCaptureAndConvertAnsiArg(pDeviceID, &pDeviceIdW)) return CR_INVALID_DEVICE_ID; } @@ -3900,15 +4199,20 @@ CONFIGRET WINAPI CM_Get_Device_Interface_List_Size_ExA( /*********************************************************************** * CM_Get_Device_Interface_List_Size_ExW (SETUPAPI.@) */ -CONFIGRET WINAPI CM_Get_Device_Interface_List_Size_ExW( - PULONG pulLen, LPGUID InterfaceClassGuid, DEVINSTID_W pDeviceId, - ULONG ulFlags, HMACHINE hMachine) +CONFIGRET +WINAPI +CM_Get_Device_Interface_List_Size_ExW( + _Out_ PULONG pulLen, + _In_ LPGUID InterfaceClassGuid, + _In_opt_ DEVINSTID_W pDeviceID, + _In_ ULONG ulFlags, + _In_opt_ HMACHINE hMachine) { RPC_BINDING_HANDLE BindingHandle = NULL; CONFIGRET ret = CR_SUCCESS; - TRACE("%p %p %s 0x%08lx %p\n", pulLen, InterfaceClassGuid, - debugstr_w(pDeviceId), ulFlags, hMachine); + TRACE("CM_Get_Device_Interface_List_Size_ExW(%p %p %s 0x%08lx %p)\n", + pulLen, InterfaceClassGuid, debugstr_w(pDeviceID), ulFlags, hMachine); if (pulLen == NULL) return CR_INVALID_POINTER; @@ -3935,7 +4239,7 @@ CONFIGRET WINAPI CM_Get_Device_Interface_List_Size_ExW( ret = PNP_GetInterfaceDeviceListSize(BindingHandle, pulLen, InterfaceClassGuid, - pDeviceId, + pDeviceID, ulFlags); } RpcExcept(EXCEPTION_EXECUTE_HANDLER) @@ -3951,10 +4255,16 @@ CONFIGRET WINAPI CM_Get_Device_Interface_List_Size_ExW( /*********************************************************************** * CM_Get_First_Log_Conf [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Get_First_Log_Conf( - PLOG_CONF plcLogConf, DEVINST dnDevInst, ULONG ulFlags) +CONFIGRET +WINAPI +CM_Get_First_Log_Conf( + _Out_opt_ PLOG_CONF plcLogConf, + _In_ DEVINST dnDevInst, + _In_ ULONG ulFlags) { - TRACE("%p %lx %lx\n", plcLogConf, dnDevInst, ulFlags); + TRACE("CM_Get_First_Log_Conf(%p %lx %lx)\n", + plcLogConf, dnDevInst, ulFlags); + return CM_Get_First_Log_Conf_Ex(plcLogConf, dnDevInst, ulFlags, NULL); } @@ -3962,8 +4272,13 @@ CONFIGRET WINAPI CM_Get_First_Log_Conf( /*********************************************************************** * CM_Get_First_Log_Conf_Ex [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Get_First_Log_Conf_Ex( - PLOG_CONF plcLogConf, DEVINST dnDevInst, ULONG ulFlags, HMACHINE hMachine) +CONFIGRET +WINAPI +CM_Get_First_Log_Conf_Ex( + _Out_opt_ PLOG_CONF plcLogConf, + _In_ DEVINST dnDevInst, + _In_ ULONG ulFlags, + _In_opt_ HMACHINE hMachine) { RPC_BINDING_HANDLE BindingHandle = NULL; HSTRING_TABLE StringTable = NULL; @@ -3972,7 +4287,8 @@ CONFIGRET WINAPI CM_Get_First_Log_Conf_Ex( ULONG ulTag; PLOG_CONF_INFO pLogConfInfo; - FIXME("%p %lx %lx %lx\n", plcLogConf, dnDevInst, ulFlags, hMachine); + FIXME("CM_Get_First_Log_Conf_Ex(%p %lx %lx %lx)\n", + plcLogConf, dnDevInst, ulFlags, hMachine); if (dnDevInst == 0) return CR_INVALID_DEVINST; @@ -4041,10 +4357,15 @@ CONFIGRET WINAPI CM_Get_First_Log_Conf_Ex( /*********************************************************************** * CM_Get_Global_State [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Get_Global_State( - PULONG pulState, ULONG ulFlags) +CONFIGRET +WINAPI +CM_Get_Global_State( + _Out_ PULONG pulState, + _In_ ULONG ulFlags) { - TRACE("%p %lx\n", pulState, ulFlags); + TRACE("CM_Get_Global_State(%p %lx)\n", + pulState, ulFlags); + return CM_Get_Global_State_Ex(pulState, ulFlags, NULL); } @@ -4052,13 +4373,18 @@ CONFIGRET WINAPI CM_Get_Global_State( /*********************************************************************** * CM_Get_Global_State_Ex [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Get_Global_State_Ex( - PULONG pulState, ULONG ulFlags, HMACHINE hMachine) +CONFIGRET +WINAPI +CM_Get_Global_State_Ex( + _Out_ PULONG pulState, + _In_ ULONG ulFlags, + _In_opt_ HMACHINE hMachine) { RPC_BINDING_HANDLE BindingHandle = NULL; CONFIGRET ret; - TRACE("%p %lx %lx\n", pulState, ulFlags, hMachine); + TRACE("CM_Get_Global_State_Ex(%p %lx %lx)\n", + pulState, ulFlags, hMachine); if (pulState == NULL) return CR_INVALID_POINTER; @@ -4095,12 +4421,16 @@ CONFIGRET WINAPI CM_Get_Global_State_Ex( /*********************************************************************** * CM_Get_HW_Prof_FlagsA [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Get_HW_Prof_FlagsA( - DEVINSTID_A szDevInstName, ULONG ulHardwareProfile, PULONG pulValue, - ULONG ulFlags) +CONFIGRET +WINAPI +CM_Get_HW_Prof_FlagsA( + _In_ DEVINSTID_A szDevInstName, + _In_ ULONG ulHardwareProfile, + _Out_ PULONG pulValue, + _In_ ULONG ulFlags) { - TRACE("%s %lu %p %lx\n", szDevInstName, - ulHardwareProfile, pulValue, ulFlags); + TRACE("CM_Get_HW_Prof_FlagsA(%s %lu %p %lx)\n", + debugstr_a(szDevInstName), ulHardwareProfile, pulValue, ulFlags); return CM_Get_HW_Prof_Flags_ExA(szDevInstName, ulHardwareProfile, pulValue, ulFlags, NULL); @@ -4110,12 +4440,16 @@ CONFIGRET WINAPI CM_Get_HW_Prof_FlagsA( /*********************************************************************** * CM_Get_HW_Prof_FlagsW [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Get_HW_Prof_FlagsW( - DEVINSTID_W szDevInstName, ULONG ulHardwareProfile, PULONG pulValue, - ULONG ulFlags) +CONFIGRET +WINAPI +CM_Get_HW_Prof_FlagsW( + _In_ DEVINSTID_W szDevInstName, + _In_ ULONG ulHardwareProfile, + _Out_ PULONG pulValue, + _In_ ULONG ulFlags) { - TRACE("%s %lu %p %lx\n", debugstr_w(szDevInstName), - ulHardwareProfile, pulValue, ulFlags); + TRACE("CM_Get_HW_Prof_FlagsW(%s %lu %p %lx)\n", + debugstr_w(szDevInstName), ulHardwareProfile, pulValue, ulFlags); return CM_Get_HW_Prof_Flags_ExW(szDevInstName, ulHardwareProfile, pulValue, ulFlags, NULL); @@ -4125,15 +4459,20 @@ CONFIGRET WINAPI CM_Get_HW_Prof_FlagsW( /*********************************************************************** * CM_Get_HW_Prof_Flags_ExA [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Get_HW_Prof_Flags_ExA( - DEVINSTID_A szDevInstName, ULONG ulHardwareProfile, PULONG pulValue, - ULONG ulFlags, HMACHINE hMachine) +CONFIGRET +WINAPI +CM_Get_HW_Prof_Flags_ExA( + _In_ DEVINSTID_A szDevInstName, + _In_ ULONG ulHardwareProfile, + _Out_ PULONG pulValue, + _In_ ULONG ulFlags, + _In_opt_ HMACHINE hMachine) { DEVINSTID_W pszDevIdW = NULL; CONFIGRET ret = CR_SUCCESS; - TRACE("%s %lu %p %lx %lx\n", szDevInstName, - ulHardwareProfile, pulValue, ulFlags, hMachine); + TRACE("CM_Get_HW_Prof_Flags_ExA(%s %lu %p %lx %lx)\n", + debugstr_a(szDevInstName), ulHardwareProfile, pulValue, ulFlags, hMachine); if (szDevInstName != NULL) { @@ -4154,15 +4493,20 @@ CONFIGRET WINAPI CM_Get_HW_Prof_Flags_ExA( /*********************************************************************** * CM_Get_HW_Prof_Flags_ExW [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Get_HW_Prof_Flags_ExW( - DEVINSTID_W szDevInstName, ULONG ulHardwareProfile, PULONG pulValue, - ULONG ulFlags, HMACHINE hMachine) +CONFIGRET +WINAPI +CM_Get_HW_Prof_Flags_ExW( + _In_ DEVINSTID_W szDevInstName, + _In_ ULONG ulHardwareProfile, + _Out_ PULONG pulValue, + _In_ ULONG ulFlags, + _In_opt_ HMACHINE hMachine) { RPC_BINDING_HANDLE BindingHandle = NULL; CONFIGRET ret; - FIXME("%s %lu %p %lx %lx\n", debugstr_w(szDevInstName), - ulHardwareProfile, pulValue, ulFlags, hMachine); + FIXME("CM_Get_HW_Prof_Flags_ExW(%s %lu %p %lx %lx)\n", + debugstr_w(szDevInstName), ulHardwareProfile, pulValue, ulFlags, hMachine); if ((szDevInstName == NULL) || (pulValue == NULL)) return CR_INVALID_POINTER; @@ -4786,6 +5130,7 @@ CM_Intersect_Range_List( { FIXME("CM_Intersect_Range_List(%p %p %p %lx)\n", rlhOld1, rlhOld2, rlhNew, ulFlags); + return CR_CALL_NOT_IMPLEMENTED; } @@ -4803,6 +5148,7 @@ CM_Invert_Range_List( { FIXME("CM_Invert_Range_List(%p %p %I64u %lx)\n", rlhOld, rlhNew, ullMaxValue, ulFlags); + return CR_CALL_NOT_IMPLEMENTED; } @@ -4817,6 +5163,7 @@ CM_Is_Dock_Station_Present( { TRACE("CM_Is_Dock_Station_Present(%p)\n", pbPresent); + return CM_Is_Dock_Station_Present_Ex(pbPresent, NULL); } @@ -4878,6 +5225,7 @@ CM_Is_Version_Available( { TRACE("CM_Is_Version_Available(%hu)\n", wVersion); + return CM_Is_Version_Available_Ex(wVersion, NULL); } @@ -4942,6 +5290,7 @@ CM_Locate_DevNodeA( { TRACE("CM_Locate_DevNodeA(%p %s %lu)\n", pdnDevInst, pDeviceID, ulFlags); + return CM_Locate_DevNode_ExA(pdnDevInst, pDeviceID, ulFlags, NULL); } @@ -4958,6 +5307,7 @@ CM_Locate_DevNodeW( { TRACE("CM_Locate_DevNodeW(%p %s %lu)\n", pdnDevInst, debugstr_w(pDeviceID), ulFlags); + return CM_Locate_DevNode_ExW(pdnDevInst, pDeviceID, ulFlags, NULL); } @@ -5096,6 +5446,7 @@ CM_Merge_Range_List( { FIXME("CM_Merge_Range_List(%p %p %p %lx)\n", rlhOld1, rlhOld2, rlhNew, ulFlags); + return CR_CALL_NOT_IMPLEMENTED; } @@ -5116,6 +5467,7 @@ CM_Modify_Res_Des( TRACE("CM_Modify_Res_Des(%p %p %lx %p %lu %lx)\n", prdResDes, rdResDes, ResourceID, ResourceData, ResourceLen, ulFlags); + return CM_Modify_Res_Des_Ex(prdResDes, rdResDes, ResourceID, ResourceData, ResourceLen, ulFlags, NULL); } @@ -5138,6 +5490,7 @@ CM_Modify_Res_Des_Ex( FIXME("CM_Modify_Res_Des_Ex(%p %p %lx %p %lu %lx %lx)\n", prdResDes, rdResDes, ResourceID, ResourceData, ResourceLen, ulFlags, hMachine); + return CR_CALL_NOT_IMPLEMENTED; } @@ -5154,6 +5507,7 @@ CM_Move_DevNode( { TRACE("CM_Move_DevNode(%lx %lx %lx)\n", dnFromDevInst, dnToDevInst, ulFlags); + return CM_Move_DevNode_Ex(dnFromDevInst, dnToDevInst, ulFlags, NULL); } @@ -5242,6 +5596,7 @@ CM_Next_Range( { FIXME("CM_Next_Range(%p %p %p %lx)\n", preElement, pullStart, pullEnd, ulFlags); + return CR_CALL_NOT_IMPLEMENTED; } @@ -5445,6 +5800,7 @@ CM_Open_DevNode_Key( { TRACE("CM_Open_DevNode_Key(%lx %lx %lu %lx %p %lx)\n", dnDevNode, samDesired, ulHardwareProfile, Disposition, phkDevice, ulFlags); + return CM_Open_DevNode_Key_Ex(dnDevNode, samDesired, ulHardwareProfile, Disposition, phkDevice, ulFlags, NULL); } @@ -5601,12 +5957,17 @@ done: /*********************************************************************** * CM_Query_And_Remove_SubTreeA [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Query_And_Remove_SubTreeA( - DEVINST dnAncestor, PPNP_VETO_TYPE pVetoType, LPSTR pszVetoName, - ULONG ulNameLength, ULONG ulFlags) +CONFIGRET +WINAPI +CM_Query_And_Remove_SubTreeA( + _In_ DEVINST dnAncestor, + _Out_opt_ PPNP_VETO_TYPE pVetoType, + _Out_writes_opt_(ulNameLength) LPSTR pszVetoName, + _In_ ULONG ulNameLength, + _In_ ULONG ulFlags) { - TRACE("%lx %p %s %lu %lx\n", dnAncestor, pVetoType, pszVetoName, - ulNameLength, ulFlags); + TRACE("CM_Query_And_Remove_SubTreeA(%lx %p %s %lu %lx)\n", + dnAncestor, pVetoType, pszVetoName, ulNameLength, ulFlags); return CM_Query_And_Remove_SubTree_ExA(dnAncestor, pVetoType, pszVetoName, ulNameLength, ulFlags, NULL); @@ -5616,12 +5977,17 @@ CONFIGRET WINAPI CM_Query_And_Remove_SubTreeA( /*********************************************************************** * CM_Query_And_Remove_SubTreeW [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Query_And_Remove_SubTreeW( - DEVINST dnAncestor, PPNP_VETO_TYPE pVetoType, LPWSTR pszVetoName, - ULONG ulNameLength, ULONG ulFlags) +CONFIGRET +WINAPI +CM_Query_And_Remove_SubTreeW( + _In_ DEVINST dnAncestor, + _Out_opt_ PPNP_VETO_TYPE pVetoType, + _Out_writes_opt_(ulNameLength) LPWSTR pszVetoName, + _In_ ULONG ulNameLength, + _In_ ULONG ulFlags) { - TRACE("%lx %p %s %lu %lx\n", dnAncestor, pVetoType, - debugstr_w(pszVetoName), ulNameLength, ulFlags); + TRACE("CM_Query_And_Remove_SubTreeW(%lx %p %s %lu %lx)\n", + dnAncestor, pVetoType, debugstr_w(pszVetoName), ulNameLength, ulFlags); return CM_Query_And_Remove_SubTree_ExW(dnAncestor, pVetoType, pszVetoName, ulNameLength, ulFlags, NULL); @@ -5631,15 +5997,22 @@ CONFIGRET WINAPI CM_Query_And_Remove_SubTreeW( /*********************************************************************** * CM_Query_And_Remove_SubTree_ExA [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Query_And_Remove_SubTree_ExA( - DEVINST dnAncestor, PPNP_VETO_TYPE pVetoType, LPSTR pszVetoName, - ULONG ulNameLength, ULONG ulFlags, HMACHINE hMachine) +CONFIGRET +WINAPI +CM_Query_And_Remove_SubTree_ExA( + _In_ DEVINST dnAncestor, + _Out_opt_ PPNP_VETO_TYPE pVetoType, + _Out_writes_opt_(ulNameLength) LPSTR pszVetoName, + _In_ ULONG ulNameLength, + _In_ ULONG ulFlags, + _In_opt_ HMACHINE hMachine) { LPWSTR lpLocalVetoName; CONFIGRET ret; - TRACE("%lx %p %s %lu %lx %lx\n", dnAncestor, pVetoType, pszVetoName, - ulNameLength, ulFlags, hMachine); + TRACE("CM_Query_And_Remove_SubTree_ExA(%lx %p %s %lu %lx %lx)\n", + dnAncestor, pVetoType, debugstr_a(pszVetoName), ulNameLength, + ulFlags, hMachine); if (pszVetoName == NULL && ulNameLength == 0) return CR_INVALID_POINTER; @@ -5672,17 +6045,24 @@ CONFIGRET WINAPI CM_Query_And_Remove_SubTree_ExA( /*********************************************************************** * CM_Query_And_Remove_SubTree_ExW [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Query_And_Remove_SubTree_ExW( - DEVINST dnAncestor, PPNP_VETO_TYPE pVetoType, LPWSTR pszVetoName, - ULONG ulNameLength, ULONG ulFlags, HMACHINE hMachine) +CONFIGRET +WINAPI +CM_Query_And_Remove_SubTree_ExW( + _In_ DEVINST dnAncestor, + _Out_opt_ PPNP_VETO_TYPE pVetoType, + _Out_writes_opt_(ulNameLength) LPWSTR pszVetoName, + _In_ ULONG ulNameLength, + _In_ ULONG ulFlags, + _In_opt_ HMACHINE hMachine) { RPC_BINDING_HANDLE BindingHandle = NULL; HSTRING_TABLE StringTable = NULL; LPWSTR lpDevInst; CONFIGRET ret; - TRACE("%lx %p %s %lu %lx %lx\n", dnAncestor, pVetoType, - debugstr_w(pszVetoName), ulNameLength, ulFlags, hMachine); + TRACE("CM_Query_And_Remove_SubTree_ExW(%lx %p %s %lu %lx %lx)\n", + dnAncestor, pVetoType, debugstr_w(pszVetoName), ulNameLength, + ulFlags, hMachine); if (dnAncestor == 0) return CR_INVALID_DEVNODE; @@ -5735,12 +6115,17 @@ CONFIGRET WINAPI CM_Query_And_Remove_SubTree_ExW( /*********************************************************************** * CM_Query_Arbitrator_Free_Data [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Query_Arbitrator_Free_Data( - PVOID pData, ULONG DataLen, DEVINST dnDevInst, RESOURCEID ResourceID, - ULONG ulFlags) +CONFIGRET +WINAPI +CM_Query_Arbitrator_Free_Data( + _Out_writes_bytes_(DataLen) PVOID pData, + _In_ ULONG DataLen, + _In_ DEVINST dnDevInst, + _In_ RESOURCEID ResourceID, + _In_ ULONG ulFlags) { - TRACE("%p %lu %lx %lu 0x%08lx\n", pData, DataLen, dnDevInst, - ResourceID, ulFlags); + TRACE("CM_Query_Arbitrator_Free_Data(%p %lu %lx %lu 0x%08lx)\n", + pData, DataLen, dnDevInst, ResourceID, ulFlags); return CM_Query_Arbitrator_Free_Data_Ex(pData, DataLen, dnDevInst, ResourceID, ulFlags, NULL); @@ -5750,21 +6135,23 @@ CONFIGRET WINAPI CM_Query_Arbitrator_Free_Data( /*********************************************************************** * CM_Query_Arbitrator_Free_Data_Ex [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Query_Arbitrator_Free_Data_Ex( - OUT PVOID pData, - IN ULONG DataLen, - IN DEVINST dnDevInst, - IN RESOURCEID ResourceID, - IN ULONG ulFlags, - IN HMACHINE hMachine) +CONFIGRET +WINAPI +CM_Query_Arbitrator_Free_Data_Ex( + _Out_writes_bytes_(DataLen) PVOID pData, + _In_ ULONG DataLen, + _In_ DEVINST dnDevInst, + _In_ RESOURCEID ResourceID, + _In_ ULONG ulFlags, + _In_opt_ HMACHINE hMachine) { RPC_BINDING_HANDLE BindingHandle = NULL; HSTRING_TABLE StringTable = NULL; LPWSTR lpDevInst; CONFIGRET ret; - TRACE("%p %lu %lx %lu 0x%08lx %p\n", pData, DataLen, dnDevInst, - ResourceID, ulFlags, hMachine); + TRACE("CM_Query_Arbitrator_Free_Data_Ex(%p %lu %lx %lu 0x%08lx %p)\n", + pData, DataLen, dnDevInst, ResourceID, ulFlags, hMachine); if (pData == NULL || DataLen == 0) return CR_INVALID_POINTER; @@ -5817,10 +6204,16 @@ CONFIGRET WINAPI CM_Query_Arbitrator_Free_Data_Ex( /*********************************************************************** * CM_Query_Arbitrator_Free_Size [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Query_Arbitrator_Free_Size( - PULONG pulSize, DEVINST dnDevInst, RESOURCEID ResourceID, ULONG ulFlags) +CONFIGRET +WINAPI +CM_Query_Arbitrator_Free_Size( + _Out_ PULONG pulSize, + _In_ DEVINST dnDevInst, + _In_ RESOURCEID ResourceID, + _In_ ULONG ulFlags) { - TRACE("%p %lu %lx 0x%08lx\n", pulSize, dnDevInst,ResourceID, ulFlags); + TRACE("CM_Query_Arbitrator_Free_Size(%p %lu %lx 0x%08lx)\n", + pulSize, dnDevInst,ResourceID, ulFlags); return CM_Query_Arbitrator_Free_Size_Ex(pulSize, dnDevInst, ResourceID, ulFlags, NULL); @@ -5830,17 +6223,22 @@ CONFIGRET WINAPI CM_Query_Arbitrator_Free_Size( /*********************************************************************** * CM_Query_Arbitrator_Free_Size_Ex [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Query_Arbitrator_Free_Size_Ex( - PULONG pulSize, DEVINST dnDevInst, RESOURCEID ResourceID, - ULONG ulFlags, HMACHINE hMachine) +CONFIGRET +WINAPI +CM_Query_Arbitrator_Free_Size_Ex( + _Out_ PULONG pulSize, + _In_ DEVINST dnDevInst, + _In_ RESOURCEID ResourceID, + _In_ ULONG ulFlags, + _In_opt_ HMACHINE hMachine) { RPC_BINDING_HANDLE BindingHandle = NULL; HSTRING_TABLE StringTable = NULL; LPWSTR lpDevInst; CONFIGRET ret; - TRACE("%p %lu %lx 0x%08lx %p\n", pulSize, dnDevInst,ResourceID, ulFlags, - hMachine); + TRACE("CM_Query_Arbitrator_Free_Size_Ex(%p %lu %lx 0x%08lx %p)\n", + pulSize, dnDevInst,ResourceID, ulFlags, hMachine); if (pulSize == NULL) return CR_INVALID_POINTER; @@ -5894,10 +6292,15 @@ CONFIGRET WINAPI CM_Query_Arbitrator_Free_Size_Ex( * * This function is obsolete in Windows XP and above. */ -CONFIGRET WINAPI CM_Query_Remove_SubTree( - DEVINST dnAncestor, ULONG ulFlags) +CONFIGRET +WINAPI +CM_Query_Remove_SubTree( + _In_ DEVINST dnAncestor, + _In_ ULONG ulFlags) { - TRACE("%lx %lx\n", dnAncestor, ulFlags); + TRACE("CM_Query_Remove_SubTree(%lx %lx)\n", + dnAncestor, ulFlags); + return CR_CALL_NOT_IMPLEMENTED; } @@ -5907,10 +6310,16 @@ CONFIGRET WINAPI CM_Query_Remove_SubTree( * * This function is obsolete in Windows XP and above. */ -CONFIGRET WINAPI CM_Query_Remove_SubTree_Ex( - DEVINST dnAncestor, ULONG ulFlags, HMACHINE hMachine) +CONFIGRET +WINAPI +CM_Query_Remove_SubTree_Ex( + _In_ DEVINST dnAncestor, + _In_ ULONG ulFlags, + _In_opt_ HMACHINE hMachine) { - TRACE("%lx %lx %lx\n", dnAncestor, ulFlags, hMachine); + TRACE("CM_Query_Remove_SubTree_Ex(%lx %lx %lx)\n", + dnAncestor, ulFlags, hMachine); + return CR_CALL_NOT_IMPLEMENTED; } @@ -5918,10 +6327,15 @@ CONFIGRET WINAPI CM_Query_Remove_SubTree_Ex( /*********************************************************************** * CM_Reenumerate_DevNode [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Reenumerate_DevNode( - DEVINST dnDevInst, ULONG ulFlags) +CONFIGRET +WINAPI +CM_Reenumerate_DevNode( + _In_ DEVINST dnDevInst, + _In_ ULONG ulFlags) { - TRACE("%lx %lx\n", dnDevInst, ulFlags); + TRACE("CM_Reenumerate_DevNode(%lx %lx)\n", + dnDevInst, ulFlags); + return CM_Reenumerate_DevNode_Ex(dnDevInst, ulFlags, NULL); } @@ -5933,14 +6347,15 @@ CONFIGRET WINAPI CM_Reenumerate_DevNode_Ex( _In_ DEVINST dnDevInst, _In_ ULONG ulFlags, - _In_ HMACHINE hMachine) + _In_opt_ HMACHINE hMachine) { RPC_BINDING_HANDLE BindingHandle = NULL; HSTRING_TABLE StringTable = NULL; LPWSTR lpDevInst; CONFIGRET ret; - FIXME("%lx %lx %lx\n", dnDevInst, ulFlags, hMachine); + FIXME("CM_Reenumerate_DevNode_Ex(%lx %lx %lx)\n", + dnDevInst, ulFlags, hMachine); if (dnDevInst == 0) return CR_INVALID_DEVNODE;
6 years, 10 months
1
0
0
0
← Newer
1
...
19
20
21
22
23
24
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Results per page:
10
25
50
100
200