主题:[求助]如何使用shell execute来调用系统程序??????
这是我写的一个shell execute
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
这是调用时的:
Call ShellExecute(0, "open", OpenFileDialog1.FileName, vbNullString, vbNullString, vbNormalFocus)
在执行时出现下面错误:
The thread 0xfc has exited with code 0 (0x0).
The thread 0x9f8 has exited with code 0 (0x0).
'变化计数器.vshost.exe' (Managed): Loaded 'D:\变化计数器\bin\变化计数器.exe', Symbols loaded.
Managed Debugging Assistant 'PInvokeStackImbalance' has detected a problem in 'D:\变化计数器\bin\变化计数器.vshost.exe'.
Additional Information: 对 PInvoke 函数“变化计数器!变化计数器.Form1::ShellExecute”的调用导致堆栈不对称。原因可能是托管的 PInvoke 签名与非托管的目标签名不匹配。请检查 PInvoke 签名的调用约定和参数与非托管的目标签名是否匹配。
The program '[2452] 变化计数器.vshost.exe: Managed' has exited with code 0 (0x0).
请各位指点.
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
这是调用时的:
Call ShellExecute(0, "open", OpenFileDialog1.FileName, vbNullString, vbNullString, vbNormalFocus)
在执行时出现下面错误:
The thread 0xfc has exited with code 0 (0x0).
The thread 0x9f8 has exited with code 0 (0x0).
'变化计数器.vshost.exe' (Managed): Loaded 'D:\变化计数器\bin\变化计数器.exe', Symbols loaded.
Managed Debugging Assistant 'PInvokeStackImbalance' has detected a problem in 'D:\变化计数器\bin\变化计数器.vshost.exe'.
Additional Information: 对 PInvoke 函数“变化计数器!变化计数器.Form1::ShellExecute”的调用导致堆栈不对称。原因可能是托管的 PInvoke 签名与非托管的目标签名不匹配。请检查 PInvoke 签名的调用约定和参数与非托管的目标签名是否匹配。
The program '[2452] 变化计数器.vshost.exe: Managed' has exited with code 0 (0x0).
请各位指点.