Compartir a través de


IOCTL_UNIT_ALLOCATE_LOCAL_PLUG (Windows CE 5.0)

Send Feedback

This IOCTL permits the caller to allocate and export a local plug. 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_ALLOCATE_LOCAL_PLUG. 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_AllocateLocalPlug_Request structure. The ualp_RegistrationToken, ualp_Direction, ualp_MediaType, ualp_MaximumThroughput, ualp_ClusterDimension, and ualp_SampleFrequencymembers must be pre-initialized.
  • BufferSize
    [in] Set to sizeof(UNIT_AllocateLocalPlug_Request).
  • lpOutBuffer
    [out] This field should be set to point to a UNIT_AllocateLocalPlug_Response structure. After the UNIT_AllocateLocalPlug_Response structure completes successfully, it modifies the ualp_PlugNumber, and ualp_Plug fields.
  • nOutBufferSize
    [out] This field should be set to at least sizeof(UNIT_AllocateLocalPlug_Response).
  • 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 obtain extended error information, call GetLastError.

Remarks

Each unit has a limited number of serial bus plugs. Serial Bus Plugs are relative to the unit, not the subunit. A subunit can have its own conceptual plugs. Any plug that needs to be visible externally, that is, from another node on the bus, needs to be allocated.

Requirements

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

See Also

CreateFile | DeviceIoControl | UNIT_AllocateLocalPlug_Request | UNIT_AllocateLocalPlug_Response

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.