Expand Minimize

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 codeDescription
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

Version

Available only in Windows 7.

Header

Usbrpmif.h (include Usbrpmif.h)

Library

Contained in usbrpm.lib. Link with usbrpm.lib.

IRQL

PASSIVE_LEVEL

See also

RPMRegisterAlternateDriver
USB Device Redirection Routines

 

 

Send comments about this topic to Microsoft

Build date: 12/5/2013

Show:
© 2014 Microsoft. All rights reserved.