有两个执行文件(A和B)。如果A 要调B 的执行文件,并且A要传送给B 三个参数,才能是B 执行文件正常运行。
这样A执行文件的参数要怎样写。B 的三个参数应该写在那里。才能接受A传过来的参数。
问题解决了,就给分。如果分不过我在加。

解决方案 »

  1.   

    用WinExec参数直接写在路径里就可以了
      

  2.   

    例 输出三个数中最大值的过程
    A:
    var n,m,l integer;
    begin
    n=1;
    m=2;
    l=3;
    larest(n,m,l);
    ......
    end;
    B:
    procedure largest(a,b,c:integer);
    begin
    if (a>=b) and (a>=c) then writeln(a);
    if (b>=a) and (b>=c) then writeln(b);
    if (c>=a) and (c>=b) then writeln(c);
    end.
      

  3.   

    to: firetoucher
    用程序命令行参数。这样设置呀。这个我不熟悉呀
    to:tw_cshn
    用winexec这个函数所带的参数的给B 参数。
    那么B代码里面要怎样设置呀。
      

  4.   

    ShellExecute(    HWND hwnd, // handle to parent window
        LPCTSTR lpOperation, // pointer to string that specifies operation to perform
        LPCTSTR lpFile, // pointer to filename or folder name string
        LPCTSTR lpParameters, // pointer to string that specifies executable-file parameters 
        LPCTSTR lpDirectory, // pointer to string that specifies default directory
        INT nShowCmd  // whether file is shown when opened
       );
      

  5.   

    两个可执行文件通信可以用com啊
    简单一点就用内存映射文件