Platform SDK: Win32 API |
Generates an alias (a filename in the 8.3 format) for the specified long filename.
mov ax, 71a8h ; generate short name mov si, seg LongFilename ; see below mov ds, si mov si, offset LongFilename mov di, seg ShortFilename ; see below mov es, di mov di, offset ShortFilename mov dh, ShortNameFormat ; see below mov dl, CharSet ; see below int 21h
Bits | Contents |
---|---|
0–3 | Specifies the character set of the source long filename. |
4–7 | Specifies the character set of the destination alias. |
Specify one of the following values to indicate the character set for the long filename and alias.
Value | Meaning |
---|---|
BCS_WANSI (0) | Windows ANSI character set |
BCS_OEM (1) | Current OEM character set |
BCS_UNICODE (2) | Unicode character set |
Returns the generated alias in the specified buffer if successful.
This function generates the alias using the same algorithm that the system uses with the exception that the returned alias will never have a numeric tail. A numeric tail is appended to the end of an alias and consists of the tilde character (~) followed a number. When the system generates an alias, it may attach a numeric tail if the default alias already exists in the current directory. Because this function does not check the current directory to see if the alias already exists, the returned alias will never have a numeric tail. This service is useful for disk utilities that are trying to establish whether the alias, which seems to be associated with a long filename, is correctly associated.