I have some VB6 code I need to slowly move over to .NET. Some of this requires calls to the web. I'm doing the web call from a .NET dll, and when it's done, it fires an event. I handle the event in VB6. Now this works fine on my test machine, and the majority of user's machines, but some users get a consistent crash of the program sometime around when the event is fired.
I'm thinking this is a threading issue. So how should I be handling threads on the .NET side of things? There is no synchronization context when the .NET code is called and I think that might be the issue. How would I get an async operation back to the VB6 calling thread? My VB6 code is STA and I read that things would be marshaled to the VB6 thread through COM automatically, but maybe that was wrong? I don't fully understand what to do if it's indeed a threading issue.
I haven't been able to find a pattern to which computers have the crash issue and which ones don't.