Call for testers: UPXINFO version 04-AUG-2008 (Miscellaneous)
> Yes, and I'm already doing this for some parts of the source code.
> What's a safe way to detect, if LFNs are available?
FPC's way (system unit)
function CheckLFN:boolean;
var
regs : TRealRegs;
RootName : pchar;
begin
{ Check LFN API on drive c:\ }
RootName:='C:\';
syscopytodos(longint(RootName),strlen(RootName)+1);
{ Call 'Get Volume Information' ($71A0) }
regs.realeax:=$71a0;
regs.reales:=tb_segment; //seg(rootname)
regs.realedi:=tb_offset; // ofs(rootname);
regs.realecx:=32;
regs.realds:=tb_segment; //seg(rootname)
regs.realedx:=tb_offset; //ofs(rootname)
regs.realflags:=carryflag;
sysrealintr($21,regs);
{ If carryflag=0 and LFN API bit in ebx is set then use Long file names }
CheckLFN:=(regs.realflags and carryflag=0) and (regs.realebx and $4000=$4000);
end;
Note that there are 32-bitisms( copytodos, sysrealintr instead of dos() and real(e) prefixes of registers), but that should be easy to remedy.
Maybe this should be combined with a drive check first (in case C:\ is not valid? like iirc an IDE zipdisk and a shell command to another drive can have this?)
Complete thread:
- Call for testers: UPXINFO version 04-AUG-2008 - rr, 04.08.2008, 15:54 (Miscellaneous)
- Call for testers: UPXINFO version 04-AUG-2008 - ecm, 04.08.2008, 22:53
- Call for testers: UPXINFO version 04-AUG-2008 - rr, 05.08.2008, 08:37
- Call for testers: UPXINFO version 04-AUG-2008 - Rugxulo, 04.08.2008, 23:16
- Call for testers: UPXINFO version 04-AUG-2008 - rr, 05.08.2008, 08:31
- Call for testers: UPXINFO version 04-AUG-2008 - Rugxulo, 05.08.2008, 09:57
- Call for testers: UPXINFO version 04-AUG-2008 - rr, 05.08.2008, 10:37
- Call for testers: UPXINFO version 04-AUG-2008 - ecm, 05.08.2008, 12:22
- Call for testers: UPXINFO version 04-AUG-2008 - rr, 05.08.2008, 13:34
- Call for testers: UPXINFO version 04-AUG-2008 - marcov, 05.08.2008, 15:50
- Call for testers: UPXINFO version 04-AUG-2008 - rr, 05.08.2008, 15:54
- Call for testers: UPXINFO version 04-AUG-2008 - ecm, 05.08.2008, 20:48
- Call for testers: UPXINFO version 04-AUG-2008 - marcov, 05.08.2008, 15:50
- Call for testers: UPXINFO version 04-AUG-2008 - rr, 05.08.2008, 13:34
- Call for testers: UPXINFO version 04-AUG-2008 - marcov, 05.08.2008, 15:43
- Call for testers: UPXINFO version 04-AUG-2008 - rr, 05.08.2008, 15:51
- Call for testers: UPXINFO version 04-AUG-2008 - marcov, 06.08.2008, 13:23
- Call for testers: UPXINFO version 04-AUG-2008 - rr, 05.08.2008, 15:51
- Call for testers: UPXINFO version 04-AUG-2008 - Rugxulo, 06.08.2008, 00:53
- Call for testers: UPXINFO version 04-AUG-2008 - ecm, 06.08.2008, 03:43
- Call for testers: UPXINFO version 04-AUG-2008 - rr, 06.08.2008, 09:25
- Call for testers: UPXINFO version 04-AUG-2008 - ecm, 05.08.2008, 12:22
- Call for testers: UPXINFO version 04-AUG-2008 - rr, 05.08.2008, 10:37
- Call for testers: UPXINFO version 04-AUG-2008 - Rugxulo, 05.08.2008, 09:57
- Call for testers: UPXINFO version 04-AUG-2008 - Rugxulo, 07.08.2008, 17:03
- Call for testers: UPXINFO version 04-AUG-2008 - rr, 07.08.2008, 17:17
- Call for testers: UPXINFO version 04-AUG-2008 - Rugxulo, 12.08.2008, 07:18
- Call for testers: UPXINFO version 04-AUG-2008 - rr, 12.08.2008, 09:19
- Call for testers: UPXINFO version 04-AUG-2008 - Rugxulo, 14.08.2008, 04:23
- Call for testers: UPXINFO version 04-AUG-2008 - rr, 14.08.2008, 15:37
- Call for testers: UPXINFO version 04-AUG-2008 - marcov, 14.08.2008, 15:42
- Call for testers: UPXINFO version 04-AUG-2008 - rr, 14.08.2008, 16:36
- Call for testers: UPXINFO version 04-AUG-2008 - marcov, 16.08.2008, 01:03
- Call for testers: UPXINFO version 04-AUG-2008 - Steve, 16.08.2008, 08:53
- Call for testers: UPXINFO version 04-AUG-2008 - marcov, 16.08.2008, 01:03
- Call for testers: UPXINFO version 04-AUG-2008 - rr, 14.08.2008, 16:36
- Call for testers: UPXINFO version 04-AUG-2008 - marcov, 14.08.2008, 15:42
- Call for testers: UPXINFO version 04-AUG-2008 - rr, 14.08.2008, 15:37
- Call for testers: UPXINFO version 04-AUG-2008 - Rugxulo, 14.08.2008, 04:23
- Call for testers: UPXINFO version 04-AUG-2008 - rr, 12.08.2008, 09:19
- Call for testers: UPXINFO version 04-AUG-2008 - Rugxulo, 12.08.2008, 07:18
- Call for testers: UPXINFO version 04-AUG-2008 - rr, 07.08.2008, 17:17
- Call for testers: UPXINFO version 04-AUG-2008 - rr, 05.08.2008, 08:31
- Call for testers: UPXINFO version 04-AUG-2008 - DOS386, 20.08.2008, 08:15
- Call for testers: UPXINFO version 04-AUG-2008 - rr, 20.08.2008, 10:03
- Call for testers: UPXINFO version 04-AUG-2008 - ecm, 20.08.2008, 16:54
- Call for testers: UPXINFO - DOS386, 28.08.2008, 05:45
- Call for testers: UPXINFO - rr, 28.08.2008, 09:37
- Call for testers: UPXINFO - Rugxulo, 28.08.2008, 10:36
- UPXINFO | incredible - DOS386, 10.09.2008, 02:01
- UPXINFO | incredible - rr, 10.09.2008, 11:50
- XPYDERZ - Rugxulo, 11.09.2008, 09:14
- UPXINFO | incredible - rr, 10.09.2008, 11:50
- UPXINFO | incredible - DOS386, 10.09.2008, 02:01
- Call for testers: UPXINFO - Rugxulo, 28.08.2008, 10:36
- Call for testers: UPXINFO - rr, 28.08.2008, 09:37
- Call for testers: UPXINFO version 04-AUG-2008 - Steve, 20.08.2008, 13:36
- Call for testers: UPXINFO version 04-AUG-2008 - Rugxulo, 20.08.2008, 22:16
- Call for testers: UPXINFO version 04-AUG-2008 - rr, 21.08.2008, 22:39
- Call for testers: UPXINFO version 04-AUG-2008 - Rugxulo, 22.08.2008, 07:25
- Call for testers: UPXINFO version 04-AUG-2008 - rr, 22.08.2008, 12:56
- Call for testers: UPXINFO version 04-AUG-2008 - Rugxulo, 22.08.2008, 07:25
- Call for testers: UPXINFO version 04-AUG-2008 - rr, 21.08.2008, 22:39
- Call for testers: UPXINFO version 04-AUG-2008 - rr, 20.08.2008, 10:03
- Call for testers: UPXDUMP version 26-AUG-2008 - rr, 26.08.2008, 22:51
- Call for testers: UPXDUMP version 26-AUG-2008 - Rugxulo, 28.08.2008, 04:50
- Call for testers: UPXDUMP version 26-AUG-2008 - rr, 28.08.2008, 09:38
- Call for testers: UPXDUMP version 26-AUG-2008 - Rugxulo, 28.08.2008, 04:50
- Call for testers: UPXINFO version 04-AUG-2008 - ecm, 04.08.2008, 22:53