Главная страница
    Top.Mail.Ru    Яндекс.Метрика
Форум: "Основная";
Текущий архив: 2002.08.08;
Скачать: [xml.tar.bz2];

Вниз

Получение короткого имени файла   Найти похожие ветки 

 
DeMoN-777   (2002-07-29 09:30) [0]

Помню что была какая-то стандартная функция получения короткого имени файла по длинному вот только как пишется забыл =(.
Мастера помогите кто помнит.


 
Song   (2002-07-29 09:34) [1]

GetShortPathName()


 
MBo   (2002-07-29 09:37) [2]

получения- Get короткого-Short имени файла name,Path
GetShortPathName ;)


 
Lord Warlock   (2002-07-29 09:37) [3]

а если попроще, то ExtractShortPathName


 
DeMoN-777   (2002-07-29 09:39) [4]

ТОЧНЯК, СПАСИБО SONG

The GetShortPathName function obtains the short path form of a specified input path.

DWORD GetShortPathName(

LPCTSTR lpszLongPath, // points to a null-terminated path string
LPTSTR lpszShortPath, // points to a buffer to receive the null-terminated short form of the path
DWORD cchBuffer // specifies the size of the buffer pointed to by lpszShortPath
);


Parameters

lpszLongPath

Points to a null-terminated path string. The function obtains the short form of this path.

lpszShortPath

Points to a buffer to receive the null-terminated short form of the path specified by lpszLongPath.

cchBuffer

Specifies the size, in characters, of the buffer pointed to by lpszShortPath.



Return Values

If the function succeeds, the return value is the length, in characters, of the string copied to lpszShortPath, not including the terminating null character.
If the function fails due to the lpszShortPath buffer being too small to contain the short path string, the return value is the size, in characters, of the short path string. You need to call the function with a short path buffer that is at least as large as the short path string.
If the function fails for any other reason, the return value is zero. To get extended error information, call GetLastError.

Remarks

When an application calls this function and specifies a path on a volume that does not support 8.3 aliases, the function fails with ERROR_INVALID_PARAMETER if the path is longer than 67 bytes.
The path specified by lpszLongPath does not have to be a fully qualified path or a long path. The short form may be longer than the specifed path.
If the specified path is already in its short form, there is no need for any conversion, and the function simply copies the specified path to the buffer for the short path.

You can set lpszShortPath to the same value as lpszLongPath; in other words, you can set the buffer for the short path to the address of the input path string.



Страницы: 1 вся ветка

Форум: "Основная";
Текущий архив: 2002.08.08;
Скачать: [xml.tar.bz2];

Наверх





Память: 0.45 MB
Время: 0.007 c
1-24006
Faun
2002-07-28 07:09
2002.08.08
CreateParented и скроллинг


1-24046
Kviz
2002-07-25 20:06
2002.08.08
Народ, ПОМОГИТЕ!!! Как узнать какие параметры при запуске проге были заданы и присвоить их все в строковую переменную. Ну, типа прога наша “delphi.exe”, юзверь его запустит “delphi.exe rulez, rulez and rulez” мне нужно, чтобы прога переменной “s” пр


14-24222
Oleg_Gashev
2002-07-14 03:03
2002.08.08
Favorites


14-24214
Сатир
2002-07-12 14:14
2002.08.08
Вынь2К und Солярка


1-24016
anod
2002-07-28 18:27
2002.08.08
Invalid pointer operation





Afrikaans Albanian Arabic Armenian Azerbaijani Basque Belarusian Bulgarian Catalan Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Estonian Filipino Finnish French
Galician Georgian German Greek Haitian Creole Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian
Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Thai Turkish Ukrainian Urdu Vietnamese Welsh Yiddish Bengali Bosnian
Cebuano Esperanto Gujarati Hausa Hmong Igbo Javanese Kannada Khmer Lao Latin Maori Marathi Mongolian Nepali Punjabi Somali Tamil Telugu Yoruba
Zulu
Английский Французский Немецкий Итальянский Португальский Русский Испанский