ISDBDeviceList::DriveLetterIndex: Difference between revisions
		
		
		
		Jump to navigation
		Jump to search
		
No edit summary  | 
				No edit summary  | 
				||
| Line 7: | Line 7: | ||
===Property description===  | ===Property description===  | ||
Returns the drive letter as the ASCII decimal value.  | |||
See example below:  | |||
===Example===  | |||
<source lang="vb">  | |||
Option Explicit  | |||
Dim Devices : Set Devices = SDB.Device.ActiveDeviceList("VID_04E8&PID_6860")  | |||
Dim i : i = 0   | |||
For i = 0 To Devices.Count-1  | |||
  Dim DriveLetter : DriveLetter = "?"  | |||
  If Devices.DriveLetterIndex(i) > -1 Then  | |||
    DriveLetter = Chr(Devices.DriveLetterIndex(i)+64)  | |||
  End If  | |||
Next  | |||
</source>  | |||
Latest revision as of 10:32, 15 March 2013
CoClass SDBDeviceList, Interface ISDBDeviceList
Property Get DriveLetterIndex(Index As Long) As Long
Parameters
| Name | Type | Description | 
|---|---|---|
| Index | Long | 
Property description
Returns the drive letter as the ASCII decimal value.
See example below:
Example
Option Explicit
  
Dim Devices : Set Devices = SDB.Device.ActiveDeviceList("VID_04E8&PID_6860")
Dim i : i = 0 
For i = 0 To Devices.Count-1
  Dim DriveLetter : DriveLetter = "?"
  If Devices.DriveLetterIndex(i) > -1 Then
    DriveLetter = Chr(Devices.DriveLetterIndex(i)+64)
  End If
Next