mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 18:25:58 +00:00
[UMPNPMGR] Implement PNP_RegisterDeviceClassAssociation
This commit is contained in:
parent
4164b8a053
commit
f1332c7722
1 changed files with 44 additions and 2 deletions
|
@ -2788,8 +2788,50 @@ PNP_RegisterDeviceClassAssociation(
|
||||||
PNP_RPC_STRING_LEN *pulTransferLen,
|
PNP_RPC_STRING_LEN *pulTransferLen,
|
||||||
DWORD ulFlags)
|
DWORD ulFlags)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
PLUGPLAY_CONTROL_CLASS_ASSOCIATION_DATA PlugPlayData;
|
||||||
return CR_CALL_NOT_IMPLEMENTED;
|
NTSTATUS Status;
|
||||||
|
CONFIGRET ret = CR_SUCCESS;
|
||||||
|
|
||||||
|
UNREFERENCED_PARAMETER(hBinding);
|
||||||
|
|
||||||
|
DPRINT1("PNP_RegisterDeviceClassAssociation(%p %S %p %S %S %p %p 0x%08lx)\n",
|
||||||
|
hBinding, pszDeviceID, InterfaceGuid, pszReference, pszSymLink,
|
||||||
|
pulLength, pulTransferLen, ulFlags);
|
||||||
|
|
||||||
|
if ((InterfaceGuid == NULL) ||
|
||||||
|
(pszSymLink == NULL) ||
|
||||||
|
(pulLength == NULL) ||
|
||||||
|
(pulTransferLen == NULL))
|
||||||
|
return CR_INVALID_POINTER;
|
||||||
|
|
||||||
|
if (ulFlags != 0)
|
||||||
|
return CR_INVALID_FLAG;
|
||||||
|
|
||||||
|
if (!IsValidDeviceInstanceID(pszDeviceID))
|
||||||
|
return CR_INVALID_DEVINST;
|
||||||
|
|
||||||
|
RtlInitUnicodeString(&PlugPlayData.DeviceInstance, pszDeviceID);
|
||||||
|
PlugPlayData.InterfaceGuid = InterfaceGuid;
|
||||||
|
RtlInitUnicodeString(&PlugPlayData.Reference, pszReference);
|
||||||
|
PlugPlayData.Register = TRUE;
|
||||||
|
PlugPlayData.SymbolicLinkName = pszSymLink;
|
||||||
|
PlugPlayData.SymbolicLinkNameLength = *pulLength;
|
||||||
|
|
||||||
|
Status = NtPlugPlayControl(PlugPlayControlDeviceClassAssociation,
|
||||||
|
&PlugPlayData,
|
||||||
|
sizeof(PLUGPLAY_CONTROL_CLASS_ASSOCIATION_DATA));
|
||||||
|
if (NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
|
*pulLength = PlugPlayData.SymbolicLinkNameLength;
|
||||||
|
*pulTransferLen = *pulLength;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
*pulLength = 0;
|
||||||
|
ret = NtStatusToCrError(Status);
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue