Re: [Re2] Long and short filename by DIR

new topic     » topic index » view thread      » older message » newer message

> ----- Original Message -----
> From: "Gilbert Lemaitre" <lemaitre at adfi.ucl.ac.be>

> > I need both name in my programs. How can I get them in WIN32?

Hello again,

You probably should read this, this extends on what I wrote in the prior post.

If a file has a long file name, the complete name appears in the cFileName
field, and the 8.3 format truncated version of
the
name appears in the cAlternateFileName field. Otherwise, cAlternateFileName is
empty. As an alternative, you can use the
GetShortPathName function to find the 8.3 format version of a file name.

DWORD GetShortPathName(
  LPCTSTR lpszLongPath,  // null-terminated path string
  LPTSTR lpszShortPath,  // short form buffer
  DWORD cchBuffer        // size of short form buffer
);

Euman

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu