Author: ekohl
Date: Mon Apr 10 19:17:17 2017
New Revision: 74295
URL:
http://svn.reactos.org/svn/reactos?rev=74295&view=rev
Log:
[SETUPAPI]
Implement CMP_GetServerSideDeviceInstallFlags().
Modified:
trunk/reactos/dll/win32/setupapi/cfgmgr.c
trunk/reactos/dll/win32/setupapi/setupapi.spec
trunk/reactos/sdk/include/psdk/cfgmgr32.h
Modified: trunk/reactos/dll/win32/setupapi/cfgmgr.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/cfgmgr.…
==============================================================================
--- trunk/reactos/dll/win32/setupapi/cfgmgr.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/setupapi/cfgmgr.c [iso-8859-1] Mon Apr 10 19:17:17 2017
@@ -149,17 +149,69 @@
/***********************************************************************
- * CMP_Init_Detection [SETUPAPI.@]
- */
-CONFIGRET WINAPI CMP_Init_Detection(
- DWORD dwMagic)
+ * CMP_GetServerSideDeviceInstallFlags [SETUPAPI.@]
+ */
+CONFIGRET
+WINAPI
+CMP_GetServerSideDeviceInstallFlags(
+ _Out_ PULONG pulSSDIFlags,
+ _In_ ULONG ulFlags,
+ _In_ HMACHINE hMachine)
{
RPC_BINDING_HANDLE BindingHandle = NULL;
CONFIGRET ret;
- TRACE("%lu\n", dwMagic);
-
- if (dwMagic != CMP_MAGIC)
+ TRACE("CMP_GetServerSideDeviceInstallFlags(%p %lx %p)\n",
+ pulSSDIFlags, ulFlags, hMachine);
+
+ if (pulSSDIFlags == NULL)
+ return CR_INVALID_POINTER;
+
+ if (ulFlags != 0)
+ return CR_INVALID_FLAG;
+
+ if (hMachine != NULL)
+ {
+ BindingHandle = ((PMACHINE_INFO)hMachine)->BindingHandle;
+ if (BindingHandle == NULL)
+ return CR_FAILURE;
+ }
+ else
+ {
+ if (!PnpGetLocalHandles(&BindingHandle, NULL))
+ return CR_FAILURE;
+ }
+
+ RpcTryExcept
+ {
+ ret = PNP_GetServerSideDeviceInstallFlags(BindingHandle,
+ pulSSDIFlags,
+ ulFlags);
+ }
+ RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+ {
+ ret = RpcStatusToCmStatus(RpcExceptionCode());
+ }
+ RpcEndExcept;
+
+ return ret;
+}
+
+
+/***********************************************************************
+ * CMP_Init_Detection [SETUPAPI.@]
+ */
+CONFIGRET
+WINAPI
+CMP_Init_Detection(
+ _In_ ULONG ulMagic)
+{
+ RPC_BINDING_HANDLE BindingHandle = NULL;
+ CONFIGRET ret;
+
+ TRACE("CMP_Init_Detection(%lu)\n", ulMagic);
+
+ if (ulMagic != CMP_MAGIC)
return CR_INVALID_DATA;
if (!PnpGetLocalHandles(&BindingHandle, NULL))
@@ -185,23 +237,24 @@
CONFIGRET
WINAPI
CMP_RegisterNotification(
- IN HANDLE hRecipient,
- IN LPVOID lpvNotificationFilter,
- IN DWORD dwFlags,
- OUT PHDEVNOTIFY phDevNotify)
+ _In_ HANDLE hRecipient,
+ _In_ LPVOID lpvNotificationFilter,
+ _In_ ULONG ulFlags,
+ _Out_ PHDEVNOTIFY phDevNotify)
{
RPC_BINDING_HANDLE BindingHandle = NULL;
PNOTIFY_DATA pNotifyData = NULL;
CONFIGRET ret = CR_SUCCESS;
- TRACE("CMP_RegisterNotification(%p %p %lu %p)\n", hRecipient,
lpvNotificationFilter, dwFlags, phDevNotify);
+ TRACE("CMP_RegisterNotification(%p %p %lu %p)\n",
+ hRecipient, lpvNotificationFilter, ulFlags, phDevNotify);
if ((hRecipient == NULL) ||
(lpvNotificationFilter == NULL) ||
(phDevNotify == NULL))
return CR_INVALID_POINTER;
- if (dwFlags & ~0x7)
+ if (ulFlags & ~0x7)
return CR_INVALID_FLAG;
if (((PDEV_BROADCAST_HDR)lpvNotificationFilter)->dbch_size <
sizeof(DEV_BROADCAST_HDR))
@@ -232,7 +285,7 @@
RpcTryExcept
{
ret = PNP_RegisterNotification(BindingHandle,
- dwFlags,
+ ulFlags,
&pNotifyData->ulNotifyData);
}
RpcExcept(EXCEPTION_EXECUTE_HANDLER)
@@ -260,9 +313,11 @@
/***********************************************************************
* CMP_Report_LogOn [SETUPAPI.@]
*/
-CONFIGRET WINAPI CMP_Report_LogOn(
- DWORD dwMagic,
- DWORD dwProcessId)
+CONFIGRET
+WINAPI
+CMP_Report_LogOn(
+ _In_ DWORD dwMagic,
+ _In_ DWORD dwProcessId)
{
RPC_BINDING_HANDLE BindingHandle = NULL;
CONFIGRET ret = CR_SUCCESS;
@@ -309,7 +364,7 @@
CONFIGRET
WINAPI
CMP_UnregisterNotification(
- IN HDEVNOTIFY hDevNotify)
+ _In_ HDEVNOTIFY hDevNotify)
{
RPC_BINDING_HANDLE BindingHandle = NULL;
PNOTIFY_DATA pNotifyData;
@@ -347,11 +402,15 @@
/***********************************************************************
* CMP_WaitNoPendingInstallEvents [SETUPAPI.@]
*/
-DWORD WINAPI CMP_WaitNoPendingInstallEvents(
- DWORD dwTimeout)
+DWORD
+WINAPI
+CMP_WaitNoPendingInstallEvents(
+ _In_ DWORD dwTimeout)
{
HANDLE hEvent;
DWORD ret;
+
+ TRACE("CMP_WaitNoPendingInstallEvents(%lu)\n", dwTimeout);
hEvent = OpenEventW(SYNCHRONIZE, FALSE,
L"Global\\PnP_No_Pending_Install_Events");
if (hEvent == NULL)
@@ -368,11 +427,14 @@
*/
CONFIGRET
WINAPI
-CMP_WaitServicesAvailable(HMACHINE hMachine)
+CMP_WaitServicesAvailable(
+ _In_ HMACHINE hMachine)
{
RPC_BINDING_HANDLE BindingHandle = NULL;
CONFIGRET ret = CR_SUCCESS;
WORD Version;
+
+ TRACE("CMP_WaitServicesAvailable(%p)\n", hMachine);
if (!PnpGetLocalHandles(&BindingHandle, NULL))
return CR_FAILURE;
Modified: trunk/reactos/dll/win32/setupapi/setupapi.spec
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/setupap…
==============================================================================
--- trunk/reactos/dll/win32/setupapi/setupapi.spec [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/setupapi/setupapi.spec [iso-8859-1] Mon Apr 10 19:17:17 2017
@@ -1,6 +1,6 @@
# Functions exported by Win2003 SP1
@ stub CMP_GetBlockedDriverInfo
-@ stub CMP_GetServerSideDeviceInstallFlags
+@ stdcall CMP_GetServerSideDeviceInstallFlags(ptr long ptr)
@ stdcall CMP_Init_Detection(long)
@ stdcall CMP_RegisterNotification(ptr ptr long ptr)
@ stdcall CMP_Report_LogOn(long long)
Modified: trunk/reactos/sdk/include/psdk/cfgmgr32.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/include/psdk/cfgmgr32.…
==============================================================================
--- trunk/reactos/sdk/include/psdk/cfgmgr32.h [iso-8859-1] (original)
+++ trunk/reactos/sdk/include/psdk/cfgmgr32.h [iso-8859-1] Mon Apr 10 19:17:17 2017
@@ -921,33 +921,44 @@
CMAPI
CONFIGRET
WINAPI
-CMP_Init_Detection(IN DWORD dwMagic);
+CMP_GetServerSideDeviceInstallFlags(
+ _Out_ PULONG pulSSDIFlags,
+ _In_ ULONG ulFlags,
+ _In_ HMACHINE hMachine)
+
+CMAPI
+CONFIGRET
+WINAPI
+CMP_Init_Detection(
+ _In_ DWORD dwMagic);
CMAPI
CONFIGRET
WINAPI
CMP_RegisterNotification(
- IN HANDLE hRecipient,
- IN LPVOID lpvNotificationFilter,
- IN DWORD dwFlags,
- OUT PULONG pluhDevNotify);
+ _In_ HANDLE hRecipient,
+ _In_ LPVOID lpvNotificationFilter,
+ _In_ DWORD dwFlags,
+ _Out_ PULONG pluhDevNotify);
CMAPI
CONFIGRET
WINAPI
CMP_Report_LogOn(
- IN DWORD dwMagic,
- IN DWORD dwProcessId);
-
-CMAPI
-CONFIGRET
-WINAPI
-CMP_UnregisterNotification(IN ULONG luhDevNotify);
-
-CMAPI
-CONFIGRET
-WINAPI
-CMP_WaitServicesAvailable(IN HMACHINE hMachine);
+ _In_ DWORD dwMagic,
+ _In_ DWORD dwProcessId);
+
+CMAPI
+CONFIGRET
+WINAPI
+CMP_UnregisterNotification(
+ _In_ ULONG luhDevNotify);
+
+CMAPI
+CONFIGRET
+WINAPI
+CMP_WaitServicesAvailable(
+ _In_ IN HMACHINE hMachine);
*/
CMAPI