Author: ekohl Date: Wed Aug 16 11:45:21 2017 New Revision: 75565
URL: http://svn.reactos.org/svn/reactos?rev=75565&view=rev Log: [SETUPAPI] - Implement CMP_GetBlockedDriverInfo. - Make sure that CMP_GetServerSideDeviceInstallFlags and CMP_WaitServicesAvailable can be called on local and remote machines.
Modified: trunk/reactos/dll/win32/setupapi/cfgmgr.c trunk/reactos/dll/win32/setupapi/setupapi.spec
Modified: trunk/reactos/dll/win32/setupapi/cfgmgr.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/cfgmgr.c... ============================================================================== --- trunk/reactos/dll/win32/setupapi/cfgmgr.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/setupapi/cfgmgr.c [iso-8859-1] Wed Aug 16 11:45:21 2017 @@ -165,6 +165,56 @@
/*********************************************************************** + * CMP_GetBlockedDriverInfo [SETUPAPI.@] + */ +CONFIGRET +WINAPI +CMP_GetBlockedDriverInfo( + _Out_opt_ LPWSTR pszNames, + _Inout_ PULONG pulLength, + _In_ ULONG ulFlags, + _In_opt_ HMACHINE hMachine) +{ + RPC_BINDING_HANDLE BindingHandle = NULL; + ULONG ulTransferLength; + CONFIGRET ret; + + TRACE("CMP_GetBlockedDriverInfo(%p %p %lx %p)\n", + pszNames, pulLength, ulFlags, hMachine); + + if (hMachine != NULL) + { + BindingHandle = ((PMACHINE_INFO)hMachine)->BindingHandle; + if (BindingHandle == NULL) + return CR_FAILURE; + } + else + { + if (!PnpGetLocalHandles(&BindingHandle, NULL)) + return CR_FAILURE; + } + + ulTransferLength = *pulLength; + + RpcTryExcept + { + ret = PNP_GetBlockedDriverInfo(BindingHandle, + (PBYTE)pszNames, + &ulTransferLength, + pulLength, + ulFlags); + } + RpcExcept(EXCEPTION_EXECUTE_HANDLER) + { + ret = RpcStatusToCmStatus(RpcExceptionCode()); + } + RpcEndExcept; + + return ret; +} + + +/*********************************************************************** * CMP_GetServerSideDeviceInstallFlags [SETUPAPI.@] */ CONFIGRET @@ -172,7 +222,7 @@ CMP_GetServerSideDeviceInstallFlags( _Out_ PULONG pulSSDIFlags, _In_ ULONG ulFlags, - _In_ HMACHINE hMachine) + _In_opt_ HMACHINE hMachine) { RPC_BINDING_HANDLE BindingHandle = NULL; CONFIGRET ret; @@ -444,7 +494,7 @@ CONFIGRET WINAPI CMP_WaitServicesAvailable( - _In_ HMACHINE hMachine) + _In_opt_ HMACHINE hMachine) { RPC_BINDING_HANDLE BindingHandle = NULL; CONFIGRET ret = CR_SUCCESS; @@ -452,8 +502,17 @@
TRACE("CMP_WaitServicesAvailable(%p)\n", hMachine);
- if (!PnpGetLocalHandles(&BindingHandle, NULL)) - return CR_FAILURE; + if (hMachine != NULL) + { + BindingHandle = ((PMACHINE_INFO)hMachine)->BindingHandle; + if (BindingHandle == NULL) + return CR_FAILURE; + } + else + { + if (!PnpGetLocalHandles(&BindingHandle, NULL)) + return CR_FAILURE; + }
RpcTryExcept {
Modified: trunk/reactos/dll/win32/setupapi/setupapi.spec URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/setupapi... ============================================================================== --- trunk/reactos/dll/win32/setupapi/setupapi.spec [iso-8859-1] (original) +++ trunk/reactos/dll/win32/setupapi/setupapi.spec [iso-8859-1] Wed Aug 16 11:45:21 2017 @@ -1,5 +1,5 @@ # Functions exported by Win2003 SP1 -@ stub CMP_GetBlockedDriverInfo +@ stdcall CMP_GetBlockedDriverInfo(wstr ptr long ptr) @ stdcall CMP_GetServerSideDeviceInstallFlags(ptr long ptr) @ stdcall CMP_Init_Detection(long) @ stdcall CMP_RegisterNotification(ptr ptr long ptr)