Those are the same step: Does CreateFile("\\networkpath\path\foo") fail with a file not found error code? If yes, then do something different.
It's the same anti-pattern that underlies all the IsBadXXXPtr type functions.
IsBadXXXPtr is a check, not a security check function. It is there to check that your arguments and the integrity of your application are valid, not to protect against malicious threads in your process changing things on the fly - because frankly if there's a malicious thread changing the protection of various bits of memory in your process, you've already long since lost your fight against those hackers.