Additionally, if you do not set UseShellExecute property, and set a
breakpoint on ShellExecuteExW API, we will get the following stack trace,
which proves my statement:
0:000> kL
ChildEBP RetAddr
0012ef64 053b2a32 shell32!ShellExecuteExW
0012ef80 7a669f49 CLRStub[StubLinkStub]@53b2a32
0012efe8 7a668e6c
System_ni!System.Diagnostics.ShellExecuteHelper.ShellExecuteOnSTAThread()+0x
81
0012efe8 7a667df4
System_ni!System.Diagnostics.Process.StartWithShellExecuteEx(System.Diagnost
ics.ProcessStartInfo)+0x2d8
023f21f4 7a6691f7 System_ni!System.Diagnostics.Process.Start()+0x80
023f21f4 0237039a
System_ni!System.Diagnostics.Process.Start(System.Diagnostics.ProcessStartIn
fo)+0x33
023f21f4 7b060bdb
WinFormTest!WinFormTest.Form1.button1_Click(System.Object,
System.EventArgs)+0x72
0012f0a8 7b1292e9
System_Windows_Forms_ni!System.Windows.Forms.Control.OnClick(System.EventArg
s)+0x57
0012f0a8 7b1293ef
System_Windows_Forms_ni!System.Windows.Forms.Button.OnClick(System.EventArgs
)+0x49
0012f0a8 7b0f68c6
System_Windows_Forms_ni!System.Windows.Forms.Button.OnMouseUp(System.Windows
.Forms.MouseEventArgs)+0xc3
0012f0a8 7b074fef
System_Windows_Forms_ni!System.Windows.Forms.Control.WmMouseUp(System.Window
s.Forms.Message ByRef, System.Windows.Forms.MouseButtons, Int32)+0xf2
0012f114 7b0841ce
System_Windows_Forms_ni!System.Windows.Forms.Control.WndProc(System.Windows.
Forms.Message ByRef)+0x56f
0012f150 7b0840eb
System_Windows_Forms_ni!System.Windows.Forms.ButtonBase.WndProc(System.Windo
ws.Forms.Message ByRef)+0xce
0012f1b0 7b07d24d
System_Windows_Forms_ni!System.Windows.Forms.Button.WndProc(System.Windows.F
orms.Message ByRef)+0x2b
0012f1b0 7b07d226
System_Windows_Forms_ni!System.Windows.Forms.Control+ControlNativeWindow.OnM
essage(System.Windows.Forms.Message ByRef)+0xd
0012f1b0 7b07d035
System_Windows_Forms_ni!System.Windows.Forms.Control+ControlNativeWindow.Wnd
Proc(System.Windows.Forms.Message ByRef)+0xd6
0012f1b0 00392164
System_Windows_Forms_ni!System.Windows.Forms.NativeWindow.Callback(IntPtr,
Int32, IntPtr, IntPtr)+0x75
Just for your information.
Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.