次の方法で共有


PFN_ENCODE (Compact 2013)

10/16/2014

This function is used to encapsulate data with a transport-specific header and a trailer block.

Syntax

typedef BOOL (* PFN_ENCODE) (
    LPBYTE pbFrame,
   USHORT cbData
);

Parameters

  • pbFrame
    [in] Pointer to a complete frame.
  • cbData
    [in] Count of the number of bytes that make up the data portion of the frame.

Return Value

Returns true if the encoding succeeds; otherwise, false.

Remarks

Given a frame and the size of the data, the OEM encodes the frame so it is suitable for the current transport. If required, the header and trailer block are determined by the OEM and the transport. You implement a function of this type and assign it to the pfnEncode member of the KITLTRANSPORT function during your Board Support Package (BSP) KITL initialization. For an example of the implementation of this function, see the KitlEthEncode function in %_WINCEROOT%\Platform\Common\Src\Common\Kitl\Kitleth.c. If you are using the common KITL library in conjunction with Ethernet or serial transport, this function is already implemented for you.

Requirements

Header

kitl.h

Library

Kitl.lib

See Also

Reference

Required KITL Functions
KITLTRANSPORT