示例#1
0
 public void CreateIPC()
 {
     if (!IPCConnected)
     {
         int state = NetworkConnection.Connect("\\\\" + HunterUtilities.GetIPFromPath(share_remote_path), "", share_usr, share_pwd);
         if (state != (int)NetworkConnection.ERROR_ID.ERROR_SUCCESS)
         {
             MessageBox.Show(String.Format("建立IPC连接出错,返回出错码为{0}", state), "Hunter 3", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
         }
         else
         {
             IPCConnected = true;
         }
     }
 }
示例#2
0
 public void DisconnectIPC()
 {
     int state = NetworkConnection.Disconnect("\\\\" + HunterUtilities.GetIPFromPath(share_remote_path));
 }