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 code | Description |
---|---|
|
The registration was successful. |
|
More than eight clients are registered. At least one client must be unregistered before this routine is called. |
|
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 |
|
Library |
|
IRQL | PASSIVE_LEVEL |
See also
Send comments about this topic to Microsoft
Build date: 12/5/2013