I have a C++ program that needs to ping a device before it proceeds. I've been using IcmpSendEcho for a few months now. During this time I have seen my program hang on the IcmpCreateFile call more than once. I haven't pinpointed the cause and all of my searches lead to nothing, this seems to happen for no rhyme or reason, whether my program is running for weeks or was just launched.
HANDLE hIcmpFile;
hIcmpFile = IcmpCreateFile();
Is anyone familiar with this, or should I just use a different method to ping?
EDIT: I'm not 100% sure but windows update seems to encourage this behavior; I don't seem to see this issue when a server or the client it's talking to have update turned off.