{"id":18991430,"url":"https://github.com/aziascreations/fs2020---simconnect-purebasic-bindings","last_synced_at":"2026-03-19T07:31:23.678Z","repository":{"id":100760037,"uuid":"289191655","full_name":"aziascreations/FS2020---SimConnect-PureBasic-Bindings","owner":"aziascreations","description":"PureBasic bindings to the SimConnect API from FS2020's SDK","archived":false,"fork":false,"pushed_at":"2020-08-27T15:57:26.000Z","size":24,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-21T11:20:33.667Z","etag":null,"topics":["bindings","simconnect"],"latest_commit_sha":null,"homepage":"","language":"PureBasic","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aziascreations.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-08-21T06:08:00.000Z","updated_at":"2023-06-22T12:12:00.000Z","dependencies_parsed_at":"2023-06-09T16:15:36.090Z","dependency_job_id":null,"html_url":"https://github.com/aziascreations/FS2020---SimConnect-PureBasic-Bindings","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/aziascreations/FS2020---SimConnect-PureBasic-Bindings","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aziascreations%2FFS2020---SimConnect-PureBasic-Bindings","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aziascreations%2FFS2020---SimConnect-PureBasic-Bindings/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aziascreations%2FFS2020---SimConnect-PureBasic-Bindings/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aziascreations%2FFS2020---SimConnect-PureBasic-Bindings/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aziascreations","download_url":"https://codeload.github.com/aziascreations/FS2020---SimConnect-PureBasic-Bindings/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aziascreations%2FFS2020---SimConnect-PureBasic-Bindings/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29930344,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-28T09:58:13.507Z","status":"ssl_error","status_checked_at":"2026-02-28T09:57:57.047Z","response_time":90,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bindings","simconnect"],"created_at":"2024-11-08T17:13:52.522Z","updated_at":"2026-02-28T10:33:00.933Z","avatar_url":"https://github.com/aziascreations.png","language":"PureBasic","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FS2020 - SimConnect PureBasic Bindings\n\nA simple includes that provides bindings to a couple of the functions and structures present in the SimConnect API.\n\nOnly a very small amount of structures and functions are properly defined and tested, use this include at your own risk.\n\n\n## Cloning\n\nTo clone this repo and the submodule it requires you have to use one of the following commands:\n\n`git clone --recurse-submodules https://github.com/aziascreations/FS2020---SimConnect-PureBasic-Bindings.git`\u003cbr\u003e\nIf you want to clone the whole repo without integrating it into an existing repository.\n\n`aaa`\u003cbr\u003e\nIf you want to clone it as a submodule inside an existing repository.\n\n\n## Usage\n\n### Importing\n\nTo include the pbi file in your code you just have to use `XIncludeFile \"${Include Path}\"` where `${Include Path}` can either be the absolute or relative path to said include.\n\nNext, if you selected a custom location for the Flight Simulator SDK when you installed it, you can either manually modify the path in the pbi file or define a constant named `#SIMCONNECT_LIB_PATH` which contains the path to the `SimConnect.lib` file before including the pbi file.\u003cbr\u003e\nSee \"[Examples/CustomLibPath.pb]()\" for an example on how to do this.\n\nYou should also keep in mind that the include uses the `EnableExplicit` compiler directive.\n\n[Remark about wintypes, the license, why it is there and how to resolve the macros if needed !!!]\n\n### Important remarks \n\nThere are a couple of important remarks that need [to be made] regarding the way you need to call functions or how some structure works.\n\n#### Functions\n\nSome of the functions that require strings like `SimConnect_Open()` and `SimConnect_FlightPlanLoad()` won't work properly in PureBasic [due to...].\u003cbr\u003e\nTo fix this issue, you need to need to work around PureBasic's unicode formatted strings like so:\n\nFor a function in C++\u003cbr\u003e\n`SIMCONNECTAPI SimConnect_FlightPlanLoad(HANDLE hSimConnect, const char * szFileName);`\n\nWhose PB equivalent would be:\u003cbr\u003e\n`SimConnect_FlightPlanLoad(hSimConnect.HANDLE, szFileName.s)`\n\nYou have to actually treat the string a pointers like so:\u003cbr\u003e\n`SimConnect_FlightPlanLoad(hSimConnect.HANDLE, *szFileName)`\n\nAnd call it like in this way:\n```\nDefine *FileName = Ascii(\"MyFlightPlan\")\nSimConnect_FlightPlanLoad(hSimConnect, *FileName)\nFreeMemory(*FileName)\n```\n\nA potential fix for this issue could be to see if the `.p-ascii` data type to force the compiler to do it for ourselve, but this is not guaranteed to work, this is something I will be looking into however.\n\n\n#### Structures\n\n[....]\n\n\n## Building\n\n### Dynamically linked apps\n\nJust place the dll file present in the SDK in the same folder as your final or temporary executable.\u003cbr\u003e\nAnd don't forget to check the \"*Create temporary executable in the source directory*\" option in the \"*Compiler options*\" menu.\n\n### Statically linked apps\n\nYou might be able to do it with the larger .lib file that is included in the SDK, but I couldn't get it to work.\u003cbr\u003e\nThe linker kept throwing symbol errors.\n\n\n## License\n\nCode in this repo:\u003cbr\u003e\n[Unlicense](LICENSE)\n\nSimConnect:\u003cbr\u003e\nI don't know, you will have to check.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faziascreations%2Ffs2020---simconnect-purebasic-bindings","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faziascreations%2Ffs2020---simconnect-purebasic-bindings","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faziascreations%2Ffs2020---simconnect-purebasic-bindings/lists"}