heapPtr DeviceInfo(diGET_DEVICE,
string thePath, string strBuf)
heapPtr DeviceInfo(diGET_CURRENT_DEVICE, String output)
bool DeviceInfo (diPATHS_EQUAL, String path1, String path2)
bool DeviceInfo(diIS_FLOPPY, String path)
DeviceInfo retreives information about
the computer's devices. It contains four subfunctions. Each function
is accessed by stating it's identifier as the first parameter.
heapPtr DeviceInfo(diGET_DEVICE,
string thePath, string strBuf) |
Obtains the drive letter from
a directory string. It evaluates the specified path and writes
it's drive letter to strBuf. It also returns a pointer to the
end of strBuf (the index of the NULL terminating character).
Example |
(var
strBuf[3])
GetDeviceInfo(diGET_DEVICE "C:\scistudio"
@strBuf)
Print(@strBuf) // Prints "C:"
|
|
heapPtr DeviceInfo(diGET_CURRENT_DEVICE,
string strBuf) |
Obtains the drive letter the current
path and and writes it to strBuf. It also returns a pointer
to the end of strBuf (the index of the NULL terminating character).
Example |
(var
strBuf[3])
GetDeviceInfo(diGET_CURRENT_DEVICE @strBuf)
Print(@strBuf) // Prints "C:", "D:",
or whatever the current drive is
|
|
bool DeviceInfo(diPATHS_EQUAL,
string aPath, string bPath) |
Compares aPath and bPath. If they
both point to the same physical location, it returns TRUE, otherwise,
FALSE.
Example |
(var
aPath[100])
(if(GetDeviceInfo(diPATHS_EQUAL
@aPath "C:\scistudio"))
Print("The paths are equal")
)
|
|
bool DeviceInfo(diIS_FLOPPY,
string thePath, string strBuf) |
Checks the specified drive letter
to see if it's a floppy or not, returning TRUE or FALSE.
Example |
GetDeviceInfo(diIS_FLOPPY
"A:") // returns TRUE
GetDeviceInfo(diIS_FLOPPY "C:") // returns
FALSE
|
|
|