Compartir a través de


EditSession (Windows CE 5.0)

Send Feedback

This function replaces one range of bytes in a packet with another range of bytes.

NTSTATUS EditSession(PVOIDDataHandle,PIPRCVBUF RecvBuffer,ULONGOldDataOffset,ULONGOldDataLength,PUCHARNewData,ULONGNewDataLength)

Parameters

  • DataHandle
    [in] Handle to the per-packet context that was passed to the DataHandler function.
  • RecvBuffer
    [in] Pointer to an IPRcvBuf structure that specifies the received packet data, and that was passed to the DataHandler function.
  • OldDataOffset
    [in] Unsigned long integer that specifies the starting location within RecvBuffer of the range of bytes that you want to replace.
  • OldDataLength
    [in] Unsigned long integer that specifies the length of the range to be replaced.
  • NewData
    [in] Pointer to bytes that specify the data to use when replacing the old bytes.
  • NewDataLength
    [in] Unsigned long integer that specifies the number of bytes in the replacement data.

Return Values

STATUS_SUCCESS indicates success. A non-zero value indicates failure.

Remarks

The changes to the packet data specified when calling this function occur immediately in the buffer. For later actions, you should take into account that these changes alter the data and possibly the length for the packet.

This function makes the necessary adjustments to TCP sequence numbers if the replacement of data alters the size of a TCP segment. This function is called from within DataHandler function of the editor.

Requirements

OS Versions: Windows CE 3.0 and later.
Header: Natedit.h.
Link Library: Coredll.dll.

See Also

DataHandler | IPRcvBuf

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.