SimConnect connection in WASM module

I would like to add a SimConnect connection (preferably static unmanaged) to a WASM module to enable data exchange between the WASM module and a SimConnect external application.

As the WASMs module_init() function needs to return, and I understand that it is not currently possible to create a new thread in a WASM module for this (but please correct me if I’m wrong!), how can I implement a SimConnect_CallDispatch loop to my dispatch processing function?

The register_key_event_handler function allows you to register a function for the gauge event handler, but what about the SimConnect callback handler?

Any examples on how to set this up anywhere?

Thanks in advance,

John

@some1pl respomded to this in another thread:

Just like in FSX, there is no need to loop for in-proc DLL. A single call to Siconnect_CallDispatch after opening connection is enough.

John

In MSFS sdk samples folder, look for “StandaloneModule” project.

All working now, thanks. Just forgot about in the in-process functionality of Siconnect_CallDispatch as I’ve been writing nothing but exe’s for the past year! :face_with_hand_over_mouth: