mirror of
https://github.com/reactos/reactos.git
synced 2024-08-14 23:49:49 +00:00
SEH protect all calls to the UM-PNP-Manager.
svn path=/trunk/; revision=37028
This commit is contained in:
parent
803fca876f
commit
339b380d78
|
@ -76,6 +76,13 @@ static BOOL GuidToString(LPGUID Guid, LPWSTR String)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static CONFIGRET
|
||||||
|
RpcStatusToCmStatus(RPC_STATUS Status)
|
||||||
|
{
|
||||||
|
return CR_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* CMP_WaitNoPendingInstallEvents [SETUPAPI.@]
|
* CMP_WaitNoPendingInstallEvents [SETUPAPI.@]
|
||||||
*/
|
*/
|
||||||
|
@ -102,6 +109,7 @@ CONFIGRET WINAPI CMP_Init_Detection(
|
||||||
DWORD dwMagic)
|
DWORD dwMagic)
|
||||||
{
|
{
|
||||||
RPC_BINDING_HANDLE BindingHandle = NULL;
|
RPC_BINDING_HANDLE BindingHandle = NULL;
|
||||||
|
CONFIGRET ret;
|
||||||
|
|
||||||
TRACE("%lu\n", dwMagic);
|
TRACE("%lu\n", dwMagic);
|
||||||
|
|
||||||
|
@ -111,7 +119,17 @@ CONFIGRET WINAPI CMP_Init_Detection(
|
||||||
if (!PnpGetLocalHandles(&BindingHandle, NULL))
|
if (!PnpGetLocalHandles(&BindingHandle, NULL))
|
||||||
return CR_FAILURE;
|
return CR_FAILURE;
|
||||||
|
|
||||||
return PNP_InitDetection(BindingHandle);
|
_SEH_TRY
|
||||||
|
{
|
||||||
|
ret = PNP_InitDetection(BindingHandle);
|
||||||
|
}
|
||||||
|
_SEH_HANDLE
|
||||||
|
{
|
||||||
|
ret = RpcStatusToCmStatus(RpcExceptionCode());
|
||||||
|
}
|
||||||
|
_SEH_END;
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -138,10 +156,19 @@ CONFIGRET WINAPI CMP_Report_LogOn(
|
||||||
bAdmin = IsUserAnAdmin();
|
bAdmin = IsUserAnAdmin();
|
||||||
|
|
||||||
for (i = 0; i < 30; i++)
|
for (i = 0; i < 30; i++)
|
||||||
|
{
|
||||||
|
_SEH_TRY
|
||||||
{
|
{
|
||||||
ret = PNP_ReportLogOn(BindingHandle,
|
ret = PNP_ReportLogOn(BindingHandle,
|
||||||
bAdmin,
|
bAdmin,
|
||||||
dwProcessId);
|
dwProcessId);
|
||||||
|
}
|
||||||
|
_SEH_HANDLE
|
||||||
|
{
|
||||||
|
ret = RpcStatusToCmStatus(RpcExceptionCode());
|
||||||
|
}
|
||||||
|
_SEH_END;
|
||||||
|
|
||||||
if (ret == CR_SUCCESS)
|
if (ret == CR_SUCCESS)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -217,7 +244,17 @@ CONFIGRET WINAPI CM_Add_Empty_Log_Conf_Ex(
|
||||||
if (lpDevInst == NULL)
|
if (lpDevInst == NULL)
|
||||||
return CR_INVALID_DEVNODE;
|
return CR_INVALID_DEVNODE;
|
||||||
|
|
||||||
ret = PNP_AddEmptyLogConf(BindingHandle, lpDevInst, Priority, &ulLogConfTag, ulFlags);
|
_SEH_TRY
|
||||||
|
{
|
||||||
|
ret = PNP_AddEmptyLogConf(BindingHandle, lpDevInst, Priority,
|
||||||
|
&ulLogConfTag, ulFlags);
|
||||||
|
}
|
||||||
|
_SEH_HANDLE
|
||||||
|
{
|
||||||
|
ret = RpcStatusToCmStatus(RpcExceptionCode());
|
||||||
|
}
|
||||||
|
_SEH_END;
|
||||||
|
|
||||||
if (ret == CR_SUCCESS)
|
if (ret == CR_SUCCESS)
|
||||||
{
|
{
|
||||||
pLogConfInfo = HeapAlloc(GetProcessHeap(), 0, sizeof(LOG_CONF_INFO));
|
pLogConfInfo = HeapAlloc(GetProcessHeap(), 0, sizeof(LOG_CONF_INFO));
|
||||||
|
@ -295,6 +332,7 @@ CONFIGRET WINAPI CM_Add_ID_ExW(
|
||||||
RPC_BINDING_HANDLE BindingHandle = NULL;
|
RPC_BINDING_HANDLE BindingHandle = NULL;
|
||||||
HSTRING_TABLE StringTable = NULL;
|
HSTRING_TABLE StringTable = NULL;
|
||||||
LPWSTR lpDevInst;
|
LPWSTR lpDevInst;
|
||||||
|
CONFIGRET ret;
|
||||||
|
|
||||||
TRACE("%p %s %lx %p\n", dnDevInst, debugstr_w(pszID), ulFlags, hMachine);
|
TRACE("%p %s %lx %p\n", dnDevInst, debugstr_w(pszID), ulFlags, hMachine);
|
||||||
|
|
||||||
|
@ -330,10 +368,20 @@ CONFIGRET WINAPI CM_Add_ID_ExW(
|
||||||
if (lpDevInst == NULL)
|
if (lpDevInst == NULL)
|
||||||
return CR_INVALID_DEVNODE;
|
return CR_INVALID_DEVNODE;
|
||||||
|
|
||||||
return PNP_AddID(BindingHandle,
|
_SEH_TRY
|
||||||
|
{
|
||||||
|
ret = PNP_AddID(BindingHandle,
|
||||||
lpDevInst,
|
lpDevInst,
|
||||||
pszID,
|
pszID,
|
||||||
ulFlags);
|
ulFlags);
|
||||||
|
}
|
||||||
|
_SEH_HANDLE
|
||||||
|
{
|
||||||
|
ret = RpcStatusToCmStatus(RpcExceptionCode());
|
||||||
|
}
|
||||||
|
_SEH_END;
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -530,11 +578,20 @@ CONFIGRET WINAPI CM_Create_DevNode_ExW(
|
||||||
if (lpParentDevInst == NULL)
|
if (lpParentDevInst == NULL)
|
||||||
return CR_INVALID_DEVNODE;
|
return CR_INVALID_DEVNODE;
|
||||||
|
|
||||||
|
_SEH_TRY
|
||||||
|
{
|
||||||
ret = PNP_CreateDevInst(BindingHandle,
|
ret = PNP_CreateDevInst(BindingHandle,
|
||||||
pDeviceID,
|
pDeviceID,
|
||||||
lpParentDevInst,
|
lpParentDevInst,
|
||||||
MAX_DEVICE_ID_LEN,
|
MAX_DEVICE_ID_LEN,
|
||||||
ulFlags);
|
ulFlags);
|
||||||
|
}
|
||||||
|
_SEH_HANDLE
|
||||||
|
{
|
||||||
|
ret = RpcStatusToCmStatus(RpcExceptionCode());
|
||||||
|
}
|
||||||
|
_SEH_END;
|
||||||
|
|
||||||
if (ret == CR_SUCCESS)
|
if (ret == CR_SUCCESS)
|
||||||
{
|
{
|
||||||
*pdnDevInst = StringTableAddString(StringTable, pDeviceID, 1);
|
*pdnDevInst = StringTableAddString(StringTable, pDeviceID, 1);
|
||||||
|
@ -565,6 +622,7 @@ CONFIGRET WINAPI CM_Delete_Class_Key_Ex(
|
||||||
{
|
{
|
||||||
WCHAR szGuidString[MAX_GUID_STRING_LEN];
|
WCHAR szGuidString[MAX_GUID_STRING_LEN];
|
||||||
RPC_BINDING_HANDLE BindingHandle = NULL;
|
RPC_BINDING_HANDLE BindingHandle = NULL;
|
||||||
|
CONFIGRET ret;
|
||||||
|
|
||||||
TRACE("%p %lx %lx\n", ClassGuid, ulFlags, hMachine);
|
TRACE("%p %lx %lx\n", ClassGuid, ulFlags, hMachine);
|
||||||
|
|
||||||
|
@ -589,11 +647,22 @@ CONFIGRET WINAPI CM_Delete_Class_Key_Ex(
|
||||||
return CR_FAILURE;
|
return CR_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
return PNP_DeleteClassKey(BindingHandle,
|
_SEH_TRY
|
||||||
|
{
|
||||||
|
ret = PNP_DeleteClassKey(BindingHandle,
|
||||||
szGuidString,
|
szGuidString,
|
||||||
ulFlags);
|
ulFlags);
|
||||||
|
}
|
||||||
|
_SEH_HANDLE
|
||||||
|
{
|
||||||
|
ret = RpcStatusToCmStatus(RpcExceptionCode());
|
||||||
|
}
|
||||||
|
_SEH_END;
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* CM_Delete_DevNode_Key [SETUPAPI.@]
|
* CM_Delete_DevNode_Key [SETUPAPI.@]
|
||||||
*/
|
*/
|
||||||
|
@ -605,6 +674,7 @@ CONFIGRET WINAPI CM_Delete_DevNode_Key(
|
||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* CM_Delete_DevNode_Key_Ex [SETUPAPI.@]
|
* CM_Delete_DevNode_Key_Ex [SETUPAPI.@]
|
||||||
*/
|
*/
|
||||||
|
@ -639,6 +709,7 @@ CONFIGRET WINAPI CM_Disable_DevNode_Ex(
|
||||||
RPC_BINDING_HANDLE BindingHandle = NULL;
|
RPC_BINDING_HANDLE BindingHandle = NULL;
|
||||||
HSTRING_TABLE StringTable = NULL;
|
HSTRING_TABLE StringTable = NULL;
|
||||||
LPWSTR lpDevInst;
|
LPWSTR lpDevInst;
|
||||||
|
CONFIGRET ret;
|
||||||
|
|
||||||
FIXME("%p %lx %p\n", dnDevInst, ulFlags, hMachine);
|
FIXME("%p %lx %p\n", dnDevInst, ulFlags, hMachine);
|
||||||
|
|
||||||
|
@ -671,11 +742,21 @@ CONFIGRET WINAPI CM_Disable_DevNode_Ex(
|
||||||
if (lpDevInst == NULL)
|
if (lpDevInst == NULL)
|
||||||
return CR_INVALID_DEVNODE;
|
return CR_INVALID_DEVNODE;
|
||||||
|
|
||||||
return PNP_DeviceInstanceAction(BindingHandle,
|
_SEH_TRY
|
||||||
|
{
|
||||||
|
ret = PNP_DeviceInstanceAction(BindingHandle,
|
||||||
5,
|
5,
|
||||||
ulFlags,
|
ulFlags,
|
||||||
lpDevInst,
|
lpDevInst,
|
||||||
NULL);
|
NULL);
|
||||||
|
}
|
||||||
|
_SEH_HANDLE
|
||||||
|
{
|
||||||
|
ret = RpcStatusToCmStatus(RpcExceptionCode());
|
||||||
|
}
|
||||||
|
_SEH_END;
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -727,6 +808,7 @@ CONFIGRET WINAPI CM_Enable_DevNode_Ex(
|
||||||
RPC_BINDING_HANDLE BindingHandle = NULL;
|
RPC_BINDING_HANDLE BindingHandle = NULL;
|
||||||
HSTRING_TABLE StringTable = NULL;
|
HSTRING_TABLE StringTable = NULL;
|
||||||
LPWSTR lpDevInst;
|
LPWSTR lpDevInst;
|
||||||
|
CONFIGRET ret;
|
||||||
|
|
||||||
FIXME("%p %lx %p\n", dnDevInst, ulFlags, hMachine);
|
FIXME("%p %lx %p\n", dnDevInst, ulFlags, hMachine);
|
||||||
|
|
||||||
|
@ -759,11 +841,21 @@ CONFIGRET WINAPI CM_Enable_DevNode_Ex(
|
||||||
if (lpDevInst == NULL)
|
if (lpDevInst == NULL)
|
||||||
return CR_INVALID_DEVNODE;
|
return CR_INVALID_DEVNODE;
|
||||||
|
|
||||||
return PNP_DeviceInstanceAction(BindingHandle,
|
_SEH_TRY
|
||||||
|
{
|
||||||
|
ret = PNP_DeviceInstanceAction(BindingHandle,
|
||||||
4,
|
4,
|
||||||
ulFlags,
|
ulFlags,
|
||||||
lpDevInst,
|
lpDevInst,
|
||||||
NULL);
|
NULL);
|
||||||
|
}
|
||||||
|
_SEH_HANDLE
|
||||||
|
{
|
||||||
|
ret = RpcStatusToCmStatus(RpcExceptionCode());
|
||||||
|
}
|
||||||
|
_SEH_END;
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -809,6 +901,8 @@ CONFIGRET WINAPI CM_Enumerate_Classes_Ex(
|
||||||
return CR_FAILURE;
|
return CR_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_SEH_TRY
|
||||||
|
{
|
||||||
ret = PNP_EnumerateSubKeys(BindingHandle,
|
ret = PNP_EnumerateSubKeys(BindingHandle,
|
||||||
PNP_CLASS_SUBKEYS,
|
PNP_CLASS_SUBKEYS,
|
||||||
ulClassIndex,
|
ulClassIndex,
|
||||||
|
@ -816,6 +910,13 @@ CONFIGRET WINAPI CM_Enumerate_Classes_Ex(
|
||||||
MAX_GUID_STRING_LEN,
|
MAX_GUID_STRING_LEN,
|
||||||
&ulLength,
|
&ulLength,
|
||||||
ulFlags);
|
ulFlags);
|
||||||
|
}
|
||||||
|
_SEH_HANDLE
|
||||||
|
{
|
||||||
|
ret = RpcStatusToCmStatus(RpcExceptionCode());
|
||||||
|
}
|
||||||
|
_SEH_END;
|
||||||
|
|
||||||
if (ret == CR_SUCCESS)
|
if (ret == CR_SUCCESS)
|
||||||
{
|
{
|
||||||
/* Remove the {} */
|
/* Remove the {} */
|
||||||
|
@ -908,6 +1009,7 @@ CONFIGRET WINAPI CM_Enumerate_Enumerators_ExW(
|
||||||
HMACHINE hMachine)
|
HMACHINE hMachine)
|
||||||
{
|
{
|
||||||
RPC_BINDING_HANDLE BindingHandle = NULL;
|
RPC_BINDING_HANDLE BindingHandle = NULL;
|
||||||
|
CONFIGRET ret;
|
||||||
|
|
||||||
TRACE("%lu %p %p %lx %lx\n", ulEnumIndex, Buffer, pulLength, ulFlags,
|
TRACE("%lu %p %p %lx %lx\n", ulEnumIndex, Buffer, pulLength, ulFlags,
|
||||||
hMachine);
|
hMachine);
|
||||||
|
@ -932,13 +1034,23 @@ CONFIGRET WINAPI CM_Enumerate_Enumerators_ExW(
|
||||||
return CR_FAILURE;
|
return CR_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
return PNP_EnumerateSubKeys(BindingHandle,
|
_SEH_TRY
|
||||||
|
{
|
||||||
|
ret = PNP_EnumerateSubKeys(BindingHandle,
|
||||||
PNP_ENUMERATOR_SUBKEYS,
|
PNP_ENUMERATOR_SUBKEYS,
|
||||||
ulEnumIndex,
|
ulEnumIndex,
|
||||||
Buffer,
|
Buffer,
|
||||||
*pulLength,
|
*pulLength,
|
||||||
pulLength,
|
pulLength,
|
||||||
ulFlags);
|
ulFlags);
|
||||||
|
}
|
||||||
|
_SEH_HANDLE
|
||||||
|
{
|
||||||
|
ret = RpcStatusToCmStatus(RpcExceptionCode());
|
||||||
|
}
|
||||||
|
_SEH_END;
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -963,6 +1075,7 @@ CONFIGRET WINAPI CM_Free_Log_Conf_Ex(
|
||||||
HSTRING_TABLE StringTable = NULL;
|
HSTRING_TABLE StringTable = NULL;
|
||||||
LPWSTR lpDevInst;
|
LPWSTR lpDevInst;
|
||||||
PLOG_CONF_INFO pLogConfInfo;
|
PLOG_CONF_INFO pLogConfInfo;
|
||||||
|
CONFIGRET ret;
|
||||||
|
|
||||||
TRACE("%lx %lx %lx\n", lcLogConfToBeFreed, ulFlags, hMachine);
|
TRACE("%lx %lx %lx\n", lcLogConfToBeFreed, ulFlags, hMachine);
|
||||||
|
|
||||||
|
@ -996,8 +1109,18 @@ CONFIGRET WINAPI CM_Free_Log_Conf_Ex(
|
||||||
if (lpDevInst == NULL)
|
if (lpDevInst == NULL)
|
||||||
return CR_INVALID_DEVNODE;
|
return CR_INVALID_DEVNODE;
|
||||||
|
|
||||||
return PNP_FreeLogConf(BindingHandle, lpDevInst, pLogConfInfo->ulFlags,
|
_SEH_TRY
|
||||||
|
{
|
||||||
|
ret = PNP_FreeLogConf(BindingHandle, lpDevInst, pLogConfInfo->ulFlags,
|
||||||
pLogConfInfo->ulTag, 0);
|
pLogConfInfo->ulTag, 0);
|
||||||
|
}
|
||||||
|
_SEH_HANDLE
|
||||||
|
{
|
||||||
|
ret = RpcStatusToCmStatus(RpcExceptionCode());
|
||||||
|
}
|
||||||
|
_SEH_END;
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1078,12 +1201,21 @@ CONFIGRET WINAPI CM_Get_Child_Ex(
|
||||||
if (lpDevInst == NULL)
|
if (lpDevInst == NULL)
|
||||||
return CR_INVALID_DEVNODE;
|
return CR_INVALID_DEVNODE;
|
||||||
|
|
||||||
|
_SEH_TRY
|
||||||
|
{
|
||||||
ret = PNP_GetRelatedDeviceInstance(BindingHandle,
|
ret = PNP_GetRelatedDeviceInstance(BindingHandle,
|
||||||
PNP_GET_CHILD_DEVICE_INSTANCE,
|
PNP_GET_CHILD_DEVICE_INSTANCE,
|
||||||
lpDevInst,
|
lpDevInst,
|
||||||
szRelatedDevInst,
|
szRelatedDevInst,
|
||||||
&dwLength,
|
&dwLength,
|
||||||
0);
|
0);
|
||||||
|
}
|
||||||
|
_SEH_HANDLE
|
||||||
|
{
|
||||||
|
ret = RpcStatusToCmStatus(RpcExceptionCode());
|
||||||
|
}
|
||||||
|
_SEH_END;
|
||||||
|
|
||||||
if (ret != CR_SUCCESS)
|
if (ret != CR_SUCCESS)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
@ -1276,6 +1408,7 @@ CM_Get_Class_Name_ExW(
|
||||||
{
|
{
|
||||||
WCHAR szGuidString[MAX_GUID_STRING_LEN];
|
WCHAR szGuidString[MAX_GUID_STRING_LEN];
|
||||||
RPC_BINDING_HANDLE BindingHandle = NULL;
|
RPC_BINDING_HANDLE BindingHandle = NULL;
|
||||||
|
CONFIGRET ret;
|
||||||
|
|
||||||
TRACE("%p %p %p %lx %lx\n",
|
TRACE("%p %p %p %lx %lx\n",
|
||||||
ClassGuid, Buffer, pulLength, ulFlags, hMachine);
|
ClassGuid, Buffer, pulLength, ulFlags, hMachine);
|
||||||
|
@ -1303,11 +1436,21 @@ CM_Get_Class_Name_ExW(
|
||||||
return CR_FAILURE;
|
return CR_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
return PNP_GetClassName(BindingHandle,
|
_SEH_TRY
|
||||||
|
{
|
||||||
|
ret = PNP_GetClassName(BindingHandle,
|
||||||
szGuidString,
|
szGuidString,
|
||||||
Buffer,
|
Buffer,
|
||||||
pulLength,
|
pulLength,
|
||||||
ulFlags);
|
ulFlags);
|
||||||
|
}
|
||||||
|
_SEH_HANDLE
|
||||||
|
{
|
||||||
|
ret = RpcStatusToCmStatus(RpcExceptionCode());
|
||||||
|
}
|
||||||
|
_SEH_END;
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1331,6 +1474,7 @@ CONFIGRET WINAPI CM_Get_Depth_Ex(
|
||||||
RPC_BINDING_HANDLE BindingHandle = NULL;
|
RPC_BINDING_HANDLE BindingHandle = NULL;
|
||||||
HSTRING_TABLE StringTable = NULL;
|
HSTRING_TABLE StringTable = NULL;
|
||||||
LPWSTR lpDevInst;
|
LPWSTR lpDevInst;
|
||||||
|
CONFIGRET ret;
|
||||||
|
|
||||||
TRACE("%p %lx %lx %lx\n",
|
TRACE("%p %lx %lx %lx\n",
|
||||||
pulDepth, dnDevInst, ulFlags, hMachine);
|
pulDepth, dnDevInst, ulFlags, hMachine);
|
||||||
|
@ -1364,10 +1508,20 @@ CONFIGRET WINAPI CM_Get_Depth_Ex(
|
||||||
if (lpDevInst == NULL)
|
if (lpDevInst == NULL)
|
||||||
return CR_INVALID_DEVNODE;
|
return CR_INVALID_DEVNODE;
|
||||||
|
|
||||||
return PNP_GetDepth(BindingHandle,
|
_SEH_TRY
|
||||||
|
{
|
||||||
|
ret = PNP_GetDepth(BindingHandle,
|
||||||
lpDevInst,
|
lpDevInst,
|
||||||
pulDepth,
|
pulDepth,
|
||||||
ulFlags);
|
ulFlags);
|
||||||
|
}
|
||||||
|
_SEH_HANDLE
|
||||||
|
{
|
||||||
|
ret = RpcStatusToCmStatus(RpcExceptionCode());
|
||||||
|
}
|
||||||
|
_SEH_END;
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1532,6 +1686,9 @@ CONFIGRET WINAPI CM_Get_DevNode_Registry_Property_ExW(
|
||||||
return CR_INVALID_DEVNODE;
|
return CR_INVALID_DEVNODE;
|
||||||
|
|
||||||
ulTransferLength = *pulLength;
|
ulTransferLength = *pulLength;
|
||||||
|
|
||||||
|
_SEH_TRY
|
||||||
|
{
|
||||||
ret = PNP_GetDeviceRegProp(BindingHandle,
|
ret = PNP_GetDeviceRegProp(BindingHandle,
|
||||||
lpDevInst,
|
lpDevInst,
|
||||||
ulProperty,
|
ulProperty,
|
||||||
|
@ -1540,6 +1697,13 @@ CONFIGRET WINAPI CM_Get_DevNode_Registry_Property_ExW(
|
||||||
&ulTransferLength,
|
&ulTransferLength,
|
||||||
pulLength,
|
pulLength,
|
||||||
ulFlags);
|
ulFlags);
|
||||||
|
}
|
||||||
|
_SEH_HANDLE
|
||||||
|
{
|
||||||
|
ret = RpcStatusToCmStatus(RpcExceptionCode());
|
||||||
|
}
|
||||||
|
_SEH_END;
|
||||||
|
|
||||||
if (ret == CR_SUCCESS)
|
if (ret == CR_SUCCESS)
|
||||||
{
|
{
|
||||||
if (pulRegDataType != NULL)
|
if (pulRegDataType != NULL)
|
||||||
|
@ -1575,6 +1739,7 @@ CM_Get_DevNode_Status_Ex(
|
||||||
RPC_BINDING_HANDLE BindingHandle = NULL;
|
RPC_BINDING_HANDLE BindingHandle = NULL;
|
||||||
HSTRING_TABLE StringTable = NULL;
|
HSTRING_TABLE StringTable = NULL;
|
||||||
LPWSTR lpDevInst;
|
LPWSTR lpDevInst;
|
||||||
|
CONFIGRET ret;
|
||||||
|
|
||||||
TRACE("%p %p %lx %lx %lx\n",
|
TRACE("%p %p %lx %lx %lx\n",
|
||||||
pulStatus, pulProblemNumber, dnDevInst, ulFlags, hMachine);
|
pulStatus, pulProblemNumber, dnDevInst, ulFlags, hMachine);
|
||||||
|
@ -1608,11 +1773,21 @@ CM_Get_DevNode_Status_Ex(
|
||||||
if (lpDevInst == NULL)
|
if (lpDevInst == NULL)
|
||||||
return CR_INVALID_DEVNODE;
|
return CR_INVALID_DEVNODE;
|
||||||
|
|
||||||
return PNP_GetDeviceStatus(BindingHandle,
|
_SEH_TRY
|
||||||
|
{
|
||||||
|
ret = PNP_GetDeviceStatus(BindingHandle,
|
||||||
lpDevInst,
|
lpDevInst,
|
||||||
pulStatus,
|
pulStatus,
|
||||||
pulProblemNumber,
|
pulProblemNumber,
|
||||||
ulFlags);
|
ulFlags);
|
||||||
|
}
|
||||||
|
_SEH_HANDLE
|
||||||
|
{
|
||||||
|
ret = RpcStatusToCmStatus(RpcExceptionCode());
|
||||||
|
}
|
||||||
|
_SEH_END;
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1883,6 +2058,7 @@ CONFIGRET WINAPI CM_Get_Device_ID_List_Size_ExW(
|
||||||
PULONG pulLen, PCWSTR pszFilter, ULONG ulFlags, HMACHINE hMachine)
|
PULONG pulLen, PCWSTR pszFilter, ULONG ulFlags, HMACHINE hMachine)
|
||||||
{
|
{
|
||||||
RPC_BINDING_HANDLE BindingHandle = NULL;
|
RPC_BINDING_HANDLE BindingHandle = NULL;
|
||||||
|
CONFIGRET ret;
|
||||||
|
|
||||||
FIXME("%p %s %ld %lx\n", pulLen, debugstr_w(pszFilter), ulFlags, hMachine);
|
FIXME("%p %s %ld %lx\n", pulLen, debugstr_w(pszFilter), ulFlags, hMachine);
|
||||||
|
|
||||||
|
@ -1906,10 +2082,20 @@ CONFIGRET WINAPI CM_Get_Device_ID_List_Size_ExW(
|
||||||
|
|
||||||
*pulLen = 0;
|
*pulLen = 0;
|
||||||
|
|
||||||
return PNP_GetDeviceListSize(BindingHandle,
|
_SEH_TRY
|
||||||
|
{
|
||||||
|
ret = PNP_GetDeviceListSize(BindingHandle,
|
||||||
(LPWSTR)pszFilter,
|
(LPWSTR)pszFilter,
|
||||||
pulLen,
|
pulLen,
|
||||||
ulFlags);
|
ulFlags);
|
||||||
|
}
|
||||||
|
_SEH_HANDLE
|
||||||
|
{
|
||||||
|
ret = RpcStatusToCmStatus(RpcExceptionCode());
|
||||||
|
}
|
||||||
|
_SEH_END;
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2024,11 +2210,20 @@ CONFIGRET WINAPI CM_Get_First_Log_Conf_Ex(
|
||||||
if (lpDevInst == NULL)
|
if (lpDevInst == NULL)
|
||||||
return CR_INVALID_DEVNODE;
|
return CR_INVALID_DEVNODE;
|
||||||
|
|
||||||
|
_SEH_TRY
|
||||||
|
{
|
||||||
ret = PNP_GetFirstLogConf(BindingHandle,
|
ret = PNP_GetFirstLogConf(BindingHandle,
|
||||||
lpDevInst,
|
lpDevInst,
|
||||||
ulFlags,
|
ulFlags,
|
||||||
&ulTag,
|
&ulTag,
|
||||||
ulFlags);
|
ulFlags);
|
||||||
|
}
|
||||||
|
_SEH_HANDLE
|
||||||
|
{
|
||||||
|
ret = RpcStatusToCmStatus(RpcExceptionCode());
|
||||||
|
}
|
||||||
|
_SEH_END;
|
||||||
|
|
||||||
if (ret != CR_SUCCESS)
|
if (ret != CR_SUCCESS)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
@ -2065,6 +2260,7 @@ CONFIGRET WINAPI CM_Get_Global_State_Ex(
|
||||||
PULONG pulState, ULONG ulFlags, HMACHINE hMachine)
|
PULONG pulState, ULONG ulFlags, HMACHINE hMachine)
|
||||||
{
|
{
|
||||||
RPC_BINDING_HANDLE BindingHandle = NULL;
|
RPC_BINDING_HANDLE BindingHandle = NULL;
|
||||||
|
CONFIGRET ret;
|
||||||
|
|
||||||
TRACE("%p %lx %lx\n", pulState, ulFlags, hMachine);
|
TRACE("%p %lx %lx\n", pulState, ulFlags, hMachine);
|
||||||
|
|
||||||
|
@ -2086,7 +2282,17 @@ CONFIGRET WINAPI CM_Get_Global_State_Ex(
|
||||||
return CR_FAILURE;
|
return CR_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
return PNP_GetGlobalState(BindingHandle, pulState, ulFlags);
|
_SEH_TRY
|
||||||
|
{
|
||||||
|
ret = PNP_GetGlobalState(BindingHandle, pulState, ulFlags);
|
||||||
|
}
|
||||||
|
_SEH_HANDLE
|
||||||
|
{
|
||||||
|
ret = RpcStatusToCmStatus(RpcExceptionCode());
|
||||||
|
}
|
||||||
|
_SEH_END;
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2157,6 +2363,7 @@ CONFIGRET WINAPI CM_Get_HW_Prof_Flags_ExW(
|
||||||
ULONG ulFlags, HMACHINE hMachine)
|
ULONG ulFlags, HMACHINE hMachine)
|
||||||
{
|
{
|
||||||
RPC_BINDING_HANDLE BindingHandle = NULL;
|
RPC_BINDING_HANDLE BindingHandle = NULL;
|
||||||
|
CONFIGRET ret;
|
||||||
|
|
||||||
FIXME("%s %lu %p %lx %lx\n", debugstr_w(szDevInstName),
|
FIXME("%s %lu %p %lx %lx\n", debugstr_w(szDevInstName),
|
||||||
ulHardwareProfile, pulValue, ulFlags, hMachine);
|
ulHardwareProfile, pulValue, ulFlags, hMachine);
|
||||||
|
@ -2181,8 +2388,18 @@ CONFIGRET WINAPI CM_Get_HW_Prof_Flags_ExW(
|
||||||
return CR_FAILURE;
|
return CR_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
return PNP_HwProfFlags(BindingHandle, PNP_GET_HWPROFFLAGS, szDevInstName,
|
_SEH_TRY
|
||||||
|
{
|
||||||
|
ret = PNP_HwProfFlags(BindingHandle, PNP_GET_HWPROFFLAGS, szDevInstName,
|
||||||
ulHardwareProfile, pulValue, NULL, NULL, 0, 0);
|
ulHardwareProfile, pulValue, NULL, NULL, 0, 0);
|
||||||
|
}
|
||||||
|
_SEH_HANDLE
|
||||||
|
{
|
||||||
|
ret = RpcStatusToCmStatus(RpcExceptionCode());
|
||||||
|
}
|
||||||
|
_SEH_END;
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2208,6 +2425,7 @@ CONFIGRET WINAPI CM_Get_Log_Conf_Priority_Ex(
|
||||||
HSTRING_TABLE StringTable = NULL;
|
HSTRING_TABLE StringTable = NULL;
|
||||||
PLOG_CONF_INFO pLogConfInfo;
|
PLOG_CONF_INFO pLogConfInfo;
|
||||||
LPWSTR lpDevInst;
|
LPWSTR lpDevInst;
|
||||||
|
CONFIGRET ret;
|
||||||
|
|
||||||
FIXME("%p %p %lx %lx\n", lcLogConf, pPriority, ulFlags, hMachine);
|
FIXME("%p %p %lx %lx\n", lcLogConf, pPriority, ulFlags, hMachine);
|
||||||
|
|
||||||
|
@ -2241,12 +2459,22 @@ CONFIGRET WINAPI CM_Get_Log_Conf_Priority_Ex(
|
||||||
if (lpDevInst == NULL)
|
if (lpDevInst == NULL)
|
||||||
return CR_INVALID_DEVNODE;
|
return CR_INVALID_DEVNODE;
|
||||||
|
|
||||||
return PNP_GetLogConfPriority(BindingHandle,
|
_SEH_TRY
|
||||||
|
{
|
||||||
|
ret = PNP_GetLogConfPriority(BindingHandle,
|
||||||
lpDevInst,
|
lpDevInst,
|
||||||
pLogConfInfo->ulFlags,
|
pLogConfInfo->ulFlags,
|
||||||
pLogConfInfo->ulTag,
|
pLogConfInfo->ulTag,
|
||||||
pPriority,
|
pPriority,
|
||||||
0);
|
0);
|
||||||
|
}
|
||||||
|
_SEH_HANDLE
|
||||||
|
{
|
||||||
|
ret = RpcStatusToCmStatus(RpcExceptionCode());
|
||||||
|
}
|
||||||
|
_SEH_END;
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2308,12 +2536,21 @@ CONFIGRET WINAPI CM_Get_Next_Log_Conf_Ex(
|
||||||
if (lpDevInst == NULL)
|
if (lpDevInst == NULL)
|
||||||
return CR_INVALID_DEVNODE;
|
return CR_INVALID_DEVNODE;
|
||||||
|
|
||||||
|
_SEH_TRY
|
||||||
|
{
|
||||||
ret = PNP_GetNextLogConf(BindingHandle,
|
ret = PNP_GetNextLogConf(BindingHandle,
|
||||||
lpDevInst,
|
lpDevInst,
|
||||||
pLogConfInfo->ulFlags,
|
pLogConfInfo->ulFlags,
|
||||||
pLogConfInfo->ulTag,
|
pLogConfInfo->ulTag,
|
||||||
&ulNewTag,
|
&ulNewTag,
|
||||||
0);
|
0);
|
||||||
|
}
|
||||||
|
_SEH_HANDLE
|
||||||
|
{
|
||||||
|
ret = RpcStatusToCmStatus(RpcExceptionCode());
|
||||||
|
}
|
||||||
|
_SEH_END;
|
||||||
|
|
||||||
if (ret != CR_SUCCESS)
|
if (ret != CR_SUCCESS)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
@ -2392,12 +2629,21 @@ CONFIGRET WINAPI CM_Get_Parent_Ex(
|
||||||
if (lpDevInst == NULL)
|
if (lpDevInst == NULL)
|
||||||
return CR_INVALID_DEVNODE;
|
return CR_INVALID_DEVNODE;
|
||||||
|
|
||||||
|
_SEH_TRY
|
||||||
|
{
|
||||||
ret = PNP_GetRelatedDeviceInstance(BindingHandle,
|
ret = PNP_GetRelatedDeviceInstance(BindingHandle,
|
||||||
PNP_GET_PARENT_DEVICE_INSTANCE,
|
PNP_GET_PARENT_DEVICE_INSTANCE,
|
||||||
lpDevInst,
|
lpDevInst,
|
||||||
szRelatedDevInst,
|
szRelatedDevInst,
|
||||||
&dwLength,
|
&dwLength,
|
||||||
0);
|
0);
|
||||||
|
}
|
||||||
|
_SEH_HANDLE
|
||||||
|
{
|
||||||
|
ret = RpcStatusToCmStatus(RpcExceptionCode());
|
||||||
|
}
|
||||||
|
_SEH_END;
|
||||||
|
|
||||||
if (ret != CR_SUCCESS)
|
if (ret != CR_SUCCESS)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
@ -2470,12 +2716,21 @@ CONFIGRET WINAPI CM_Get_Sibling_Ex(
|
||||||
if (lpDevInst == NULL)
|
if (lpDevInst == NULL)
|
||||||
return CR_INVALID_DEVNODE;
|
return CR_INVALID_DEVNODE;
|
||||||
|
|
||||||
|
_SEH_TRY
|
||||||
|
{
|
||||||
ret = PNP_GetRelatedDeviceInstance(BindingHandle,
|
ret = PNP_GetRelatedDeviceInstance(BindingHandle,
|
||||||
PNP_GET_SIBLING_DEVICE_INSTANCE,
|
PNP_GET_SIBLING_DEVICE_INSTANCE,
|
||||||
lpDevInst,
|
lpDevInst,
|
||||||
szRelatedDevInst,
|
szRelatedDevInst,
|
||||||
&dwLength,
|
&dwLength,
|
||||||
0);
|
0);
|
||||||
|
}
|
||||||
|
_SEH_HANDLE
|
||||||
|
{
|
||||||
|
ret = RpcStatusToCmStatus(RpcExceptionCode());
|
||||||
|
}
|
||||||
|
_SEH_END;
|
||||||
|
|
||||||
if (ret != CR_SUCCESS)
|
if (ret != CR_SUCCESS)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
@ -2508,6 +2763,7 @@ WORD WINAPI CM_Get_Version_Ex(HMACHINE hMachine)
|
||||||
{
|
{
|
||||||
RPC_BINDING_HANDLE BindingHandle = NULL;
|
RPC_BINDING_HANDLE BindingHandle = NULL;
|
||||||
WORD Version = 0;
|
WORD Version = 0;
|
||||||
|
CONFIGRET ret;
|
||||||
|
|
||||||
TRACE("%lx\n", hMachine);
|
TRACE("%lx\n", hMachine);
|
||||||
|
|
||||||
|
@ -2523,7 +2779,17 @@ WORD WINAPI CM_Get_Version_Ex(HMACHINE hMachine)
|
||||||
return CR_FAILURE;
|
return CR_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (PNP_GetVersion(BindingHandle, &Version) != CR_SUCCESS)
|
_SEH_TRY
|
||||||
|
{
|
||||||
|
ret = PNP_GetVersion(BindingHandle, &Version);
|
||||||
|
}
|
||||||
|
_SEH_HANDLE
|
||||||
|
{
|
||||||
|
ret = RpcStatusToCmStatus(RpcExceptionCode());
|
||||||
|
}
|
||||||
|
_SEH_END;
|
||||||
|
|
||||||
|
if (ret != CR_SUCCESS)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
return Version;
|
return Version;
|
||||||
|
@ -2548,6 +2814,7 @@ CONFIGRET WINAPI CM_Is_Dock_Station_Present_Ex(
|
||||||
PBOOL pbPresent, HMACHINE hMachine)
|
PBOOL pbPresent, HMACHINE hMachine)
|
||||||
{
|
{
|
||||||
RPC_BINDING_HANDLE BindingHandle = NULL;
|
RPC_BINDING_HANDLE BindingHandle = NULL;
|
||||||
|
CONFIGRET ret;
|
||||||
|
|
||||||
TRACE("%p %lx\n", pbPresent, hMachine);
|
TRACE("%p %lx\n", pbPresent, hMachine);
|
||||||
|
|
||||||
|
@ -2568,8 +2835,18 @@ CONFIGRET WINAPI CM_Is_Dock_Station_Present_Ex(
|
||||||
return CR_FAILURE;
|
return CR_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
return PNP_IsDockStationPresent(BindingHandle,
|
_SEH_TRY
|
||||||
|
{
|
||||||
|
ret = PNP_IsDockStationPresent(BindingHandle,
|
||||||
pbPresent);
|
pbPresent);
|
||||||
|
}
|
||||||
|
_SEH_HANDLE
|
||||||
|
{
|
||||||
|
ret = RpcStatusToCmStatus(RpcExceptionCode());
|
||||||
|
}
|
||||||
|
_SEH_END;
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2661,20 +2938,38 @@ CONFIGRET WINAPI CM_Locate_DevNode_ExW(
|
||||||
lstrcpyW(DeviceIdBuffer, pDeviceID);
|
lstrcpyW(DeviceIdBuffer, pDeviceID);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
_SEH_TRY
|
||||||
{
|
{
|
||||||
/* Get the root device ID */
|
/* Get the root device ID */
|
||||||
ret = PNP_GetRootDeviceInstance(BindingHandle,
|
ret = PNP_GetRootDeviceInstance(BindingHandle,
|
||||||
DeviceIdBuffer,
|
DeviceIdBuffer,
|
||||||
MAX_DEVICE_ID_LEN);
|
MAX_DEVICE_ID_LEN);
|
||||||
|
}
|
||||||
|
_SEH_HANDLE
|
||||||
|
{
|
||||||
|
ret = RpcStatusToCmStatus(RpcExceptionCode());
|
||||||
|
}
|
||||||
|
_SEH_END;
|
||||||
|
|
||||||
if (ret != CR_SUCCESS)
|
if (ret != CR_SUCCESS)
|
||||||
return CR_FAILURE;
|
return CR_FAILURE;
|
||||||
}
|
}
|
||||||
TRACE("DeviceIdBuffer: %s\n", debugstr_w(DeviceIdBuffer));
|
TRACE("DeviceIdBuffer: %s\n", debugstr_w(DeviceIdBuffer));
|
||||||
|
|
||||||
|
_SEH_TRY
|
||||||
|
{
|
||||||
/* Validate the device ID */
|
/* Validate the device ID */
|
||||||
ret = PNP_ValidateDeviceInstance(BindingHandle,
|
ret = PNP_ValidateDeviceInstance(BindingHandle,
|
||||||
DeviceIdBuffer,
|
DeviceIdBuffer,
|
||||||
ulFlags);
|
ulFlags);
|
||||||
|
}
|
||||||
|
_SEH_HANDLE
|
||||||
|
{
|
||||||
|
ret = RpcStatusToCmStatus(RpcExceptionCode());
|
||||||
|
}
|
||||||
|
_SEH_END;
|
||||||
|
|
||||||
if (ret == CR_SUCCESS)
|
if (ret == CR_SUCCESS)
|
||||||
{
|
{
|
||||||
*pdnDevInst = StringTableAddString(StringTable, DeviceIdBuffer, 1);
|
*pdnDevInst = StringTableAddString(StringTable, DeviceIdBuffer, 1);
|
||||||
|
@ -2708,6 +3003,7 @@ CONFIGRET WINAPI CM_Move_DevNode_Ex(
|
||||||
HSTRING_TABLE StringTable = NULL;
|
HSTRING_TABLE StringTable = NULL;
|
||||||
LPWSTR lpFromDevInst;
|
LPWSTR lpFromDevInst;
|
||||||
LPWSTR lpToDevInst;
|
LPWSTR lpToDevInst;
|
||||||
|
CONFIGRET ret;
|
||||||
|
|
||||||
FIXME("%lx %lx %lx %lx\n",
|
FIXME("%lx %lx %lx %lx\n",
|
||||||
dnFromDevInst, dnToDevInst, ulFlags, hMachine);
|
dnFromDevInst, dnToDevInst, ulFlags, hMachine);
|
||||||
|
@ -2745,11 +3041,21 @@ CONFIGRET WINAPI CM_Move_DevNode_Ex(
|
||||||
if (lpToDevInst == NULL)
|
if (lpToDevInst == NULL)
|
||||||
return CR_INVALID_DEVNODE;
|
return CR_INVALID_DEVNODE;
|
||||||
|
|
||||||
return PNP_DeviceInstanceAction(BindingHandle,
|
_SEH_TRY
|
||||||
|
{
|
||||||
|
ret = PNP_DeviceInstanceAction(BindingHandle,
|
||||||
2,
|
2,
|
||||||
ulFlags,
|
ulFlags,
|
||||||
lpFromDevInst,
|
lpFromDevInst,
|
||||||
lpToDevInst);
|
lpToDevInst);
|
||||||
|
}
|
||||||
|
_SEH_HANDLE
|
||||||
|
{
|
||||||
|
ret = RpcStatusToCmStatus(RpcExceptionCode());
|
||||||
|
}
|
||||||
|
_SEH_END;
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2962,6 +3268,7 @@ CM_Reenumerate_DevNode_Ex(
|
||||||
RPC_BINDING_HANDLE BindingHandle = NULL;
|
RPC_BINDING_HANDLE BindingHandle = NULL;
|
||||||
HSTRING_TABLE StringTable = NULL;
|
HSTRING_TABLE StringTable = NULL;
|
||||||
LPWSTR lpDevInst;
|
LPWSTR lpDevInst;
|
||||||
|
CONFIGRET ret;
|
||||||
|
|
||||||
FIXME("%lx %lx %lx\n", dnDevInst, ulFlags, hMachine);
|
FIXME("%lx %lx %lx\n", dnDevInst, ulFlags, hMachine);
|
||||||
|
|
||||||
|
@ -2991,11 +3298,21 @@ CM_Reenumerate_DevNode_Ex(
|
||||||
if (lpDevInst == NULL)
|
if (lpDevInst == NULL)
|
||||||
return CR_INVALID_DEVNODE;
|
return CR_INVALID_DEVNODE;
|
||||||
|
|
||||||
return PNP_DeviceInstanceAction(BindingHandle,
|
_SEH_TRY
|
||||||
|
{
|
||||||
|
ret = PNP_DeviceInstanceAction(BindingHandle,
|
||||||
7,
|
7,
|
||||||
ulFlags,
|
ulFlags,
|
||||||
lpDevInst,
|
lpDevInst,
|
||||||
NULL);
|
NULL);
|
||||||
|
}
|
||||||
|
_SEH_HANDLE
|
||||||
|
{
|
||||||
|
ret = RpcStatusToCmStatus(RpcExceptionCode());
|
||||||
|
}
|
||||||
|
_SEH_END;
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -3016,6 +3333,7 @@ CONFIGRET WINAPI CM_Request_Eject_PC_Ex(
|
||||||
HMACHINE hMachine)
|
HMACHINE hMachine)
|
||||||
{
|
{
|
||||||
RPC_BINDING_HANDLE BindingHandle = NULL;
|
RPC_BINDING_HANDLE BindingHandle = NULL;
|
||||||
|
CONFIGRET ret;
|
||||||
|
|
||||||
TRACE("%lx\n", hMachine);
|
TRACE("%lx\n", hMachine);
|
||||||
|
|
||||||
|
@ -3031,7 +3349,17 @@ CONFIGRET WINAPI CM_Request_Eject_PC_Ex(
|
||||||
return CR_FAILURE;
|
return CR_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
return PNP_RequestEjectPC(BindingHandle);
|
_SEH_TRY
|
||||||
|
{
|
||||||
|
ret = PNP_RequestEjectPC(BindingHandle);
|
||||||
|
}
|
||||||
|
_SEH_HANDLE
|
||||||
|
{
|
||||||
|
ret = RpcStatusToCmStatus(RpcExceptionCode());
|
||||||
|
}
|
||||||
|
_SEH_END;
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -3053,6 +3381,7 @@ CONFIGRET WINAPI CM_Run_Detection_Ex(
|
||||||
ULONG ulFlags, HMACHINE hMachine)
|
ULONG ulFlags, HMACHINE hMachine)
|
||||||
{
|
{
|
||||||
RPC_BINDING_HANDLE BindingHandle = NULL;
|
RPC_BINDING_HANDLE BindingHandle = NULL;
|
||||||
|
CONFIGRET ret;
|
||||||
|
|
||||||
TRACE("%lx %lx\n", ulFlags, hMachine);
|
TRACE("%lx %lx\n", ulFlags, hMachine);
|
||||||
|
|
||||||
|
@ -3074,8 +3403,18 @@ CONFIGRET WINAPI CM_Run_Detection_Ex(
|
||||||
return CR_FAILURE;
|
return CR_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
return PNP_RunDetection(BindingHandle,
|
_SEH_TRY
|
||||||
|
{
|
||||||
|
ret = PNP_RunDetection(BindingHandle,
|
||||||
ulFlags);
|
ulFlags);
|
||||||
|
}
|
||||||
|
_SEH_HANDLE
|
||||||
|
{
|
||||||
|
ret = RpcStatusToCmStatus(RpcExceptionCode());
|
||||||
|
}
|
||||||
|
_SEH_END;
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -3099,6 +3438,7 @@ CONFIGRET WINAPI CM_Set_DevNode_Problem_Ex(
|
||||||
RPC_BINDING_HANDLE BindingHandle = NULL;
|
RPC_BINDING_HANDLE BindingHandle = NULL;
|
||||||
HSTRING_TABLE StringTable = NULL;
|
HSTRING_TABLE StringTable = NULL;
|
||||||
LPWSTR lpDevInst;
|
LPWSTR lpDevInst;
|
||||||
|
CONFIGRET ret;
|
||||||
|
|
||||||
TRACE("%lx %lx %lx %lx\n", dnDevInst, ulProblem, ulFlags, hMachine);
|
TRACE("%lx %lx %lx %lx\n", dnDevInst, ulProblem, ulFlags, hMachine);
|
||||||
|
|
||||||
|
@ -3128,10 +3468,20 @@ CONFIGRET WINAPI CM_Set_DevNode_Problem_Ex(
|
||||||
if (lpDevInst == NULL)
|
if (lpDevInst == NULL)
|
||||||
return CR_INVALID_DEVNODE;
|
return CR_INVALID_DEVNODE;
|
||||||
|
|
||||||
return PNP_SetDeviceProblem(BindingHandle,
|
_SEH_TRY
|
||||||
|
{
|
||||||
|
ret = PNP_SetDeviceProblem(BindingHandle,
|
||||||
lpDevInst,
|
lpDevInst,
|
||||||
ulProblem,
|
ulProblem,
|
||||||
ulFlags);
|
ulFlags);
|
||||||
|
}
|
||||||
|
_SEH_HANDLE
|
||||||
|
{
|
||||||
|
ret = RpcStatusToCmStatus(RpcExceptionCode());
|
||||||
|
}
|
||||||
|
_SEH_END;
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -3309,6 +3659,7 @@ CONFIGRET WINAPI CM_Set_DevNode_Registry_Property_ExW(
|
||||||
HSTRING_TABLE StringTable = NULL;
|
HSTRING_TABLE StringTable = NULL;
|
||||||
LPWSTR lpDevInst;
|
LPWSTR lpDevInst;
|
||||||
ULONG ulType;
|
ULONG ulType;
|
||||||
|
CONFIGRET ret;
|
||||||
|
|
||||||
TRACE("%lx %lu %p %lx %lx %lx\n",
|
TRACE("%lx %lu %p %lx %lx %lx\n",
|
||||||
dnDevInst, ulProperty, Buffer, ulLength, ulFlags, hMachine);
|
dnDevInst, ulProperty, Buffer, ulLength, ulFlags, hMachine);
|
||||||
|
@ -3403,13 +3754,23 @@ CONFIGRET WINAPI CM_Set_DevNode_Registry_Property_ExW(
|
||||||
return CR_INVALID_PROPERTY;
|
return CR_INVALID_PROPERTY;
|
||||||
}
|
}
|
||||||
|
|
||||||
return PNP_SetDeviceRegProp(BindingHandle,
|
_SEH_TRY
|
||||||
|
{
|
||||||
|
ret = PNP_SetDeviceRegProp(BindingHandle,
|
||||||
lpDevInst,
|
lpDevInst,
|
||||||
ulProperty,
|
ulProperty,
|
||||||
ulType,
|
ulType,
|
||||||
(BYTE *)Buffer,
|
(BYTE *)Buffer,
|
||||||
ulLength,
|
ulLength,
|
||||||
ulFlags);
|
ulFlags);
|
||||||
|
}
|
||||||
|
_SEH_HANDLE
|
||||||
|
{
|
||||||
|
ret = RpcStatusToCmStatus(RpcExceptionCode());
|
||||||
|
}
|
||||||
|
_SEH_END;
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -3478,6 +3839,7 @@ CONFIGRET WINAPI CM_Set_HW_Prof_Flags_ExW(
|
||||||
ULONG ulFlags, HMACHINE hMachine)
|
ULONG ulFlags, HMACHINE hMachine)
|
||||||
{
|
{
|
||||||
RPC_BINDING_HANDLE BindingHandle = NULL;
|
RPC_BINDING_HANDLE BindingHandle = NULL;
|
||||||
|
CONFIGRET ret;
|
||||||
|
|
||||||
FIXME("%s %lu %lu %lx %lx\n", debugstr_w(szDevInstName),
|
FIXME("%s %lu %lu %lx %lx\n", debugstr_w(szDevInstName),
|
||||||
ulConfig, ulValue, ulFlags, hMachine);
|
ulConfig, ulValue, ulFlags, hMachine);
|
||||||
|
@ -3502,8 +3864,18 @@ CONFIGRET WINAPI CM_Set_HW_Prof_Flags_ExW(
|
||||||
return CR_FAILURE;
|
return CR_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
return PNP_HwProfFlags(BindingHandle, PNP_SET_HWPROFFLAGS, szDevInstName,
|
_SEH_TRY
|
||||||
|
{
|
||||||
|
ret = PNP_HwProfFlags(BindingHandle, PNP_SET_HWPROFFLAGS, szDevInstName,
|
||||||
ulConfig, &ulValue, NULL, NULL, 0, 0);
|
ulConfig, &ulValue, NULL, NULL, 0, 0);
|
||||||
|
}
|
||||||
|
_SEH_HANDLE
|
||||||
|
{
|
||||||
|
ret = RpcStatusToCmStatus(RpcExceptionCode());
|
||||||
|
}
|
||||||
|
_SEH_END;
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -3527,6 +3899,7 @@ CONFIGRET WINAPI CM_Setup_DevNode_Ex(
|
||||||
RPC_BINDING_HANDLE BindingHandle = NULL;
|
RPC_BINDING_HANDLE BindingHandle = NULL;
|
||||||
HSTRING_TABLE StringTable = NULL;
|
HSTRING_TABLE StringTable = NULL;
|
||||||
LPWSTR lpDevInst;
|
LPWSTR lpDevInst;
|
||||||
|
CONFIGRET ret;
|
||||||
|
|
||||||
FIXME("%lx %lx %lx\n", dnDevInst, ulFlags, hMachine);
|
FIXME("%lx %lx %lx\n", dnDevInst, ulFlags, hMachine);
|
||||||
|
|
||||||
|
@ -3559,11 +3932,21 @@ CONFIGRET WINAPI CM_Setup_DevNode_Ex(
|
||||||
if (lpDevInst == NULL)
|
if (lpDevInst == NULL)
|
||||||
return CR_INVALID_DEVNODE;
|
return CR_INVALID_DEVNODE;
|
||||||
|
|
||||||
return PNP_DeviceInstanceAction(BindingHandle,
|
_SEH_TRY
|
||||||
|
{
|
||||||
|
ret = PNP_DeviceInstanceAction(BindingHandle,
|
||||||
3,
|
3,
|
||||||
ulFlags,
|
ulFlags,
|
||||||
lpDevInst,
|
lpDevInst,
|
||||||
NULL);
|
NULL);
|
||||||
|
}
|
||||||
|
_SEH_HANDLE
|
||||||
|
{
|
||||||
|
ret = RpcStatusToCmStatus(RpcExceptionCode());
|
||||||
|
}
|
||||||
|
_SEH_END;
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -3587,6 +3970,7 @@ CONFIGRET WINAPI CM_Uninstall_DevNode_Ex(
|
||||||
RPC_BINDING_HANDLE BindingHandle = NULL;
|
RPC_BINDING_HANDLE BindingHandle = NULL;
|
||||||
HSTRING_TABLE StringTable = NULL;
|
HSTRING_TABLE StringTable = NULL;
|
||||||
LPWSTR lpDevInst;
|
LPWSTR lpDevInst;
|
||||||
|
CONFIGRET ret;
|
||||||
|
|
||||||
TRACE("%lx %lx %lx\n", dnPhantom, ulFlags, hMachine);
|
TRACE("%lx %lx %lx\n", dnPhantom, ulFlags, hMachine);
|
||||||
|
|
||||||
|
@ -3616,7 +4000,17 @@ CONFIGRET WINAPI CM_Uninstall_DevNode_Ex(
|
||||||
if (lpDevInst == NULL)
|
if (lpDevInst == NULL)
|
||||||
return CR_INVALID_DEVNODE;
|
return CR_INVALID_DEVNODE;
|
||||||
|
|
||||||
return PNP_UninstallDevInst(BindingHandle,
|
_SEH_TRY
|
||||||
|
{
|
||||||
|
ret = PNP_UninstallDevInst(BindingHandle,
|
||||||
lpDevInst,
|
lpDevInst,
|
||||||
ulFlags);
|
ulFlags);
|
||||||
|
}
|
||||||
|
_SEH_HANDLE
|
||||||
|
{
|
||||||
|
ret = RpcStatusToCmStatus(RpcExceptionCode());
|
||||||
|
}
|
||||||
|
_SEH_END;
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue