Freigeben über


IOCTL_UNIT_CONNECTION_REQUEST_PROCESSED (Windows CE 5.0)

Send Feedback

This IOCTL permits a subunit to notify the unit driver that it has completed processing a previous UNIT_ConnectToRemotePlugCB 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_CONNECTION_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 large amount of time has passed between the UNIT_ConnectToRemotePlugCB 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_ConnectToRemotePlugCB call and then asynchronously complete the action later.

This is a time-critical command. Process and complete this connection process 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.

If you immediately return a status code to this callback of something other than STATUS_SUCCESS or STATUS_PENDING, you do not need to issue IOCTL_UNIT_DEREFERENCE_CONNECTION_PLUG because it is issued automatically.

If you return STATUS_SUCCESS or STATUS_PENDING, you will eventually need to issue IOCTL_UNIT_DEREFERENCE_CONNECTION_PLUG.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: Avc_unit.h.

See Also

DeviceIoControl | IOCTL_UNIT_DEREFERENCE_CONNECTION_PLUG | UNIT_ConnectToRemotePlugCB | UNIT_ConnectionRequestProcessed_Request

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.