www.digitalmars.com         C & C++   DMDScript  

c++.dos.32-bits - LFN the Hard Way

reply "Kenneth Roger" <kennethroger prodigy.net> writes:
The attached zip file contains
  klrlfn.i
  test.c
  d.c
  sd.c

The include file, klrlfn.i, contains functions which allow
dos32 programs to use long filenames when running in a dos
box under windows (and when x32 leaves some dos memory
available).  Functions available are
  lfnfindfirst
  lfnfindnext
  lfnfindclose
  getshortpath
  getlongpath
  lfnrename
  lfnfopen

Since x32 doesn't translate protected mode int 71h,
copying to and from dos memory is implemented.

The c files are demos.

P.S.  The Digital Mars CD is pretty enough to hang on the
wall (using a backup copy is allowed).



begin 666 lfndos32.zip
M4$L#!!0````(`-NT=2NL4=NHVP```' !```&`!$`=&5S="YC550-``=^G?P[
M +#\.SVN_#MUCL%*`S$0AN^!O,.0(J1EV4.O5F$/% L5!'L0K(>XF33!=+(F
MT1Z*[VZS:VM[\!*2___FFXP<M?Y3(\Q2UB[4]I:ST3$3[SYZ0[43G''V%9R&
MK7(DQYP![,LQ7RSO8&*NR[VU* *I+;X\-,^/S>K^]3*>EOSIKS W![<)'9(4
M'_4.8Q:5V(GQ4+8^))1F>'714392-&"<Q]ZF89 !JQ*\(1*T$55&7:_IU['!
MG&R(N5/9ROX'U7'1I79E$7H2"EI(< FNTL%4]7,GGP^T.>G.NW-5 ?XQ#? W
M9S]02P,$% ```` `U*YU*^)-P/."` ```P4```,`$0!D+F-55 T`!R"3_#N 
ML/P[0*[\.V54VV[:0!!]C\0_#*X"NV"(C<)+C5/10I1()*J:5&V%K<BQUW 5
MLW:\2Y(J[;]W+S;E\ +#[)ESYLK9&23#V(:TJ&!&5U1$.=Q$%8<-2T %/RA+
MBE?>.FF=?* LSC<) 0D7"2V&V<6^KZ)L=>!,"GX$2W+ZN.^TGO(J3]F06EHF
M(2EE!&ZF/V'D.,H59U$%O8SD)?A ;7BT(A\!$B CD2V#(*4YX26)0P`8#' F
M\P7M`[0I013 GH.BX#A EE?3<1'%3TLI$B[=<> I&<H$/,?K$L4%X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<O9P9$!PV#F>YP,Z1*AR9HQP*3\CQL_OBK(7PP]$J*S4`K+1*O8X#
M?F N>"[T/ '\NN]U+P-6:OI<PNS$<ZYJ#SG3Y3$-1;2W+V2:I-J&EO[G3<<M
M]?;:]=RPLA$W^U[=.^H+1R'E+P96D;6 43/&*!A%6"4VEPU^?$VG<0BR79L;
M;EC3/%=9'S1"5LCK5F E=O!TNU+HIFH3"-$[M?_\F5[=B/;_DI=L6. W5H6?
M+XUFJV1V!6+9E]3&)?2QPF#)E1Q^1GC:M:V"<,;POF_0=FO0?F**SS[D'U!+
M`0(7"Q0````(`-NT=2NL4=NHVP```' !```&``D```````$`( "V 0````!T
M97-T+F-55 4`!WZ=_#M02P$"%PL4````" #4KG4KXDW \X("```#!0```P`)
M```````!`" `MH$0`0``9"YC550%``< D_P[4$L!`A<+% ```` `H+UU*U78
M!CZ)` ``. 4```0`"0```````0` `+:!Q ,``'-D+F-55 4`!_RL_#M02P$"
M%PL4````" !LO'4KXFHKH9\&``!S& ``" `)```````!`" `MH& ! ``:VQR
M;&9N+FE55 4`![RJ_#M02P$"%PL4````" !0`78K(E7CAV !``!A` ``" `)
M```````!`" `MH%6#0``<F5A9&UE+G1X=%54!0`'^++\.U!+!08`````!0`%
+`#(!``#O# ``````
`
end
Nov 22 2001
next sibling parent "Walter" <walter digitalmars.com> writes:
"Kenneth Roger" <kennethroger prodigy.net> wrote in message
news:9tic9k$1c8s$1 digitaldaemon.com...
 The attached zip file contains
   klrlfn.i
   test.c
   d.c
   sd.c

 The include file, klrlfn.i, contains functions which allow
 dos32 programs to use long filenames when running in a dos
 box under windows (and when x32 leaves some dos memory
 available).  Functions available are
   lfnfindfirst
   lfnfindnext
   lfnfindclose
   getshortpath
   getlongpath
   lfnrename
   lfnfopen

 Since x32 doesn't translate protected mode int 71h,
 copying to and from dos memory is implemented.

 The c files are demos.
Thanks!
 P.S.  The Digital Mars CD is pretty enough to hang on the
 wall (using a backup copy is allowed).
My intention was for it to be attractive as a decoration! Thanks for letting me know that you enjoy it. And yes, feel free to make as many personal backup copies as you want.
Nov 22 2001
prev sibling parent E. Trelmar <E._member pathlink.com> writes:
In article <9tic9k$1c8s$1 digitaldaemon.com>, Kenneth Roger says...
The attached zip file contains
  klrlfn.i
  test.c
  d.c
  sd.c

The include file, klrlfn.i, contains functions which allow
dos32 programs to use long filenames when running in a dos
box under windows (and when x32 leaves some dos memory
available).  Functions available are
  lfnfindfirst
  lfnfindnext
  lfnfindclose
  getshortpath
  getlongpath
  lfnrename
  lfnfopen

Since x32 doesn't translate protected mode int 71h,
copying to and from dos memory is implemented.

The c files are demos.

P.S.  The Digital Mars CD is pretty enough to hang on the
wall (using a backup copy is allowed).
Don't suppose there's the possibility of adding an lfnsopen function to the header file? The lfnfopen is great, but something that works with share would be even better.
Jul 18 2002