Has anyone gotten SimConnect to repeatedly get data?

No worries :slight_smile:

Well, there might be another way to react to messages received by SimConnect.dll, and that is the Win32 event messaging:

From the docs:

General Functions

There are 3 parameters related to Win32 event handling (which requires a hWnd instance):

hWnd
[in] Handle to a Windows object. Set this to NULL if the handle is not being used.
UserEventWin32
[in] Code number that the client can specify. Set this to 0 if it is not being used.
hEventHandle
[in] A Windows Event handle. A client can be written to respond to Windows Events, rather than use a polling and callback system, which can be a more efficient process if the client does not have to respond very frequently to changes in data in Prepar3D.

In fact, the API documentation seems to reiterate on the point that the alternative is indeed polling.

So instead of providing a callback function and polling for messages with “dispatch” one can apparently “listen” for (user defined) events injected into the Win32 event queue (which otherwise provides access to “window events” such as mouse movements, repaint events etc.).

But as the documentation also indicates this may only be preferrable if few events are expected. But if one is going to permanently track the aircraft’s position (possibly every “frame”) then the polling approach indeed seems to be the way to go…

I have yet to try this “DLL start” approach (which apparently “automatically” calls the callback, without the need to repeatedly call “dispatch”).