I have a windows application that needs to open a file that is on a network share, but sometimes the user is not connected to the network. The problem is fopen takes a REALLY long time to timeout. How do I reduce the time it takes for fopen to timeout?
FILE *in = fopen("\\\\share\\drive\\file.txt", "r");
bool fileFound;
if(in)
fileFound=true;
else
fileFound=false;
