The SimConnect_InsertString function is used to assist in adding variable length strings to a structure.

 

Syntax
HRESULT SimConnect_InsertString(
    char*  pDest,
    DWORD  cbDest,
    void**  ppEnd,
    DWORD*  pcbStringV,
    const char*  pSource
    );

 

Parameters
ParameterDescriptionType
pDestPointer to where the source string is to be written in the destination object.Pointer
cbDestThe size of the remaining space in the destination object.Integer
ppEndPointer to a pointer, (usually a pointer to a char pointer). On return the pointer locates the end of the string in the structure, and hence the starting position for any other string to be included in the structure.Pointer
pcbStringVPointer to a DWORD. On returning this DWORD will contain the size of the source string in bytes.Pointer
pSourcePointer to the source string.Pointer

 

Return Values

The function returns an HRESULT. Possible values include, but are not limited to, those in the following table.

Return valueDescription
S_OKThe function succeeded.
E_FAILThe function failed.

 

Remarks

This function does not communicate with the SimConnect server, but is a helper function to assist in the handling of variable length strings. Its counterpart is the SimConnect_RetrieveString function.