想用delphi调用windows的net send命令,如何才能实现呢,

解决方案 »

  1.   

    用 API 函数:ShellExecute ('net send')
      

  2.   

    WinExec('net send * hello!', SW_HIDE);
      

  3.   

    上面的方法不是很好,最好的办法,,
    http://expert.csdn.net/Expert/topic/1230/1230681.xml?temp=.3855249
      

  4.   

    你可以这样调用
    procedure TForm2.Button1Click(Sender: TObject);
    var
     
      target:string;
      conact:string;begin
      target:=edit1.Text;
      conact:=edit2.Text;
      Memo1.Lines.Add('向'+target+'发送: >>'+conact);
      shellexecute(handle,nil,'cmd.exe',pchar('/k net send '+target+' '+conact),nil,sw_hide);
      edit2.Text:='';