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


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


Parameter Description Type
pDest Pointer to where the source string is to be written in the destination object. Pointer
cbDest The size of the remaining space in the destination object. Integer
ppEnd Pointer 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
pcbStringV Pointer to a DWORD. On returning this DWORD will contain the size of the source string in bytes. Pointer
pSource Pointer 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 value Description
S_OK The function succeeded.
E_FAIL The function failed.



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.


See Also