IOCTL_UNIT_DISCONNECTION_REQUEST_PROCESSED (Windows CE 5.0)
This IOCTL permits a subunit to notify the unit driver that it has completed processing a previous UNIT_DisconnectFromRemotePlugCB request. The DeviceIoControl function calls this IOCTL.
Parameters
- hDevice
[in] Handle to the target object. To get a device handle, call the CreateFile function with a name obtained dynamically from the SetupDiEnumDeviceInterfaces function. - dwIoControlCode
[in] Set to IOCTL_UNIT_DISCONNECTION_REQUEST_PROCESSED. This value identifies the target operation and the type of device on which to perform it. - lpInBuffer
[in] Must be completed with a properly initialized UNIT_ConnectionRequestProcessed_Request structure. The ucrp_RegistrationToken, ucrp_Request, and ucrp_Status members must be pre-initialized. - BufferSize
[in] Set to sizeof(UNIT_ConnectionRequestProcessed_Request). - lpOutBuffer
[in] Unused. Must be set to NULL. - nOutBufferSize
[in] Unused. Must be set to 0. - lpBytesReturned
[out] Pointer to a DWORD variable that receives the actual count of bytes returned by the function in the output buffer. - lpOverlapped
[out] If not used, NULL. Otherwise, this should point to a completely filled out OVERLAPPED structure that contains a valid event. The event will be signaled when the I/O operation is complete.
Return Values
If the operation succeeds, DeviceIoControl returns a non-zero value. If the operation fails, DeviceIoControl returns zero. To get extended error information, call GetLastError.
If a non-trivial amount of time has passed between the UNIT_DisconnectFromRemotePlugCB call and this command being received, the unit driver might have timed out and eventually completed the original AV/C request with an error.
If this is the case, you will receive an error from your command, as no reference will exist any longer for your request.
Remarks
This command is provided to give virtual subunits the ability to return STATUS_PENDING to a UNIT_DisconnectFromRemotePlugCB call and then asynchronously complete the action later.
This is a time-critical command. Process and complete this disconnection request as quickly as possible. The unit driver has an internal timer associated with these requests to cancel them if they are outstanding for any significant length of time, seconds.
Requirements
OS Versions: Windows CE .NET 4.0 and later.
Header: Avc_unit.h.
See Also
CreateFile | DeviceIoControl | UNIT_ConnectionRequestProcessed_Request | UNIT_DisconnectFromRemotePlugCB
Send Feedback on this topic to the authors