LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

getting a drive letter and creating a file

Hi,

in my application i have multiple threads writing to multiple file streams. The drive i am writing to is the MASTER on the Primary IDE channel. i would like to get this drive letter for this hard drive during run time of the application and create the file. is ther any pointers for me to do this?

 

Thanks,

Suni

0 Kudos
Message 1 of 6
(3,134 Views)

Suni,

Have you taken a look at the Utility Library > Directory Utilities > GetDrive() and SetDrive() methods?

 

GetDriveSetDrive.png

 

I believe these are similar to what you are trying to accomplish.

Jared A.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 6
(3,114 Views)

Suni,

why do you want to write to " MASTER on the Primary IDE channel" ? On a modern PC with SATA Ports only there is no such thing any more.  Did you really mean something like "drive, where Windows is installed" ?

0 Kudos
Message 3 of 6
(3,103 Views)

HI,

My system is a PC-104 FORM FACTOR type. The mother board only have IDE channels. There are no SATA connections. I have a CF flash card (as removable storage) installed on the primary IDE as a master.In my application i want to write to this removable CF card then data can be processed by another machine.

Therefore i would like to make sure when i crete file it is on this drive.

 

Thanks,

Suni  

0 Kudos
Message 4 of 6
(3,093 Views)

Isn't it much simpler to store somewhere in a configuration file the drive letter to use?



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 5 of 6
(3,088 Views)

 

Is  that CF card  also used for the Windows installation ? Then I would use  WinAPI GetWindowsDirectory() function to get the path for the Windows Installation and extract the drive letter from that path..
If the the CF card  isn't the Windows drive you might have a look at Volume GUIDs.Searching MSDN for "Volume GUIDs"  shows examples how to  use Volume GUIDs

 

 

0 Kudos
Message 6 of 6
(3,076 Views)