Didier
Les constantes se trouvent dans "windef.h"
HWND, HANDLE = system int
WCHAR = string unicode
mais windef.h est toujours inclus lors de l'initialisation, via les
#include
qui se trouvent en début de code.
Voici la liste complète de l'API SimConnect, qu'on peut encapsuler dans SIM.dll.
ExportC HRESULT Sim_MapClientEventToSimEvent(HANDLE hSimConnect, DWORD EventID, const char * EventName = "");
ExportC HRESULT Sim_TransmitClientEvent(HANDLE hSimConnect, DWORD ObjectID, DWORD EventID, DWORD dwData, DWORD GroupID, SIMCONNECT_EVENT_FLAG Flags);
ExportC HRESULT Sim_SetSystemEventState(HANDLE hSimConnect, DWORD EventID, DWORD dwState);
ExportC HRESULT Sim_AddClientEventToNotificationGroup(HANDLE hSimConnect, DWORD GroupID, DWORD EventID, BOOL bMaskable = FALSE);
ExportC HRESULT Sim_RemoveClientEvent(HANDLE hSimConnect, DWORD GroupID, DWORD EventID);
ExportC HRESULT Sim_SetNotificationGroupPriority(HANDLE hSimConnect, DWORD GroupID, DWORD uPriority);
ExportC HRESULT Sim_ClearNotificationGroup(HANDLE hSimConnect, DWORD GroupID);
ExportC HRESULT Sim_RequestNotificationGroup(HANDLE hSimConnect, DWORD GroupID, DWORD dwReserved = 0, DWORD Flags = 0);
ExportC HRESULT Sim_AddToDataDefinition(HANDLE hSimConnect, DWORD DefineID, const char * DatumName, const char * UnitsName, DWORD DatumType = DWORD_FLOAT64, float fEpsilon = 0, DWORD DatumID = SIMCONNECT_UNUSED);
ExportC HRESULT Sim_ClearDataDefinition(HANDLE hSimConnect, DWORD DefineID);
ExportC HRESULT Sim_RequestDataOnSimObject(HANDLE hSimConnect, DWORD RequestID, DWORD DefineID, DWORD ObjectID, DWORD Period, DWORD Flags = 0, DWORD origin = 0, DWORD interval = 0, DWORD limit = 0);
ExportC HRESULT Sim_RequestDataOnSimObjectType(HANDLE hSimConnect, DWORD RequestID, DWORD DefineID, DWORD dwRadiusMeters, SIMCONNECT_SIMOBJECT_TYPE type);
ExportC HRESULT Sim_SetDataOnSimObject(HANDLE hSimConnect, DWORD DefineID, DWORD ObjectID, DWORD Flags, DWORD ArrayCount, DWORD cbUnitSize, void * pDataSet);
ExportC HRESULT Sim_MapInputEventToClientEvent(HANDLE hSimConnect, DWORD GroupID, const char * szInputDefinition, DWORD DownEventID, DWORD DownValue = 0, DWORD UpEventID = (DWORD)SIMCONNECT_UNUSED, DWORD UpValue = 0, BOOL bMaskable = FALSE);
ExportC HRESULT Sim_SetInputGroupPriority(HANDLE hSimConnect, DWORD GroupID, DWORD uPriority);
ExportC HRESULT Sim_RemoveInputEvent(HANDLE hSimConnect, DWORD GroupID, const char * szInputDefinition);
ExportC HRESULT Sim_ClearInputGroup(HANDLE hSimConnect, DWORD GroupID);
ExportC HRESULT Sim_SetInputGroupState(HANDLE hSimConnect, DWORD GroupID, DWORD dwState);
ExportC HRESULT Sim_RequestReservedKey(HANDLE hSimConnect, DWORD EventID, const char * szKeyChoice1 = "", const char * szKeyChoice2 = "", const char * szKeyChoice3 = "");
ExportC HRESULT Sim_SubscribeToSystemEvent(HANDLE hSimConnect, DWORD EventID, const char * SystemEventName);
ExportC HRESULT Sim_UnsubscribeFromSystemEvent(HANDLE hSimConnect, DWORD EventID);
ExportC HRESULT Sim_WeatherRequestInterpolatedObservation(HANDLE hSimConnect, DWORD RequestID, float lat, float lon, float alt);
ExportC HRESULT Sim_WeatherRequestObservationAtStation(HANDLE hSimConnect, DWORD RequestID, const char * szICAO);
ExportC HRESULT Sim_WeatherRequestObservationAtNearestStation(HANDLE hSimConnect, DWORD RequestID, float lat, float lon);
ExportC HRESULT Sim_WeatherCreateStation(HANDLE hSimConnect, DWORD RequestID, const char * szICAO, const char * szName, float lat, float lon, float alt);
ExportC HRESULT Sim_WeatherRemoveStation(HANDLE hSimConnect, DWORD RequestID, const char * szICAO);
ExportC HRESULT Sim_WeatherSetObservation(HANDLE hSimConnect, DWORD Seconds, const char * szMETAR);
ExportC HRESULT Sim_WeatherSetModeServer(HANDLE hSimConnect, DWORD dwPort, DWORD dwSeconds);
ExportC HRESULT Sim_WeatherSetModeTheme(HANDLE hSimConnect, const char * szThemeName);
ExportC HRESULT Sim_WeatherSetModeGlobal(HANDLE hSimConnect);
ExportC HRESULT Sim_WeatherSetModeCustom(HANDLE hSimConnect);
ExportC HRESULT Sim_WeatherSetDynamicUpdateRate(HANDLE hSimConnect, DWORD dwRate);
ExportC HRESULT Sim_WeatherRequestCloudState(HANDLE hSimConnect, DWORD RequestID, float minLat, float minLon, float minAlt, float maxLat, float maxLon, float maxAlt, DWORD dwFlags = 0);
ExportC HRESULT Sim_WeatherCreateThermal(HANDLE hSimConnect, DWORD RequestID, float lat, float lon, float alt, float radius, float height, float coreRate = 3.0f, float coreTurbulence = 0.05f, float sinkRate = 3.0f, float sinkTurbulence = 0.2f, float coreSize = 0.4f, float coreTransitionSize = 0.1f, float sinkLayerSize = 0.4f, float sinkTransitionSize = 0.1f);
ExportC HRESULT Sim_WeatherRemoveThermal(HANDLE hSimConnect, DWORD ObjectID);
ExportC HRESULT Sim_AICreateParkedATCAircraft(HANDLE hSimConnect, const char * szContainerTitle, const char * szTailNumber, const char * szAirportID, DWORD RequestID);
ExportC HRESULT Sim_AICreateEnrouteATCAircraft(HANDLE hSimConnect, const char * szContainerTitle, const char * szTailNumber, int iFlightNumber, const char * szFlightPlanPath, double dFlightPlanPosition, BOOL bTouchAndGo, DWORD RequestID);
ExportC HRESULT Sim_AICreateNonATCAircraft(HANDLE hSimConnect, const char * szContainerTitle, const char * szTailNumber, SIMCONNECT_DATA_INITPOSITION InitPos, DWORD RequestID);
ExportC HRESULT Sim_AICreateSimulatedObject(HANDLE hSimConnect, const char * szContainerTitle, SIMCONNECT_DATA_INITPOSITION InitPos, DWORD RequestID);
ExportC HRESULT Sim_AIReleaseControl(HANDLE hSimConnect, DWORD ObjectID, DWORD RequestID);
ExportC HRESULT Sim_AIRemoveObject(HANDLE hSimConnect, DWORD ObjectID, DWORD RequestID);
ExportC HRESULT Sim_AISetAircraftFlightPlan(HANDLE hSimConnect, DWORD ObjectID, const char * szFlightPlanPath, DWORD RequestID);
ExportC HRESULT Sim_ExecuteMissionAction(HANDLE hSimConnect, const GUID guidInstanceId);
ExportC HRESULT Sim_CompleteCustomMissionAction(HANDLE hSimConnect, const GUID guidInstanceId);
ExportC HRESULT Sim_Close(HANDLE hSimConnect);
ExportC HRESULT Sim_RetrieveString(SIMCONNECT_RECV * pData, DWORD cbData, void * pStringV, char ** pszString, DWORD * pcbString);
ExportC HRESULT Sim_GetLastSentPacketID(HANDLE hSimConnect, DWORD * pdwError);
ExportC HRESULT Sim_Open(HANDLE * phSimConnect, LPCSTR szName, HWND hWnd, DWORD UserEventWin32, HANDLE hEventHandle, DWORD ConfigIndex);
ExportC HRESULT Sim_CallDispatch(HANDLE hSimConnect, DispatchProc pfcnDispatch, void * pContext);
ExportC HRESULT Sim_GetNextDispatch(HANDLE hSimConnect, SIMCONNECT_RECV ** ppData, DWORD * pcbData);
ExportC HRESULT Sim_RequestResponseTimes(HANDLE hSimConnect, DWORD nCount, float * fElapsedSeconds);
ExportC HRESULT Sim_InsertString(char * pDest, DWORD cbDest, void ** ppEnd, DWORD * pcbStringV, const char * pSource);
ExportC HRESULT Sim_CameraSetRelative6DOF(HANDLE hSimConnect, float fDeltaX, float fDeltaY, float fDeltaZ, float fPitchDeg, float fBankDeg, float fHeadingDeg);
ExportC HRESULT Sim_MenuAddItem(HANDLE hSimConnect, const char * szMenuItem, DWORD MenuEventID, DWORD dwData);
ExportC HRESULT Sim_MenuDeleteItem(HANDLE hSimConnect, DWORD MenuEventID);
ExportC HRESULT Sim_MenuAddSubItem(HANDLE hSimConnect, DWORD MenuEventID, const char * szMenuItem, DWORD SubMenuEventID, DWORD dwData);
ExportC HRESULT Sim_MenuDeleteSubItem(HANDLE hSimConnect, DWORD MenuEventID, const DWORD SubMenuEventID);
ExportC HRESULT Sim_RequestSystemState(HANDLE hSimConnect, DWORD RequestID, const char * szState);
ExportC HRESULT Sim_SetSystemState(HANDLE hSimConnect, const char * szState, DWORD dwInteger, float fFloat, const char * szString);
ExportC HRESULT Sim_MapClientDataNameToID(HANDLE hSimConnect, const char * szClientDataName, SIMCONNECT_CLIENT_DATA_ID ClientDataID);
ExportC HRESULT Sim_CreateClientData(HANDLE hSimConnect, SIMCONNECT_CLIENT_DATA_ID ClientDataID, DWORD dwSize, SIMCONNECT_CREATE_CLIENT_DATA_FLAG Flags);
ExportC HRESULT Sim_AddToClientDataDefinition(HANDLE hSimConnect, SIMCONNECT_CLIENT_DATA_DEFINITION_ID DefineID, DWORD dwOffset, DWORD dwSizeOrType, float fEpsilon = 0, DWORD DatumID = SIMCONNECT_UNUSED);
ExportC HRESULT Sim_ClearClientDataDefinition(HANDLE hSimConnect, SIMCONNECT_CLIENT_DATA_DEFINITION_ID DefineID);
ExportC HRESULT Sim_RequestClientData(HANDLE hSimConnect, SIMCONNECT_CLIENT_DATA_ID ClientDataID, DWORD RequestID, SIMCONNECT_CLIENT_DATA_DEFINITION_ID DefineID, SIMCONNECT_CLIENT_DATA_PERIOD Period = SIMCONNECT_CLIENT_DATA_PERIOD_ONCE, SIMCONNECT_CLIENT_DATA_REQUEST_FLAG Flags = 0, DWORD origin = 0, DWORD interval = 0, DWORD limit = 0);
ExportC HRESULT Sim_SetClientData(HANDLE hSimConnect, SIMCONNECT_CLIENT_DATA_ID ClientDataID, SIMCONNECT_CLIENT_DATA_DEFINITION_ID DefineID, SIMCONNECT_CLIENT_DATA_SET_FLAG Flags, DWORD dwReserved, DWORD cbUnitSize, void * pDataSet);
ExportC HRESULT Sim_FlightLoad(HANDLE hSimConnect, const char * szFileName);
ExportC HRESULT Sim_FlightSave(HANDLE hSimConnect, const char * szFileName, const char * szTitle, const char * szDescription, DWORD Flags);
ExportC HRESULT Sim_FlightPlanLoad(HANDLE hSimConnect, const char * szFileName);
ExportC HRESULT Sim_Text(HANDLE hSimConnect, SIMCONNECT_TEXT_TYPE type, float fTimeSeconds, DWORD EventID, DWORD cbUnitSize, void * pDataSet);
ExportC HRESULT Sim_SubscribeToFacilities(HANDLE hSimConnect, SIMCONNECT_FACILITY_LIST_TYPE type, DWORD RequestID);
ExportC HRESULT Sim_UnsubscribeToFacilities(HANDLE hSimConnect, SIMCONNECT_FACILITY_LIST_TYPE type);
ExportC HRESULT Sim_RequestFacilitiesList(HANDLE hSimConnect, SIMCONNECT_FACILITY_LIST_TYPE type, DWORD RequestID);