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”.
Hey Boris,
What SDK version will this be in? Maybe even better; where can I find a mapping between SUs and SDK versions?
In SIMCONNECT_RECV_OPEN we get versions (major, minor, and build) for the “application” (I presume the simulator) and “SimConnect”, but it is unclear to me how this corresponds to Simulator versions, Service Updates, and SDK versions.
You should have the fix in the lastest SU3 sdk documentation version.
About the version number, MSFS24 is version 12x.x.x and MSFS2020 11.x.x.x
For minor and build number, it changes when we update the SimConnect API.
For SDK versions, SU3 is 1.4.5
SU4 will be 1.5.x and so on..
Ok, I downloaded that, but is still states the values are both zero.
Went to the file on disk to make doubly sure:
<tr>
<td><code class="inline">dwSendID</code></td>
<td>
<p>The ID of the packet that contained the error, see Remarks below.</p>
<p>Special case: <code class="inline">UNKNOWN_SENDID = 0</code>.</p>
<p>Note that if this special case is returned, there has been an <em>internal</em> problem.</p>
</td>
</tr>
<tr>
<td><code class="inline">dwIndex</code></td>
<td>
<p>The index number (starting at 1) of the first parameter that caused an error.</p>
<p>Special case: <code class="inline">UNKNOWN_INDEX = 0</code>.</p>
</td>
</tr>
@Boris Could you provide me with an overview of SU vs SimConnect reported simulator/simconnect version & build vs SDK version? Today I downloaded MSFS 2024 SDK version 1.6.6 and it is still showing “UNKNOWN_INDEX = 0” .
My issue is about the documentation, the SimConnect.h header file was always as you state. In the documentation, file /Documentation/html/6_Programming_APIs/SimConnect/API_Reference/Structures_And_Enumerations/SIMCONNECT_RECV_EXCEPTION.htm, it states:
dwSendID | The ID of the packet that contained the error, see Remarks below. Special case: UNKNOWN_SENDID = 0. Note that if this special case is returned, there has been an internal problem. dwIndex | The index number (starting at 1) of the first parameter that caused an error. Special case: UNKNOWN_INDEX = 0.
The documentation for UNKNOWN_INDEX is incorrect, as its value is not zero. Also, both UNKNOWN_SENDID and UNKNOWN_INDEX must always be prefixed with the struct’s name, so “SIMCONNECT_RECV_EXCEPTION::UNKNOWN_SENDID” and “SIMCONNECT_RECV_EXCEPTION::UNKNOWN_INDEX”, as they’re defined locally to that struct.
With respect to SU numbering: I don’t get SU numbers when I download the SDK, so “It is fixed in SU5” doesn’t help, because I don’t know which versions of the SDK belong to that particular Service Update. Updating the simulator also is pretty automatic, without it telling me “I am now updating to SU5”. Also, when I connect to the simulator using SimConnect, I get a message that contains version- and build-numbers, not SU numbers.