An interesting add on.
MSFS - Solved: Where is simconnect.h? | FSDeveloper
I wonder if this is the same SimConnect.h
Sample: SimConnect.h (prepar3d.com)
Which links back to this Lockheed Martin Environment Sim.
Prepar3D Product Overview – Prepar3D
Is this Prepar3D one and the same Flight Simulator?
This looks like its a pertinent structure to watch for input and it suggests there might be quite a few of them.
struct SIMCONNECT_RECV_SIMOBJECT_DATA : public SIMCONNECT_RECV // when dwID == SIMCONNECT_RECV_ID_SIMOBJECT_DATA { DWORD dwRequestID; DWORD dwObjectID; DWORD dwDefineID; DWORD dwFlags; // SIMCONNECT_DATA_REQUEST_FLAG DWORD dwentrynumber; // if multiple objects returned, this is number <entrynumber> out of <outof>. DWORD dwoutof; // note: starts with 1, not 0. DWORD dwDefineCount; // data count (number of datums, *not* byte count) DWORD dwData; // data begins here, dwDefineCount data items };
I assume the below would be found after running the dll through the libmaker, to create a Lib file?
> SIMCONNECTAPI SimConnect_RetrieveString(SIMCONNECT_RECV * pData, DWORD cbData, void * pStringV, char ** pszString, DWORD * pcbString);
> SIMCONNECTAPI SimConnect_GetLastSentPacketID(HANDLE hSimConnect, DWORD * pdwError);
> SIMCONNECTAPI SimConnect_CallDispatch(HANDLE hSimConnect, DispatchProc pfcnDispatch, void * pContext);
> SIMCONNECTAPI SimConnect_GetNextDispatch(HANDLE hSimConnect, SIMCONNECT_RECV ** ppData, DWORD * pcbData);
> SIMCONNECTAPI SimConnect_RequestResponseTimes(HANDLE hSimConnect, DWORD nCount, float * fElapsedSeconds);
> SIMCONNECTAPI SimConnect_InsertString(BYTE * pDest, DWORD cbDest, BYTE ** ppEnd, DWORD * pcbStringV, const char * pSource);
> SIMCONNECTAPI SimConnect_Open(HANDLE * phSimConnect, LPCSTR szName, HWND hWnd, DWORD UserEventWin32, HANDLE hEventHandle, DWORD ConfigIndex);
> SIMCONNECTAPI SimConnect_Close(HANDLE hSimConnect);
So then it becomes a case of match the MS Data Types to Clarion Data Types
[ Windows Data Types (BaseTsd.h) - Win32 apps | Microsoft Docs
If you need more info, sometimes looking in the WinDef.h can give more info on a MS Data Type and then marry up to a Clarion data Type. You can get WinDef.h from downloading and installing the latest copy of the free version of VisualStudio unless you have your own already. I find VS search facility quite good for looking up info which is lacking in the online Web API’s like these.
API Index - Win32 apps | Microsoft Docs
Windows API index - Win32 apps | Microsoft Docs
Things I usually find using Visual studio are the data structures and the enumerates which are like clarion equates.
Where the MS Data Types & WinDef.h are both lacking in info, sometimes you can get the info from looking at other defined data types, this Visual Basic example also conveys info more suited to a database and Clarion is a database tool.
Data type summary | Microsoft Docs
So eventually you would have in your MAP structure something which looks like this:
SIMCONNECTAPI SimConnect_GetLastSentPacketID(HANDLE hSimConnect, DWORD * pdwError);
becomes in Clarion
MAP
SimConnect_GetLastSentPacketID( long hSimConnect, long pdwError )
End
Both Flight Sim and the Prepar3d look interesting. I wonder if the Military are going to open up their flight sims for others to go head to head, like EA, NeedForSpeed and others do with online competitions.
Sorry about the formatting, it seems somewhat variable as to what it chooses to do.