Version: 1.1.2
Frequency: Consistently
Severity: High
Marketplace package name: N/A
Context: MSFS 2024 SDK Documentation
Similar MSFS 2020 issue: N/A
Bug description: The documentation for SIMCONNECT_RECV_EXCEPTION
states that the dwIndex
field is set to 0
if the index is unknown. There is no indicated similar special value for the dwSendID
field. However, in SimConnect.h
we can find:
SIMCONNECT_REFSTRUCT SIMCONNECT_RECV_EXCEPTION : public SIMCONNECT_RECV // when dwID == SIMCONNECT_RECV_ID_EXCEPTION
{
DWORD dwException; // see SIMCONNECT_EXCEPTION
static const DWORD UNKNOWN_SENDID = 0;
DWORD dwSendID; // see SimConnect_GetLastSentPacketID
static const DWORD UNKNOWN_INDEX = DWORD_MAX;
DWORD dwIndex; // index of parameter that was source of error
};
A developer depending on the documentation rather than the special value, will check for the wrong value. Note also that there is no indication that the two special values need to be referred to using qualified names, as in “SIMCONNECT_RECV_EXCEPTION::UNKNOWN_SENDID
” and “SIMCONNECT_RECV_EXCEPTION::UNKNOWN_INDEX
”.
Repro steps: N/A
Attachments: N/A
Private attachments: N/A