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


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['!

M9S]02P,$% ```` `U*YU*^)-P/."` ```P4```,`$0!D+F-55 T`!R"3_#N 


MBE?>.FF=?* LSC<) 0D7"2V&V<6^KZ)L=>!,"GX$2W+ZN.^TGO(J3]F06EHF

M\P7M`[0I013 GH.BX#A EE?3<1'%3TLI$B[=<> I&<H$/,?K$L4%XP)>"II 

M]LLR_,^KWJD-3.?H.YI!(W7!,N>OT_NK4+NE]B86(-MW>7T[ UZ:/FH_39%2
MF(RP L3E;Z1B;6MHF81(SHGZKA5U0%.'3L<-;>OLDX5]W\'P#J6<KDB1F 'V

MU$4$ =6P[_E[PYZU)RN[X<O6R'U*4EIQ S.(UTQN"$(2T?9OOR\6N--!IN$3
MV>#CY-H*.KA(TX=(R#X]=M#E]&%V_6W^Y8\TKJYGL_FMLA;3S_.%,NY^W=W/


MY>[2B7GU:+]_U%3:Z;01/1UCO!758 ;0N$X'[IA;MND&/5JL^DQ\-;8=&BZ*
M$DX3R.F:"LEJJW=OYVR=YC+_`5!+`P04````" " O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H3"-$[M?_\F5[=B/;_DI=L6. W5H6?

M`0(7"Q0````(`-NT=2NL4=NHVP```' !```&``D```````$`( "V 0````!T
M97-T+F-55 4`!WZ=_#M02P
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` ``" `)


`
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