get_short_path_name


template <class character>
unsigned get_short_path_name(const character* long_path,
                             character* short_path,
                             unsigned size)

This function obtains the short name of a file.

Parameters

const character* long _path

A pointer to the long name for the file.

character* short_path

A pointer to a buffer to hold the short name of the file.

unsigned size

The size of the buffer pointed to by the previous parameter.

Return

unsigned

If the specified buffer size was adequate, the value returned is the number of characters transferred to the buffer (not including the null). If the specified buffer size was inadequate, the value returned is the buffer size (in characters) required to hold the short path name.

If this function fails, zero is returned.