Compartir a través de


UNIT_DisconnectFromRemotePlugCB (Windows CE 5.0)

Send Feedback

This function is called by the unit filter driver when a request has arrived requesting that your subunit disconnect from a particular remote plug, which is one previously connected through UNIT_ConnectToRemotePlugCB.

NTSTATUS (*UNIT_DisconnectFromRemotePlugCB)(PVOID Context, HANDLE Plug,PVOID Request);

Parameters

  • Context
    [in] Opaque value that the subunit driver provided when utilizing the UNIT_CMD_REGISTER_SUBUNIT command.
  • Plug
    [in] HANDLE value of the remote plug to disconnect from. This will be the same handle presented in a previous UNIT_ConnectToRemotePlugCB call, and the subunit driver must determine which particular SESSION_ID to disconnect.
  • Request
    [in] Opaque value that the virtual subunit should save, to be passed into IOCTL_UNIT_DISCONNECTION_REQUEST_PROCESSED, if this callback request is not completed immediately.

Return Values

If the operation was successful, the subunit should return STATUS_SUCCESS.

If the virtual subunit could not complete processing on this request immediately, it can return STATUS_PENDING, in which case it must send down an IOCTL_UNIT_DISCONNECTION_REQUEST_PROCESSED later to permit the unit driver to complete the overall AV/C request.

Otherwise, an appropriate error code should be returned. Any error code will cause the request from the external device to be rejected.

Remarks

This call is the essential inverse of the UNIT_ConnectToRemotePlugCB call.

The subunit is not required to purely match UNIT_ConnectToRemotePlugCB calls with UNIT_DisconnectFromRemotePlugCB calls. The subunit may disconnect these connections whenever it chooses.

It is only during the process of disconnection, after it has successfully completed an IOCTL_STREAM_STOP_SESSION, whenever it chooses to disconnect, that the Subunit driver is required to issue an IOCTL_UNIT_DEREFERENCE_CONNECTION_PLUG request.

Requirements

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

See Also

IOCTL_UNIT_DEREFERENCE_CONNECTION_PLUG | IOCTL_UNIT_DISCONNECTION_REQUEST_PROCESSED | IOCTL_STREAM_STOP_SESSION | UNIT_ConnectToRemotePlugCB

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.