I'd like to be able to PING from my MS C++ program. I'd rather not do it by a command line and then parse the string response, because I think different language PCs emit a different text response, and I just need this to work on all PCs. Ideally I want to call
int ms = Ping("192.168.1.20");
in my C++ program, and "ms" is the trip time that ping normally reports. Or maybe I need a variant where I can set the timeout duration in ms, like:
int ms = Ping("192.168.1.20", 500);
I happen to know that this is pretty easily done in C# but I can't find how to do it from C++.