![]() ![]() ![]() Most of my work in the conversion is re-architecting the program to make it thread-safe, and eliminating the original program's heavy use of global variables. Trying to do this same architecture in C# is disastrous because event handlers for the socket or timers are called by the system in different threads from the main application thread and result in frequent exceptions like "The calling thread cannot access this object because a different thread owns it.", not to mention more subtle problems. ![]() Nonetheless the old program seemed to run OK. The old VB6 program had a main course of program execution, but it also had lots of event handlers either for socket events or for timer events and the handlers for these often manipulated shared resources, e.g., common global variables, whenever they woke up and ran. I don't know VB6 very well and I'm asking this to understand it better. I'm porting an ancient VB6 program to C#/.Net. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |