mirror of
https://github.com/reactos/reactos.git
synced 2025-06-26 13:09:43 +00:00
[SETUPAPI] GetDeviceInstanceKeyPath: Create a new driver instance property if needed and SEH-protect calls to umpnpmgr.
This commit is contained in:
parent
5e3c8ce0c6
commit
adc9bd48b7
1 changed files with 37 additions and 11 deletions
|
@ -239,6 +239,9 @@ GetDeviceInstanceKeyPath(
|
||||||
|
|
||||||
ulTransferLength = 300 * sizeof(WCHAR);
|
ulTransferLength = 300 * sizeof(WCHAR);
|
||||||
ulLength = 300 * sizeof(WCHAR);
|
ulLength = 300 * sizeof(WCHAR);
|
||||||
|
|
||||||
|
RpcTryExcept
|
||||||
|
{
|
||||||
ret = PNP_GetDeviceRegProp(BindingHandle,
|
ret = PNP_GetDeviceRegProp(BindingHandle,
|
||||||
pszDeviceInst,
|
pszDeviceInst,
|
||||||
CM_DRP_DRIVER,
|
CM_DRP_DRIVER,
|
||||||
|
@ -247,11 +250,33 @@ GetDeviceInstanceKeyPath(
|
||||||
&ulTransferLength,
|
&ulTransferLength,
|
||||||
&ulLength,
|
&ulLength,
|
||||||
0);
|
0);
|
||||||
|
}
|
||||||
|
RpcExcept(EXCEPTION_EXECUTE_HANDLER)
|
||||||
|
{
|
||||||
|
ret = RpcStatusToCmStatus(RpcExceptionCode());
|
||||||
|
}
|
||||||
|
RpcEndExcept;
|
||||||
|
|
||||||
|
if (ret != CR_SUCCESS)
|
||||||
|
{
|
||||||
|
RpcTryExcept
|
||||||
|
{
|
||||||
|
ret = PNP_GetClassInstance(BindingHandle,
|
||||||
|
pszDeviceInst,
|
||||||
|
(PVOID)pszBuffer,
|
||||||
|
300);
|
||||||
|
}
|
||||||
|
RpcExcept(EXCEPTION_EXECUTE_HANDLER)
|
||||||
|
{
|
||||||
|
ret = RpcStatusToCmStatus(RpcExceptionCode());
|
||||||
|
}
|
||||||
|
RpcEndExcept;
|
||||||
|
|
||||||
if (ret != CR_SUCCESS)
|
if (ret != CR_SUCCESS)
|
||||||
{
|
{
|
||||||
ERR("PNP_GetDeviceRegProp() failed (Error %lu)\n", ret);
|
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
TRACE("szBuffer: %S\n", pszBuffer);
|
TRACE("szBuffer: %S\n", pszBuffer);
|
||||||
|
|
||||||
|
@ -809,7 +834,8 @@ CM_Add_Empty_Log_Conf(
|
||||||
* CM_Add_Empty_Log_Conf_Ex [SETUPAPI.@]
|
* CM_Add_Empty_Log_Conf_Ex [SETUPAPI.@]
|
||||||
*/
|
*/
|
||||||
CONFIGRET
|
CONFIGRET
|
||||||
WINAPI CM_Add_Empty_Log_Conf_Ex(
|
WINAPI
|
||||||
|
CM_Add_Empty_Log_Conf_Ex(
|
||||||
_Out_ PLOG_CONF plcLogConf,
|
_Out_ PLOG_CONF plcLogConf,
|
||||||
_In_ DEVINST dnDevInst,
|
_In_ DEVINST dnDevInst,
|
||||||
_In_ PRIORITY Priority,
|
_In_ PRIORITY Priority,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue