LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Incorrect errors from ConnectToTCPServer?

(CVI 5.5.1 on NT)
When I call ConnectToTCPServer() and the server wasn't registered yet, I get "Unable to register service" instead of "Server Not Registered" as expected.

Also, when the Address is a host name that may not be resolvable (local or DNS), I got "Invalid Parameter" and started hunting down a parameter mismatch in the call. I eventually discovered that the paramter was valid, but it was a simple case of "host not found."

Any word on these from the NI insiders?
0 Kudos
Message 1 of 4
(3,293 Views)
Ignore the first item about "Unable to register service." Profuse apologies!
Message 2 of 4
(3,293 Views)
Hello Jon,
This error may be related to the buffer size being used. We have a KnowledgeBase article on this topic at http://www.ni.com >> KnowledgeBase >> Search for "+invalid +parameter +CVI +TCP".
If you have further questions, please feel free to contact us at http://www.ni.com/ask

Jeremiah Cox
Applications Engineer
National Instruments
http://www.ni.com/ask
0 Kudos
Message 3 of 4
(3,293 Views)
Thanks Jeremiah,

I guess I didn't find this article because I was searching for ConnectToTCP! However, it covers a slightly different case than mine, but the concern is the same, I'm sure.

Anyway, All works OK when the server is actually there, just the misleading error when it isn't. I also noticed the same response when the host is correct, but the port (service) is not registered. Fundamentally, there is an invalid parameter, but a similar error is given from other libraries (like UIL) with different meanings. I don't expect perfection, I just thought I'd bring to your attention.

Thanks for your response.
0 Kudos
Message 4 of 4
(3,293 Views)