Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Netwrked Drive Properties
Message
From
06/07/1999 22:20:43
 
 
To
06/07/1999 22:18:26
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00236128
Message ID:
00238086
Views:
11
>>>>Hey guys..
>>>>I'm curious if there is a way to query the OS or somesuch and find out whether a network mapped drive has read only or writable flags on it. Like with NT you can set shares to read only or raed write depending on Login or by the sahre itself.. Is there a way to ask Windows if a mapped drive is read only etc..?
>>>
>>>It's fairly trivial - try to do an FCREATE() of a file on the mapped drive - if the FCREATE() fails, you can't write to the drive.
>>
>>
>>Heh. That's what I'm doing now.. I was just wondering if there was another way. Thanks tho.
>
>
>Using FCREATE() is ok provided your app can do with the overhead.
> If using FCREATE() to see if a particular workstation is connected to the network takes too long before you get an answer.
>
>I have a timer on an app that wakes up every 5 seconds and looks for a data file on a WS. If present, the server is updated with data from the DBF on the WS. This was done so that if the WS went down, the server could still continue to operate by manually entering the data that would have been extracted from the WS.
>But this does not work very well. (I use FILE()and look on a virtual drive. eg
>
>IF file("\\isZ20x\c\bbtemp\weighmst\ab001.DBF"))
>
>works ok as long as the \\isZ220x\... is actually connected. But if for some reason it is NOT online, then FILE() or FCREATE() or any such command, literally stops the current application while it goes off in search of the fiel/computer on the network and this is unacceptable!
>
>Is there any other way, that does not stop the current process??

Take a look at my NETRESOURCE class implementation, which creates and uses the NETRESOURCE structure (it requires CLSHEAP as well.) One of the demos implements WNetAddConnection3(), which can be used to force an attatchment/login to a network share without mapping a drive to it.

>
>Bernard
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform