mirror of
https://github.com/reactos/reactos.git
synced 2025-07-31 10:01:43 +00:00
[UMPNPMGR][NDK] Implement PNP_GetInterfaceDeviceAlias
This commit is contained in:
parent
26368a1ead
commit
44d99fa60f
2 changed files with 42 additions and 2 deletions
|
@ -2638,8 +2638,39 @@ PNP_GetInterfaceDeviceAlias(
|
|||
PNP_RPC_STRING_LEN *pulTransferLen,
|
||||
DWORD ulFlags)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
return CR_CALL_NOT_IMPLEMENTED;
|
||||
NTSTATUS Status;
|
||||
PLUGPLAY_CONTROL_INTERFACE_ALIAS_DATA PlugPlayData;
|
||||
DWORD ret = CR_SUCCESS;
|
||||
|
||||
UNREFERENCED_PARAMETER(hBinding);
|
||||
|
||||
DPRINT("PNP_GetInterfaceDeviceAlias(%p %S %p %p %p %p 0x%08lx)\n",
|
||||
hBinding, pszInterfaceDevice, AliasInterfaceGuid, pszAliasInterfaceDevice, pulLength,
|
||||
pulTransferLen, ulFlags);
|
||||
|
||||
if ((AliasInterfaceGuid == NULL) ||
|
||||
(pulLength == NULL))
|
||||
return CR_INVALID_POINTER;
|
||||
|
||||
if (ulFlags != 0)
|
||||
return CR_INVALID_FLAG;
|
||||
|
||||
Status = NtPlugPlayControl(PlugPlayControlGetInterfaceDeviceAlias,
|
||||
&PlugPlayData,
|
||||
sizeof(PLUGPLAY_CONTROL_INTERFACE_ALIAS_DATA));
|
||||
if (NT_SUCCESS(Status))
|
||||
{
|
||||
*pulLength = PlugPlayData.AliasSymbolicLinkNameLength;
|
||||
*pulTransferLen = *pulLength + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
*pulLength = 0;
|
||||
ret = NtStatusToCrError(Status);
|
||||
}
|
||||
|
||||
DPRINT("PNP_GetInterfaceDeviceAlias() done (returns %lx)\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -519,6 +519,15 @@ typedef struct _PLUGPLAY_CONTROL_RELATED_DEVICE_DATA
|
|||
ULONG RelatedDeviceInstanceLength;
|
||||
} PLUGPLAY_CONTROL_RELATED_DEVICE_DATA, *PPLUGPLAY_CONTROL_RELATED_DEVICE_DATA;
|
||||
|
||||
// PlugPlayControlGetInterfaceDeviceAlias (0x0D)
|
||||
typedef struct _PLUGPLAY_CONTROL_INTERFACE_ALIAS_DATA
|
||||
{
|
||||
UNICODE_STRING SymbolicLinkName;
|
||||
GUID *AliasInterfaceClassGuid;
|
||||
PWCHAR AliasSymbolicLinkName;
|
||||
ULONG AliasSymbolicLinkNameLength;
|
||||
} PLUGPLAY_CONTROL_INTERFACE_ALIAS_DATA, *PPLUGPLAY_CONTROL_INTERFACE_ALIAS_DATA;
|
||||
|
||||
// PlugPlayControlDeviceStatus (0x0E)
|
||||
typedef struct _PLUGPLAY_CONTOL_STATUS_DATA
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue