DeviceInfo (Kernel)

Retrieves information about the computer’s devices.
DeviceInfo(diGET_DEVICE thePath outBuffer)

Obtains the drive letter from a directory string. It evaluates the specified path and writes it’s drive letter to strBuf.

Parameters:
  • thePath (string) – A directory string.
  • buffer (string) – A buffer in which to write the drive letter.
Returns:

a pointer to the end of the string written to outBuffer (the index of the NULL terminating character).

Example:

(procedure (Foo &tmp [buffer 3])
        (DeviceInfo diGET_DEVICE "C:\scistudio" @buffer)
        (Print @strBuf) ; Prints "C:"
)
DeviceInfo(diGET_CURRENT_DEVICE thePath outBuffer)

Obtains the drive letter the current path and and writes it to strBuf.

Parameters:
  • thePath (string) – A directory string.
  • buffer (string) – A buffer in which to write the drive letter.
Returns:

a pointer to the end of the string written to outBuffer (the index of the NULL terminating character).

Example:

(procedure (Foo &tmp [buffer 3])
        (DeviceInfo diGET_CURRENT_DEVICE @buffer)
        (Print @strBuf) ; Prints "C:", "D:", or whatever the current drive is
)
DeviceInfo(diPATHS_EQUAL path1 path2)

Compares path1 and path2. If they both point to the same physical location, it returns TRUE, otherwise, FALSE.

Parameters:
  • path1 (string) – The first path.
  • path2 (string) – The second path.
Returns:

TRUE if both paths point to the same physical location.

Example:

if (DeviceInfo diPATHS_EQUAL @aPath "C:\scistudio")
{
        (Print "The paths are equal")
}
DeviceInfo(diIS_FLOPPY thePath)

Checks the specified drive letter to see if it’s a floppy or not, returning TRUE or FALSE.

Parameters:thePath (string) – A path with a drive letter.
Returns:TRUE if the drive letter is a floppy drive.

Example:

DeviceInfo(diIS_FLOPPY "A:") // returns TRUE
DeviceInfo(diIS_FLOPPY "C:") // returns FALSE
DeviceInfo(command)

It is unknown what this does.

Example:

(DeviceInfo 4)