R
Roy Chastain
I have a DLL that will be called by a Forms main program.
In the middle of that DLL, I need to do a ShowDialog() on a class contained within the DLL. It is currently working, but sometime
after the dialog processing completes, I receive a an exception that is "Undo operation encountered a context ...". All
comments about this exception indicate that it is a UI cross thread issue. I have no problem believing that is my problem because
there several threads running around in the dll and the ShowDialog is being done on a Async Socket completion thread.
The question is,
How do I call InvokeRequired and/or how does the system know what thread to invoke to, when the dialog I am about to show has just
be created and I do not have the any other control from the originating form to use in the call to InvokeRequired?
Thanks
In the middle of that DLL, I need to do a ShowDialog() on a class contained within the DLL. It is currently working, but sometime
after the dialog processing completes, I receive a an exception that is "Undo operation encountered a context ...". All
comments about this exception indicate that it is a UI cross thread issue. I have no problem believing that is my problem because
there several threads running around in the dll and the ShowDialog is being done on a Async Socket completion thread.
The question is,
How do I call InvokeRequired and/or how does the system know what thread to invoke to, when the dialog I am about to show has just
be created and I do not have the any other control from the originating form to use in the call to InvokeRequired?
Thanks