Click to See Complete Forum and Search --> : Big head ache. How to query network drive availability


Will Rothwell
May 11th, 1999, 10:54 AM
Hi,

My application needs to scan all network mapped drives continuously (every 5 seconds) to see if they are accessible and if any new drive or share is added since last scan. Is there any way to do that without causing network timeout (can be up to 1 or 2 minutes), otherwise my app will appear to have died (hung).

One of the reasons for this requirement is that my app. will load some configuration files, from networked drives, before startup. Therefore I can't afford to try to open each of these files in turn, and to wait, to see if they are accessible.

If any solution works on Window95/98 then it is a bonus, but I'll be a happy man if it is possible at all under NT alone. Can any one help please.

Thanks in advance.

Will

scp
May 11th, 1999, 11:21 AM
Hi!

You can use the _chdrive() function, and based on the return value you can determine if the drive is available. If you need further help, please contact me.

Santhosh