--- In [email protected], sgp <[EMAIL PROTECTED]> wrote:
> if( 4 == dll.call("GetDriveType|LPCTSTR ui",?"W:\") )do
>   win.debug("remote drive")
> else
>   win.debug(file.volume(?"W:\"))
> endif
> 
> This suffices my needs, though ideally one should test for a
disconnected 
> drive (NET USE can show that information) but I don't know which API
> to call.

I suspect net(1).exe uses WNetGetConnection API. However, if you use
W2K or later, the following would be handier:
dll.call("shell32|IsNetDrive|i",23)
0: not, 1: connected, 2: disconnected (Network Drive)
You have to specify the drive as a number, as A: 1, W: 23 etc.

Sean

Reply via email to