GetIsoPacketBuffer Method (packet)

LibUsbDotNet

LibUsbDotNet 2.2.8 GetIsoPacketBuffer Method (packet)
Library ReferenceMonoLibUsb.TransferMonoUsbTransferGetIsoPacketBuffer(Int32)
LibUsbDotNet on SourceForge
Convenience function to locate the position of an isochronous packet within the buffer of an isochronous transfer.
Declaration Syntax
C# Visual Basic Visual C++
public IntPtr GetIsoPacketBuffer(
	int packet
)
Public Function GetIsoPacketBuffer ( _
	packet As Integer _
) As IntPtr
public:
IntPtr GetIsoPacketBuffer(
	int packet
)
Parameters
packet (Int32)
The packet to return the address of.
Return Value
the base address of the packet buffer inside the transfer buffer.
Remarks

This is a thorough function which loops through all preceding packets, accumulating their lengths to find the position of the specified packet. Typically you will assign equal lengths to each packet in the transfer, and hence the above method is sub-optimal. You may wish to use GetIsoPacketBufferSimple(Int32) instead.

Note:GetIsoPacketBuffer(Int32) is roughly equivalent to libusb_get_iso_packet_buffer().
Exceptions
Exception Condition
ArgumentOutOfRangeException This exception is thrown if the packet requested is >= NumIsoPackets.

Assembly: LibUsbDotNet (Module: LibUsbDotNet) Version: 2.2.8.104 (2.2.8.104)