Author: ekohl
Date: Sat Jan 22 15:43:57 2011
New Revision: 50461
URL:
http://svn.reactos.org/svn/reactos?rev=50461&view=rev
Log:
[SETUPAPI]
- Implement CMP_WaitServicesAvailable().
- CM_Get_First_Log_Conf_Ex(): Create a LOG_CONF_INFO struct only if plcLogConf is not
NULL.
Modified:
trunk/reactos/dll/win32/setupapi/cfgmgr.c
trunk/reactos/dll/win32/setupapi/setupapi.spec
trunk/reactos/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] Sat Jan 22 15:43:57 2011
@@ -174,6 +174,34 @@
Sleep(5000);
}
+
+ return ret;
+}
+
+
+/***********************************************************************
+ * CMP_WaitServicesAvailable [SETUPAPI.@]
+ */
+CONFIGRET
+WINAPI
+CMP_WaitServicesAvailable(HMACHINE hMachine)
+{
+ RPC_BINDING_HANDLE BindingHandle = NULL;
+ CONFIGRET ret = CR_SUCCESS;
+ WORD Version;
+
+ if (!PnpGetLocalHandles(&BindingHandle, NULL))
+ return CR_FAILURE;
+
+ RpcTryExcept
+ {
+ ret = PNP_GetVersion(BindingHandle, &Version);
+ }
+ RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+ {
+ ret = RpcStatusToCmStatus(RpcExceptionCode());
+ }
+ RpcEndExcept;
return ret;
}
@@ -1825,7 +1853,7 @@
WCHAR szBufferW[MAX_DEVICE_ID_LEN];
CONFIGRET ret = CR_SUCCESS;
- FIXME("%lx %p %ld %ld %lx\n",
+ TRACE("%lx %p %ld %ld %lx\n",
dnDevInst, Buffer, BufferLen, ulFlags, hMachine);
if (Buffer == NULL)
@@ -1931,7 +1959,7 @@
LPWSTR pszFilterW = NULL;
CONFIGRET ret = CR_SUCCESS;
- FIXME("%p %p %ld %ld %lx\n",
+ TRACE("%p %p %ld %ld %lx\n",
pszFilter, Buffer, BufferLen, ulFlags, hMachine);
BufferW = MyMalloc(BufferLen * sizeof(WCHAR));
@@ -2264,16 +2292,19 @@
if (ret != CR_SUCCESS)
return ret;
- pLogConfInfo = HeapAlloc(GetProcessHeap(), 0, sizeof(LOG_CONF_INFO));
- if (pLogConfInfo == NULL)
- return CR_OUT_OF_MEMORY;
-
- pLogConfInfo->ulMagic = LOG_CONF_MAGIC;
- pLogConfInfo->dnDevInst = dnDevInst;
- pLogConfInfo->ulFlags = ulFlags;
- pLogConfInfo->ulTag = ulTag;
-
- *plcLogConf = (LOG_CONF)pLogConfInfo;
+ if (plcLogConf)
+ {
+ pLogConfInfo = HeapAlloc(GetProcessHeap(), 0, sizeof(LOG_CONF_INFO));
+ if (pLogConfInfo == NULL)
+ return CR_OUT_OF_MEMORY;
+
+ pLogConfInfo->ulMagic = LOG_CONF_MAGIC;
+ pLogConfInfo->dnDevInst = dnDevInst;
+ pLogConfInfo->ulFlags = ulFlags;
+ pLogConfInfo->ulTag = ulTag;
+
+ *plcLogConf = (LOG_CONF)pLogConfInfo;
+ }
return CR_SUCCESS;
}
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] Sat Jan 22 15:43:57 2011
@@ -6,7 +6,7 @@
@ stdcall CMP_Report_LogOn(long long)
@ stdcall CMP_UnregisterNotification(ptr)
@ stdcall CMP_WaitNoPendingInstallEvents(long)
-@ stub CMP_WaitServicesAvailable
+@ stdcall CMP_WaitServicesAvailable(ptr)
@ stdcall CM_Add_Empty_Log_Conf(ptr ptr long long)
@ stdcall CM_Add_Empty_Log_Conf_Ex(ptr ptr long long ptr)
@ stdcall CM_Add_IDA(ptr str long)
Modified: trunk/reactos/include/psdk/cfgmgr32.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/cfgmgr32.h?re…
==============================================================================
--- trunk/reactos/include/psdk/cfgmgr32.h [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/cfgmgr32.h [iso-8859-1] Sat Jan 22 15:43:57 2011
@@ -943,6 +943,10 @@
WINAPI
CMP_UnregisterNotification(IN ULONG luhDevNotify);
+CMAPI
+CONFIGRET
+WINAPI
+CMP_WaitServicesAvailable(IN HMACHINE hMachine);
*/
CMAPI