I'm writing a program that launches another application (among other things), and it was doing fine until the developers of the other application changed Application.Run(ParentForm) to ParentForm.Show(). After reading quite a bit of documentation on these two functions, I'm still at a loss as to why it would cause my program to break. However, it breaks quite dramatically, with a LoderLock error that says I'm trying to run managed code inside DllMain. This code runs fine:
t = new Thread(new ThreadStart(StartThread));
t.ApartmentState = ApartmentState.STA;
t.Start();
but the error occurs in StartThread(), which is a function that simply instantiates the program's startup class and then calls the Main() function within that object.
Can anyone advise how such a small change could cause something that was working fine to break completely