Freigeben über


NdisCopyFromPacketToPacket (Windows CE 5.0)

Send Feedback

This function copies a specified range of data from one packet to another.

VOID NdisCopyFromPacketToPacket(PNDIS_PACKETDestination,UINTDestinationOffset,UINTBytesToCopy,PNDIS_PACKETSource,UINTSourceOffset,PUINTBytesCopied);

Parameters

  • Destination
    [in] Pointer to the destination packet descriptor.
  • DestinationOffset
    [in] Specifies the byte offset within the destination packet at which to begin writing the copied data.
  • BytesToCopy
    [in] Specifies the number of bytes to copy.
  • Source
    [in] Pointer to the source packet descriptor.
  • SourceOffset
    [in] Specifies the byte offset within the source packet at which to begin copying the data.
  • BytesCopied
    [out] Pointer to the caller-supplied variable in which this function returns the number of bytes actually copied. This number can be less than the value of BytesToCopy if the source packet runs out of data or the destination packet runs out of space.

Return Values

None.

Remarks

The caller of this function allocates the destination packet, if not the source packet as well. The packet descriptor of the destination packet should have enough chained buffer descriptors to receive the data.

If the source packet runs out of data or the destination packet out of space before the specified number of bytes has been copied, the copy operation stops. In either case, this function returns the number of bytes successfully copied from the source to the destination packet.

This function does not copy any out-of-band information associated with the specified Source to the Destination. To copy this information, the driver can use pointers returned by NDIS_OOB_DATA_FROM_PACKET, and then call the NdisMoveMemory function.

The driver must release any spin lock that it is holding before calling this function.

Requirements

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

See Also

NdisAllocateBuffer | NdisAllocatePacket | NdisMoveMemory | NDIS_OOB_DATA_FROM_PACKET

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.