Freigeben über


UNIT_AllocateLocalPlugCB (Windows CE 5.0)

Send Feedback

This function must be provided by the subunit driver. The unit filter driver calls this function when an outside node has requested that a subunit allocate and connect itself to a local serial bus plug.

NTSTATUS (*UNIT_AllocateLocalPlugCB)(PVOID Context, ULONG SubunitPlugID,ULONG Direction,UNIT_MediaType MediaType,ULONG MaximumThroughput,ULONG* PlugNumber,HANDLE* Plug);

Parameters

  • Context
    [in] Opaque value that the subunit driver provided when utilizing the UNIT_CMD_REGISTER_SUBUNIT command from the subunit.
  • SubunitPlugID
    [in] Defines the subunit-specific plug identifier. This is not to be confused with a unit or serial bus plug. This differentiates between different Subunit plugs. STREAM_SUBUNIT_PLUG_ID_Any can be used to indicate that any available subunit plug be utilized.
  • Direction
    [in] Defines whether the subunit intends to utilize the plug as an input plug, UNIT_PLUG_Direction_Input, or an output plug, UNIT_PLUG_Direction_Output.
  • MediaType
    [in] Defines the digital media type that the subunit can receive, for an input plug, or transmit, for an output plug. Must be from the STREAM_MediaType enumeration.
  • MaximumThroughput
    [in] Maximum number of bits that this plug should ever attempt to transmit per second. This applies to output plugs only, and can be ignored for input plugs. If this value is 0 and the plug is an output plug, the subunit driver should determine what the appropriate maximum throughput value is to use.
  • PlugNumber
    [out] This parameter should be completed after the function finishes successfully with the plug number allocated. If successful, the subunit should complete the ULONG pointed to by this argument with the number of the serial bus plug to which it is connected.
  • Plug
    [out] This parameter should be completes after the function successfully finishes with the handle of the plug allocated. If successful, the subunit should complete the HANDLE pointed to by this argument with the plug handle of the serial bus plug that was allocated.

Return Values

If the operation was successful, the subunit returns STATUS_SUCCESS. Otherwise, an appropriate error code should be returned. Any error code will cause the request from the external device to be rejected.

Remarks

This function is provided to permit the system to be able to process incoming CONNECT_AV unit commands. These commands are directed at the unit, but can refer to individual subunits. When that is the case, the subunit must be responsible for acting, and this callback is provided for that instance.

Requirements

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

See Also

STREAM_MediaType | UNIT_FreeLocalPlugCB

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.