From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
07-22-2004 10:34 AM
07-22-2004 01:05 PM
07-22-2004 01:22 PM
07-22-2004 01:50 PM
07-22-2004 02:02 PM - edited 09-27-2016 12:42 PM
Wiring an empty path should give you the root drives(e.g. A=Floppy, C=Hard Disk, D=CDROM, etc.
(see attached image. Sorry, this is on a Laptop with only a C drive, but I've used it many times on better endowed machines).
07-22-2004 02:20 PM
09-26-2016 03:38 AM
Hi,
Is there any way to read drive names.
Other than drive letters (C,D,E...).
Thanksa & Regards,
Hari.
09-26-2016 03:56 AM
Hello Hari,
You can use .NET calls to get this information.
On .NET versions 4.5 and 4.6 in the System.IO there is a DriveInfo class where you can get all information on the hard drives.
https://msdn.microsoft.com/en-us/library/system.io.driveinfo(v=vs.110).aspx
I have tried to run it on my laptop but on .NET 4.0 you can't create a constructor for the System.IO
09-26-2016 08:24 AM - edited 09-26-2016 08:24 AM
Instead you could run the Windows API function
BOOL WINAPI GetVolumeInformationA( _In_opt_ LPCSTR lpRootPathName, _Out_opt_ LPSTR lpVolumeNameBuffer, _In_ DWORD nVolumeNameSize, _Out_opt_ LPDWORD lpVolumeSerialNumber, _Out_opt_ LPDWORD lpMaximumComponentLength, _Out_opt_ LPDWORD lpFileSystemFlags, _Out_opt_ LPSTR lpFileSystemNameBuffer, _In_ DWORD nFileSystemNameSize );
Not as trivial and simple to implement as calling a .Net node but would work even in Windows NT 4.0 if that was still sold and avoids the .Net version hassles.
09-27-2016 08:56 AM - edited 09-27-2016 08:58 AM
@altenbach wrote:
Wiring an empty path should give you the root drives(e.g. A=Floppy, C=Hard Disk, D=CDROM, etc.
(see attached image. Sorry, this is on a Laptop with only a C drive, but I've used it many times on better endowed machines).
I can't find that vi! (LV 2014)
Oops, replying to a post that was made a decade ago.