Date: Thu, 13 May 1999 16:00:13 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: "Edward F. Sowell" cc: djgpp AT delorie DOT com Subject: Re: GetShortPathName() or DLL support In-Reply-To: <3739CF78.2D94EFE1@home.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk 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.