3.1.1.11.2.8 NdrEncode

 procedure NdrEncode (
     pStructX : ADDRESS of struct X,
     pSerializedData : BYTE ARRAY,
     pDataLengthInBytes : ADDRESS OF ULONG)

This is a per-structure helper function that serializes a structure into an array of bytes using the NDR Type Serialization engine, as specified in [MS-RPCE] section 2.2.6. This function returns a null output buffer in case of errors.

pStructX: The address of a structure of some type (represented by "X") that needs to be serialized.

pSerializedData: A byte array of length pDataLengthInBytes that contains the output serialized data.

pDataLengthInBytes: The address of a ULONG that will contain the size of the output byte array.

Return Values: This procedure does not return a value.