• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

[FSX] SimConnect client trapped in a loop

Messages
14
Country
france
Hello,
I am working on application to read and write data in FS X, using SimConnect and VB.NET 2010. I could make my programme run, read data about an aircraft, and display them in a form. All this worked well, and still works on the programme compiled in an .exe application.
Now, I am stopped because what was working yesterday does work anymore. The same form and class are now trapped into a loop :

Protected Overrides Sub DefWndProc(ByRef m As Message)
' Simconnect client will send a win32 message when there is a packet to process. ReceiveMessage must be called to
' trigger the events. This model keeps simconnect processing on the main thread.
If m.Msg = WM_USER_SIMCONNECT Then
If fsx_simconnect IsNot Nothing Then
fsx_simconnect.ReceiveMessage()
End If
Else
MyBase.DefWndProc(m)
End If
End Sub

It seems that this sub keeps waiting for a message from win32, having the value &h402. This value never appears, and the sub loops forever. Why ? Yesterday it worked. I restarted the PC 2 times, I checked several things, and I found nothing.
What's happening ?

Jean-Paul
 
Hallo SpeedBird,
thanks for your answer. Of course my first idea was to check the modifications made on the programme. I did add some lines, but all are situated far downstream compared to the sub I mentionned. They are never reached since the programme keeps trapped inside an endless loop before that point. I checked this with step by step debug.

So what appears is that the sub waits for a message from win32, and this message (&H402) never comes. What is strange is that on the compiled application, using exactely the same sub, it runs well ! The rest of the PC, including FS X, joystick and Saitek modules, is perfectly OK.

I explored the Register, but you know what it is. Impossible to find something in such a mess. I keep searching... If you have an idea, Danke shön in advance !
Jean-Paul
 
SimConnect client trapped in a loop

I finally found the reason of my problem. During my operations on the form file, all the Handles clauses of the buttons and timer had disappeared. Don't know why.

Once reinstalled, the programme runs fine.

Thanks.

Jean-Paul
 
Back
Top