System.Shell.drive method

[ The Windows Gadget Platform/Sidebar is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions. ]

Retrieves a System.Shell.Drive object that represents the specified drive.

Syntax

retVal = System.Shell.drive(
  strDrive
)

Parameters

strDrive [in]

String that represents the drive letter of the system storage device.

Note

A valid drive specification is constrained to one of the following formats: C, C:, or C:\.

Return value

System.Shell.Drive that represents the specified drive, or null if the specified drive is not valid.

Examples

The following example demonstrates how to assiciate a System.Shell.Drive object with the C: drive.

// Create a System.Shell.Drive object.
function GetADrive()
{
    var oDrive = System.Shell.drive("C:");
}

Requirements

Minimum supported client
Windows Vista [desktop apps only]
Minimum supported server
Windows Server 2008 [desktop apps only]
End of client support
Windows 7
End of server support
Windows Server 2008
IDL
Sidebar.idl
DLL
Sidebar.Exe (version 1.00 or later)

See also

System.Shell

System.Shell.Drive