Function sapnwrfc::binding::RfcSetTypeLength
[−]
[src]
pub unsafe extern "C" fn RfcSetTypeLength(
typeHandle: RFC_TYPE_DESC_HANDLE,
nucByteLength: c_uint,
ucByteLength: c_uint,
errorInfo: *mut RFC_ERROR_INFO
) -> RFC_RC
Sets the total byte length of the type description.
Before a type description can be used, this function needs to be called. The RFC library does not automatically calculate the correct length based on the fields that have been added, because this task is non-trivial and possibly platform dependend. (Especially if the structure contains sub-structures.)\n For integer and floating point types the correct alignments need to be taken into account (start address divisible by 4 or 8), fixed sub-structures are inlined, complex structures are referenced by an 8-byte pointer, etc. In general you will need to do a bit of trial and error, before you get it right.\n If you really need more details/tips for the process of hardcoding metadata, see this article.
\in typeHandle The type description. \in nucByteLength Total byte length of the structure in a non-Unicode system (1 byte per CHAR). \in ucByteLength Total byte length of the structure in a Unicode system (2 bytes per CHAR). \out *errorInfo The function returns an error, if the given byte lengths are smaller than the sum of all field lengths, or if the nucByteLength is smaller than the ucByteLength. \return RFC_RC