The PBLFN unit by Hans Lunsing provides simple access to long filenames
(LFNs) to your PB/DOS programs. Unfortunately, it doesn't work in many
cases where it could, due to checking for a short list of known OSes
that have LFN support. I've put together a replacement for the key "check"
function, allowing PBLFN to handle long filenames under any OS that
provides DOS-level LFN support. Donated to the Public Domain.
Use this to replace the original LfnSupported3 function in LNGFNAM2.BAS,
then recompile the unit and any programs that use it.
------------------
Tom Hanlin
PowerBASIC Staff
(LFNs) to your PB/DOS programs. Unfortunately, it doesn't work in many
cases where it could, due to checking for a short list of known OSes
that have LFN support. I've put together a replacement for the key "check"
function, allowing PBLFN to handle long filenames under any OS that
provides DOS-level LFN support. Donated to the Public Domain.
Use this to replace the original LfnSupported3 function in LNGFNAM2.BAS,
then recompile the unit and any programs that use it.
Code:
FUNCTION LfnSupported3 () PRIVATE AS INTEGER DIM fGotLFN AS INTEGER DIM Buffer AS STRING DIM pBuffer AS STRING PTR Buffer = STRING$(%MAX_PATH, 0) pBuffer = STRPTR32(Buffer) ASM mov ax, &H7147 ; get current directory ASM xor dx, dx ; ...on current drive ASM push ds ; (to see if LFN support works) ASM push si ASM lds si, pBuffer ASM stc ASM int &H21 ASM pop si ASM pop ds ASM mov ax, 0 ASM cmc ASM sbb ax, 0 ASM mov fGotLFN, ax FUNCTION = fGotLFN END FUNCTION
Tom Hanlin
PowerBASIC Staff
Comment