请问:
我的程序中调用了由vc编译c程序生成的可执行文件(用shell语句),
为什么程序老是因为提示“无效过程或参数”而中断。程序时好时坏,
请高手指点,送高分!!!!!!!!!!

解决方案 »

  1.   

    shell 应用程序的绝对路径加文件名
      

  2.   

    用SHELL要指定: 打开某文件的程序,某文件
      

  3.   


    Dim strFile         As String
    Dim strParam        As String
    Dim strDirectory    As String
    Const SW_NORMAL = 1strFile = "Notepad.Exe"If (UCase$(Right$(strFile, 4)) = ".EXE") Then
       Shell strFile & " " & strParam
    Else
        If ShellExecute(Me.hwnd, "open", strFile, strParam, strDirectory, SW_NORMAL) = 0 Then
            MsgBox "执行出错", vbInformation
        End If
    End If
    http://expert.csdn.net/Expert/topic/1848/1848882.xml?temp=.7487757
      

  4.   

    这好像是有点问题了,不知道原来的EXE文件中的参数类型,你传参数的时候肯定会出现什莫“无效参数或过程”,最好能知道原来程序怎麽编的