IsNetDrive function
[This function is available through Windows XP Service Pack 2 (SP2) and Windows Server 2003. It might be altered or unavailable in subsequent versions of Windows. Use GetDriveType or WNetGetConnection instead.]
Applies to: desktop apps only
Tests whether a drive is a network drive.
Syntax
int IsNetDrive( __in int iDrive );
Parameters
- iDrive [in]
-
Type: int
An integer that indicates which drive letter you want to test. Set it to 0 for A:, 1 for B:, and so on.
Return value
Type: int
This function returns one of the following values.
| Return value | Description |
|---|---|
|
The specified drive is not a network drive. |
|
The specified drive is a network drive that is properly connected. |
|
The specified drive is a network drive that is disconnected or in an error state. |
Requirements
|
Minimum supported client | Windows 2000 Professional |
|---|---|
|
Minimum supported server | Windows 2000 Server |
|
Header |
|
|
Library |
|
|
DLL |
|
Send comments about this topic to Microsoft
Build date: 3/7/2012
Hi,
If i start this method (pinvoked) in a C# Application, the method returns "1" at the drive number 24/25.
But I can see only 8 (from 0-7) drives in my Explorer. The Network drives are at "6 and 7".
OS: WIndows Vista Ultimate
Can anyone tell me, what I'm doing wrong, or is it a bug, or are there any invisible drives I don't know about?
thx, Tom
- 2/19/2010
- Imuseratmtps9209-upupup
Hi,
If i start this method (pinvoked) in a C# Application, the method returns "1" at the drive number 24/25.
But I can see only 8 (from 0-7) drives in my Explorer. The Network drives are at "6 and 7".
OS: WIndows Vista Ultimate
Can anyone tell me, what I'm doing wrong, or is it a bug, or are there any invisible drives I don't know about?
thx, Tom
[Noelle Mallory - MSFT] Please post questions to the MSDN Forums at http://forums.microsoft.com/msdn. You will likely get a quicker response through the forum than through the Community Content.
- 3/28/2008
- Thomas van Veen
- 3/31/2008
- Noelle Mallory