我尝试使用p4 api .net打开我的会话,但命令不起作用。
ServerAddress adr = new ServerAddress(p.conStr);
Server serv = new Server(adr);
P4Server ser = new P4Server(p.conStr, p.user, p.password, p.ws_client);
Connection con = new Connection(serv);
string password = "Password";
con.Login(password);object con.timeout包含该值:
"base {System.SystemException} = {"La référence d'objet n'est pas définie à une instance d'un objet."}" 我认为问题是这样做是不可能的,因为如果我们使用命令行w进程,通过传递命令p4 -p xx.xxx.xxx.x:xxxx login,然后我们传递密码。
我还尝试通过以下代码使用System.Diagnostics.Process传递命令:
System.Diagnostics.Process process = new System.Diagnostics.Process();
System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo();
startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
startInfo.FileName = "p4.exe";
startInfo.Arguments = "p4 -p 10.215.100.7:1666 login";
process.StartInfo = startInfo;
process.Start();请帮帮我
发布于 2013-05-08 17:56:14
ServerAddress adr = new ServerAddress(conStr);
Server serv = new Server(adr);
P4Server ser = new P4Server(conStr, user,password,ws_client);
Connection con = new Connection(serv);
Options opconnect = new Options();
opconnect.Add("-p" , "");
con.SetClient(ws_client);
con.Connect(null);
con.Login(password);https://stackoverflow.com/questions/16419598
复制相似问题