Okay, So I am new to programming and am trying to transfer data from a machine via RS232 to an "adapter" program that allows connection to a "client or agent" program that sends the data to the web(localhost) in .xml format. Basically a socket setup. Both programs seem to be working fine, but when I connected the client program to the "adapter", it says CreateFile Failed.

When I run the first program, executeable window pops up and says:
Server Started, waiting on port 7878

Then when I connect to the localhost it says:
Server Started, waiting on port 7878
Connected to: on port 2816
CreateFile Failed

I am pretty sure the port numbers do not need to match since I am trying to view this data on the local host. 7878 is just the default port number in the adapter program.

I am not sure which section of code to look at so can someone tell me where to look to fix this problem? I am not sure if it is an .xml proble, schema problem, or what the problem is. Thanks for any advice or help you can give me.