Types which automatically switch between ANSI and Unicode strings.
tstr &key length
lpctstr &key max-length
lptstr &key max-length
tstr is an ANSI/Unicode string.
lpctstr is a reference-pass pointer to ANSI/Unicode string.
lptstr is a reference (in/out) pointer to an ANSI/Unicode string.
Each of these three types automatically switch between ANSI and Unicode, which makes them ideal for use with the
:dbcs encoding option in
GetDriveTypeA on Windows ME, and
GetDriveTypeW on supported versions of Windows.
The argument is passed as ANSI or Unicode respectively:
(fli:define-foreign-function (%get-drive-type "GetDriveType" :dbcs)
:result-type (:unsigned :int))
#(:unknown :none :removable :fixed :remote :cdrom :ramdisk))
(defun get-drive-information (drive)
(the drive-type (svref +drive-types+ (%get-drive-type drive))))
LispWorks User Guide and Reference Manual - 13 Feb 2015