I think it's possibly very poorly named. I'm also pretty sure it does not do what I need i.e. to pass a string (actually a GUID) using SimConnect. Here's the P3D SDK notes:
SimConnect_InsertString
The
SimConnect_InsertString function is used to assist in adding variable length narrow strings to a structure.
Syntax
HRESULT SimConnect_InsertString(
BYTE* pDest,
DWORD cbDest,
void** ppEnd,
DWORD* pcbStringV,
const char* pSource
);
Parameters
pDest [in] Pointer to where the source string is to be written in the destination
object. cbDest[in] The size of the remaining space in the destination object.
ppEnd[in,out] 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.
pcbStringV [in,out] Pointer to a DWORD. On returning this DWORD will contain the size of the source string in bytes.
pSource[in] Pointer to the source string.
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. |
Remarks
This function does not communicate with the SimConnect server [
my italics], but is a helper function to assist in the handling of variable length narrow strings. Its counterpart is the
SimConnect_RetrieveString function.