![]() |
GetDriveType and DRIVE_REMOTE
I want to list all networks drives in a PC. My current code to list local drive is GetDriveType. So I look at
![]() From MSDN, if the return value of GetDriveType is 4, that means DRIVE_REMOTE (The drive is a remote (network) drive) The problem is GetDriveType can not retrieve the network drive. Here my way to produce a network drive (Win 7) : Open Network, Select a shared folder and choose map network drive.. then there will be a new drive in Window Explorer. I know there are another API to list network drive. My question is, Does GetDriveType can not detect mapped network drive? If yes, that means mapped network drive is different with remote (network) drive? |
AW: GetDriveType and DRIVE_REMOTE
There is nothing wrong with GetDriveType(), if you are dealing with connected network drives.
If you are looking for remembered network drives too, have a look at WNetOpenEnum(). |
AW: GetDriveType and DRIVE_REMOTE
GetDriveType works fine to get the network drive in XP.
I got this ![]() Zitat:
FYI, my app use elevation and I uses admin account when mapping drive. |
AW: GetDriveType and DRIVE_REMOTE
Sorry for not noticing your mention of WIN7. My remarks were aimed at the pre-Vista world.
Zitat:
Better you stick to the knowlege base article. It explains quite good, why you get DRIVE_NO_ROOT_DIR instead of DRIVE_REMOTE as a result from GetDriveType(). This is what you are experiencing, I understand. |
Alle Zeitangaben in WEZ +1. Es ist jetzt 11:13 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz