# SimConnect_InsertString The **SimConnect\_InsertString** function is used to assist in adding variable length strings to a structure.   ##### Syntax ``` cpp HRESULT SimConnect_InsertString( char* pDest, DWORD cbDest, void** ppEnd, DWORD* pcbStringV, const char* pSource ); ```   ##### Parameters {{< table-wrapper >}} | 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 | {{< /table-wrapper >}}   ##### Return Values The function returns an **HRESULT**. Possible values include, but are not limited to, those in the following table. {{< table-wrapper >}} | Return value | Description | |--------------|-------------------------| | S\_OK | The function succeeded. | | E\_FAIL | The function failed. | {{< /table-wrapper >}}   ##### 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](simconnect-retrievestring/) function.