jeudi 1 mai 2014

c# - CheckForIllegalCrossThreadCalls .NET Compact Framework - débordement de pile


I have been asked to port to a newer version of .NET CF an application. Unfortunately, this application is filled of cross thread calls that update the form. This causes an "illegal operation" exception, because a BeginInvoke should be used.


The problem is: I would like to avoid to rewrite houndred of methods in order to put the BeginInvoke stuff. I would need the CheckForIllegalCrossThreadCalls flag to be set to false, but it seems this flag is not available in the Compact Framework.


So, any idea on how to solve this problem?



I have been asked to port to a newer version of .NET CF an application. Unfortunately, this application is filled of cross thread calls that update the form. This causes an "illegal operation" exception, because a BeginInvoke should be used.


The problem is: I would like to avoid to rewrite houndred of methods in order to put the BeginInvoke stuff. I would need the CheckForIllegalCrossThreadCalls flag to be set to false, but it seems this flag is not available in the Compact Framework.


So, any idea on how to solve this problem?


0 commentaires:

Enregistrer un commentaire