RPMLoadAlternateDriverForDevice routine

The RPMLoadAlternateDriverForDevice routine loads the caller-specified alternate registered driver for a device that is connected on a particular hub and connection index.

Syntax

NTSTATUS RPMLoadAlternateDriverForDevice(
  _In_     HANDLE  RegisteredDriver,
  _In_     ULONG64 HubId,
  _In_     ULONG   ConnectionIndex,
  _In_opt_ REFGUID OwnerGuid
);

Parameters

  • RegisteredDriver [in]
    A handle to a registered driver to be loaded for the device. This handle is returned by a call to the RPMRegisterAlternateDriver routine.

  • HubId [in]
    A unique identifier for the hub to which the device is connected.

  • ConnectionIndex [in]
    The connection index on which the device is connected.

  • OwnerGuid [in, optional]
    The caller may pass NULL.

Return value

Other appropriate error status values may also be returned.

Return code Description
STATUS_SUCCESS

The alternate driver has been loaded successfully.

STATUS_UNSUCCESSFUL

The alternate driver has not been loaded as an invalid handle or hub ID was passed.

STATUS_ACCESS_DENIED

The security policies do not permit an alternate driver to be loaded.

STATUS_DEVICE_ALREADY_ATTACHED

The device for which an attempt is being made to load an alternate driver is already being used by another client of this library.

 

Requirements

Target platform

Desktop

Version

Available only in Windows 7.

Header

Usbrpmif.h (include Usbrpmif.h)

Library

Usbrpm.lib

IRQL

PASSIVE_LEVEL

See also

RPMRegisterAlternateDriver

 

 

Send comments about this topic to Microsoft