次の方法で共有


EditSession (Windows Embedded CE 6.0)

1/6/2010

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

Syntax

NTSTATUS EditSession( 
  PVOID DataHandle, 
  PIPRCVBUF RecvBuffer, 
  ULONG OldDataOffset, 
  ULONG OldDataLength, 
  PUCHAR NewData, 
  ULONG NewDataLength 
)

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 Value

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

Header natedit.h
Library coredll.dll
Windows Embedded CE Windows CE 3.0 and later

See Also

Reference

Network Address Translation Functions
DataHandler
IPRcvBuf