Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ ShellExecuteOnSTAThread()

bool System.Diagnostics.Process.ShellExecuteHelper.ShellExecuteOnSTAThread ( )
inline

Definition at line 66 of file Process.cs.

67 {
68 if (Thread.CurrentThread.GetApartmentState() != 0)
69 {
72 {
73 IsBackground = true,
74 Name = ".NET Process STA"
75 };
76 thread.SetApartmentState(ApartmentState.STA);
77 thread.Start();
78 thread.Join();
79 }
80 else
81 {
83 }
84 if (_notpresent)
85 {
86 throw new PlatformNotSupportedException(System.SR.UseShellExecuteNotSupported);
87 }
88 return _succeeded;
89 }
static string UseShellExecuteNotSupported
Definition SR.cs:118
Definition SR.cs:7
static Thread CurrentThread
Definition Thread.cs:312
delegate void ThreadStart()

References System.Diagnostics.Process.ShellExecuteHelper._notpresent, System.Diagnostics.Process.ShellExecuteHelper._succeeded, System.Threading.Thread.CurrentThread, System.Name, System.Diagnostics.Process.ShellExecuteHelper.ShellExecuteFunction(), System.start, System.Threading.ThreadStart(), and System.SR.UseShellExecuteNotSupported.