mirror of
https://github.com/reactos/reactos.git
synced 2024-12-31 19:42:51 +00:00
[SETUPAPI] Implement CM_Get_Next_Res_Des_Ex() partially (WIP)
This commit is contained in:
parent
8756cec0e3
commit
6efb3cbe03
1 changed files with 87 additions and 9 deletions
|
@ -61,7 +61,7 @@ typedef struct _LOG_CONF_INFO
|
||||||
{
|
{
|
||||||
ULONG ulMagic;
|
ULONG ulMagic;
|
||||||
DEVINST dnDevInst;
|
DEVINST dnDevInst;
|
||||||
ULONG ulFlags;
|
ULONG ulType;
|
||||||
ULONG ulTag;
|
ULONG ulTag;
|
||||||
} LOG_CONF_INFO, *PLOG_CONF_INFO;
|
} LOG_CONF_INFO, *PLOG_CONF_INFO;
|
||||||
|
|
||||||
|
@ -947,7 +947,7 @@ CM_Add_Empty_Log_Conf_Ex(
|
||||||
{
|
{
|
||||||
pLogConfInfo->ulMagic = LOG_CONF_MAGIC;
|
pLogConfInfo->ulMagic = LOG_CONF_MAGIC;
|
||||||
pLogConfInfo->dnDevInst = dnDevInst;
|
pLogConfInfo->dnDevInst = dnDevInst;
|
||||||
pLogConfInfo->ulFlags = ulFlags;
|
pLogConfInfo->ulType = ulFlags;
|
||||||
pLogConfInfo->ulTag = ulLogConfTag;
|
pLogConfInfo->ulTag = ulLogConfTag;
|
||||||
|
|
||||||
*plcLogConf = (LOG_CONF)pLogConfInfo;
|
*plcLogConf = (LOG_CONF)pLogConfInfo;
|
||||||
|
@ -2353,8 +2353,11 @@ CM_Free_Log_Conf_Ex(
|
||||||
|
|
||||||
RpcTryExcept
|
RpcTryExcept
|
||||||
{
|
{
|
||||||
ret = PNP_FreeLogConf(BindingHandle, lpDevInst, pLogConfInfo->ulFlags,
|
ret = PNP_FreeLogConf(BindingHandle,
|
||||||
pLogConfInfo->ulTag, 0);
|
lpDevInst,
|
||||||
|
pLogConfInfo->ulType,
|
||||||
|
pLogConfInfo->ulTag,
|
||||||
|
0);
|
||||||
}
|
}
|
||||||
RpcExcept(EXCEPTION_EXECUTE_HANDLER)
|
RpcExcept(EXCEPTION_EXECUTE_HANDLER)
|
||||||
{
|
{
|
||||||
|
@ -4646,7 +4649,7 @@ CM_Get_First_Log_Conf_Ex(
|
||||||
|
|
||||||
pLogConfInfo->ulMagic = LOG_CONF_MAGIC;
|
pLogConfInfo->ulMagic = LOG_CONF_MAGIC;
|
||||||
pLogConfInfo->dnDevInst = dnDevInst;
|
pLogConfInfo->dnDevInst = dnDevInst;
|
||||||
pLogConfInfo->ulFlags = ulFlags;
|
pLogConfInfo->ulType = ulFlags;
|
||||||
pLogConfInfo->ulTag = ulTag;
|
pLogConfInfo->ulTag = ulTag;
|
||||||
|
|
||||||
*plcLogConf = (LOG_CONF)pLogConfInfo;
|
*plcLogConf = (LOG_CONF)pLogConfInfo;
|
||||||
|
@ -5044,7 +5047,7 @@ CM_Get_Log_Conf_Priority_Ex(
|
||||||
{
|
{
|
||||||
ret = PNP_GetLogConfPriority(BindingHandle,
|
ret = PNP_GetLogConfPriority(BindingHandle,
|
||||||
lpDevInst,
|
lpDevInst,
|
||||||
pLogConfInfo->ulFlags,
|
pLogConfInfo->ulType,
|
||||||
pLogConfInfo->ulTag,
|
pLogConfInfo->ulTag,
|
||||||
pPriority,
|
pPriority,
|
||||||
0);
|
0);
|
||||||
|
@ -5132,7 +5135,7 @@ CM_Get_Next_Log_Conf_Ex(
|
||||||
{
|
{
|
||||||
ret = PNP_GetNextLogConf(BindingHandle,
|
ret = PNP_GetNextLogConf(BindingHandle,
|
||||||
lpDevInst,
|
lpDevInst,
|
||||||
pLogConfInfo->ulFlags,
|
pLogConfInfo->ulType,
|
||||||
pLogConfInfo->ulTag,
|
pLogConfInfo->ulTag,
|
||||||
&ulNewTag,
|
&ulNewTag,
|
||||||
0);
|
0);
|
||||||
|
@ -5154,7 +5157,7 @@ CM_Get_Next_Log_Conf_Ex(
|
||||||
|
|
||||||
pNewLogConfInfo->ulMagic = LOG_CONF_MAGIC;
|
pNewLogConfInfo->ulMagic = LOG_CONF_MAGIC;
|
||||||
pNewLogConfInfo->dnDevInst = pLogConfInfo->dnDevInst;
|
pNewLogConfInfo->dnDevInst = pLogConfInfo->dnDevInst;
|
||||||
pNewLogConfInfo->ulFlags = pLogConfInfo->ulFlags;
|
pNewLogConfInfo->ulType = pLogConfInfo->ulType;
|
||||||
pNewLogConfInfo->ulTag = ulNewTag;
|
pNewLogConfInfo->ulTag = ulNewTag;
|
||||||
|
|
||||||
*plcLogConf = (LOG_CONF)pNewLogConfInfo;
|
*plcLogConf = (LOG_CONF)pNewLogConfInfo;
|
||||||
|
@ -5197,10 +5200,85 @@ CM_Get_Next_Res_Des_Ex(
|
||||||
_In_ ULONG ulFlags,
|
_In_ ULONG ulFlags,
|
||||||
_In_opt_ HMACHINE hMachine)
|
_In_opt_ HMACHINE hMachine)
|
||||||
{
|
{
|
||||||
|
RPC_BINDING_HANDLE BindingHandle = NULL;
|
||||||
|
HSTRING_TABLE StringTable = NULL;
|
||||||
|
ULONG ulInTag, ulOutTag = 0;
|
||||||
|
ULONG ulInType, ulOutType = 0;
|
||||||
|
LPWSTR lpDevInst;
|
||||||
|
DEVINST dnDevInst;
|
||||||
|
CONFIGRET ret;
|
||||||
|
|
||||||
FIXME("CM_Get_Next_Res_Des_Ex(%p %p %lu %p %lx %p)\n",
|
FIXME("CM_Get_Next_Res_Des_Ex(%p %p %lu %p %lx %p)\n",
|
||||||
prdResDes, rdResDes, ForResource, pResourceID, ulFlags, hMachine);
|
prdResDes, rdResDes, ForResource, pResourceID, ulFlags, hMachine);
|
||||||
|
|
||||||
return CR_CALL_NOT_IMPLEMENTED;
|
if (prdResDes == NULL)
|
||||||
|
return CR_INVALID_POINTER;
|
||||||
|
|
||||||
|
if (IsValidLogConf((PLOG_CONF_INFO)rdResDes))
|
||||||
|
{
|
||||||
|
FIXME("LogConf found!\n");
|
||||||
|
dnDevInst = ((PLOG_CONF_INFO)rdResDes)->dnDevInst;
|
||||||
|
ulInTag = ((PLOG_CONF_INFO)rdResDes)->ulTag;
|
||||||
|
ulInType = ((PLOG_CONF_INFO)rdResDes)->ulType;
|
||||||
|
}
|
||||||
|
#if 0
|
||||||
|
else if (IsValidResDes((PRES_DES_INFO)rdResDes))
|
||||||
|
{
|
||||||
|
FIXME("ResDes found!\n");
|
||||||
|
dnDevInst = ((PRES_DES_INFO)rdResDes)->dnDevInst;
|
||||||
|
ulInTag = ((PRES_DES_INFO)rdResDes)->ulTag;
|
||||||
|
ulInType = ((PRES_DES_INFO)rdResDes)->ulType;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return CR_INVALID_RES_DES;
|
||||||
|
}
|
||||||
|
|
||||||
|
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_GetNextResDes(BindingHandle,
|
||||||
|
lpDevInst,
|
||||||
|
ulInTag,
|
||||||
|
ulInType,
|
||||||
|
ForResource,
|
||||||
|
0, /* unsigned long ulResourceTag, */
|
||||||
|
&ulOutTag,
|
||||||
|
&ulOutType,
|
||||||
|
0);
|
||||||
|
}
|
||||||
|
RpcExcept(EXCEPTION_EXECUTE_HANDLER)
|
||||||
|
{
|
||||||
|
ret = RpcStatusToCmStatus(RpcExceptionCode());
|
||||||
|
}
|
||||||
|
RpcEndExcept;
|
||||||
|
|
||||||
|
if (ret != CR_SUCCESS)
|
||||||
|
return ret;
|
||||||
|
|
||||||
|
/* FIXME: Create the ResDes handle */
|
||||||
|
|
||||||
|
return CR_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue