Mail Archives: djgpp/1999/05/13/09:02:36
On Wed, 12 May 1999, Edward F. Sowell wrote:
> MFC has a GetShortPathName() function that, obviously, converts a
> path with long file names, spaces, etc to the 8.3 format. This is
> often needed because some functions don't accept the funny file
> names... e.g., spawnxx().
You don't need this in DJGPP: when you call `spawnXX', the DJGPP
version automatically converts the long file name to the short one
before passing it to DOS.
> Is there an equivalent for DJGPP?
Not directly. I think such a function is not needed; I never heard
about a use that would require a library function. Do you know any
reason for it (`spawnXX' doesn't need it, as I explained above)?
If you really need such a function, use `__dpmi_int' to call function
7160h of Interrupt 21h with the value 1 in the CX register. See Ralf
Brown's Interrupt List for the gory details.
> If not, can I link to a DLL (or static lib) created with MSVC++ that
> provides a C function wrapper for the MFC GetShortPathName?
DOS programs cannot call functions from DLLs, because Microsoft
doesn't want DOS programs to access useful features of Windows.
- Raw text -