在袖珍电脑模拟器应用程序上调用 .exe 文件时出现未处理的异常
我试图在袖珍 PC 模拟器上的 vc2005 上运行此代码,但它给了我一个 win32unhandled 异常
private void button1_Click(object sender, EventArgs e)
{
System.Diagnostics.Process Proc = new System.Diagnostics.Process();
Proc.StartInfo.FileName = @"WM_flowm.exe";
Proc.Start();
}
WM_flowm.exe 是 flite tts,可以在 Windows Mobile 上运行而没有问题,但我需要在我的 C# 代码中调用它。
调用堆栈
System.dll!System.Diagnostics.Process.StartWithShellExecuteEx(System.Diagnostics.ProcessStartInfo startInfo = {System.Diagnostics.ProcessStartInfo}) + 0xcb bytes
System.dll!System.Diagnostics.Process.Start() + 0x3f bytes
停在这里===
try_DLL.exe!try_DLL.Form1.button1_Click(object sender = {Text = "button1"}, System.EventArgs e = {System.EventArgs}) 第 29 行 + 0x6 字节 C#
System.Windows.Forms.dll!System.Windows.Forms.Control.OnClick(System.EventArgs e = {System.EventArgs}) + 0x15 bytes
System.Windows.Forms.dll!System.Windows.Forms.Button.OnClick(System.EventArgs e = {System.EventArgs}) + 0x32 bytes
System.Windows.Forms.dll!System.Windows.Forms.ButtonBase.WnProc(Microsoft.AGL.Forms.WM wm = WM_BUTTON_NOTIFYCLICKED, int wParam = 0, int lParam = 0) + 0x17 bytes
System.Windows.Forms.dll!System.Windows.Forms.Control._InternalWnProc(Microsoft.AGL.Forms.WM wm = WM_BUTTON_NOTIFYCLICKED, int wParam = 0, int lParam = 0) + 0x9 bytes
System.Windows.Forms.dll!Microsoft.AGL.Forms.EVL.EnterMainLoop(System.IntPtr hwnMain = 1114117)
System.Windows.Forms.dll!System.Windows.Forms.Application.Run(System.Windows.Forms.Form fm = {try_DLL.Form1}) + 0x1a bytes
try_DLL.exe!try_DLL.Program.Main() Line 15 + 0xa bytes C#
I'm trying to run this code on vc2005 on pocket PC emulator but it gives me a win32unhandled exception
private void button1_Click(object sender, EventArgs e)
{
System.Diagnostics.Process Proc = new System.Diagnostics.Process();
Proc.StartInfo.FileName = @"WM_flowm.exe";
Proc.Start();
}
The WM_flowm.exe is the flite tts which can run on windows mobile without problems, but I need to call it in my C# code.
the call stack
System.dll!System.Diagnostics.Process.StartWithShellExecuteEx(System.Diagnostics.ProcessStartInfo startInfo = {System.Diagnostics.ProcessStartInfo}) + 0xcb bytes
System.dll!System.Diagnostics.Process.Start() + 0x3f bytes
stopped here ===
try_DLL.exe!try_DLL.Form1.button1_Click(object sender = {Text = "button1"}, System.EventArgs e = {System.EventArgs}) Line 29 + 0x6 bytes C#
System.Windows.Forms.dll!System.Windows.Forms.Control.OnClick(System.EventArgs e = {System.EventArgs}) + 0x15 bytes
System.Windows.Forms.dll!System.Windows.Forms.Button.OnClick(System.EventArgs e = {System.EventArgs}) + 0x32 bytes
System.Windows.Forms.dll!System.Windows.Forms.ButtonBase.WnProc(Microsoft.AGL.Forms.WM wm = WM_BUTTON_NOTIFYCLICKED, int wParam = 0, int lParam = 0) + 0x17 bytes
System.Windows.Forms.dll!System.Windows.Forms.Control._InternalWnProc(Microsoft.AGL.Forms.WM wm = WM_BUTTON_NOTIFYCLICKED, int wParam = 0, int lParam = 0) + 0x9 bytes
System.Windows.Forms.dll!Microsoft.AGL.Forms.EVL.EnterMainLoop(System.IntPtr hwnMain = 1114117)
System.Windows.Forms.dll!System.Windows.Forms.Application.Run(System.Windows.Forms.Form fm = {try_DLL.Form1}) + 0x1a bytes
try_DLL.exe!try_DLL.Program.Main() Line 15 + 0xa bytes C#
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试使用文件的完整路径。如果文件位于 \Progam Files\WM_Flowm\ 中:
Try using the full path of the file. If the file is in \Progam Files\WM_Flowm\: