[SETUPAPI]

- Implement CMP_WaitServicesAvailable().
- CM_Get_First_Log_Conf_Ex(): Create a LOG_CONF_INFO struct only if plcLogConf is not NULL. 

svn path=/trunk/; revision=50461
This commit is contained in:
Eric Kohl 2011-01-22 15:43:57 +00:00
parent d7420c8060
commit f6b450f16a
3 changed files with 46 additions and 11 deletions

View file

@ -179,6 +179,34 @@ CONFIGRET WINAPI CMP_Report_LogOn(
}
/***********************************************************************
* 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;
}
/***********************************************************************
* CM_Add_Empty_Log_Conf [SETUPAPI.@]
*/
@ -1825,7 +1853,7 @@ CONFIGRET WINAPI CM_Get_Device_ID_ExA(
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 @@ CONFIGRET WINAPI CM_Get_Device_ID_List_ExA(
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 @@ CONFIGRET WINAPI CM_Get_First_Log_Conf_Ex(
if (ret != CR_SUCCESS)
return ret;
pLogConfInfo = HeapAlloc(GetProcessHeap(), 0, sizeof(LOG_CONF_INFO));
if (pLogConfInfo == NULL)
return CR_OUT_OF_MEMORY;
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;
pLogConfInfo->ulMagic = LOG_CONF_MAGIC;
pLogConfInfo->dnDevInst = dnDevInst;
pLogConfInfo->ulFlags = ulFlags;
pLogConfInfo->ulTag = ulTag;
*plcLogConf = (LOG_CONF)pLogConfInfo;
*plcLogConf = (LOG_CONF)pLogConfInfo;
}
return CR_SUCCESS;
}

View file

@ -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)

View file

@ -943,6 +943,10 @@ CONFIGRET
WINAPI
CMP_UnregisterNotification(IN ULONG luhDevNotify);
CMAPI
CONFIGRET
WINAPI
CMP_WaitServicesAvailable(IN HMACHINE hMachine);
*/
CMAPI