I have 2 pieces of software, lets call them Primary and Secondary. I am trying to establish a TCP connection between them. The primary one launches the secondary one by calling it with system exec and passing an argument of the port number to connect on. Prior to launching I open a TCP connection and start waiting for a listener. If I do this purely in labview by running my two VIs, then everything is fine and connection is established and everything works as intended. If I run the Primary in labview, and run the secondary as a built exe, that works as expected as well. And if I run both as built exe that also works. BUT if I use the primary(either from labview or exe) to launch the secondary(exe) through system exec, then it seems something gets unhappy and I get an error 63 in the secondary when trying to run TCP Open Connection. From reading other posts, it seems one cause of this error is firewall blocked connections. I've added a rule to the firewall to allow all TCP connections for both applications but that didn't seem to make any difference. I've also tried running the primary as administrator, and that didn't help either.
Does anyone have any ideas what could be happening? I could try the Primary calling a .bat file that calling the secondary, but I don't think that will make any difference.
Solved! Go to Solution.
Well I'm an idiot. Turns out I just parsed my command line argument poorly and it was trying to connect on an unexpected port.