Export (0) Print
Expand All
Expand Minimize

RPMRegisterAlternateDriver routine

The RPMRegisterAlternateDriver routine enables a client application to register itself in order to perform driver redirection operations for a USB device.

Syntax


NTSTATUS RPMRegisterAlternateDriver(
  _In_   PDRIVER_OBJECT DriverObject,
  _In_   LPCWSTR CompatibleId,
  _Out_  PHANDLE RegisteredDriver
);

Parameters

DriverObject [in]

A pointer to the caller's driver object. To ensure that the driver remains loaded while it is registered, this routine increments the reference count on DriverObject. The reference count is decremented when the registration is removed.

CompatibleId [in]

The compatible ID of the alternate driver that is loaded. This contains a device identification string that matches with what is found in the alternate driver's INF file.

RegisteredDriver [out]

A handle returned by this call that identifies the registration. This handle is used to specify the client driver in the subsequent calls to the RPM routines.

Return value

RPMRegisterAlternateDriver returns one of the following values:

Return codeDescription
STATUS_SUCCESS

The registration was successful.

STATUS_UNSUCCESSFUL

More than eight clients are registered. At least one client must be unregistered before this routine is called.

STATUS_INVALID_PARAMETER

One of the parameters passed is NULL.

 

Remarks

This is the first RPM routine that clients are expected to call, and the handle that is returned from this routine should be used in subsequent calls to RPM routines.

Requirements

Version

Available only in Windows 7.

Header

Usbrpmif.h (include Usbrpmif.h)

Library

Usbrpm.lib

IRQL

PASSIVE_LEVEL

See also

RPMUnregisterAlternateDriver
USB Device Redirection Routines

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft