![]() |
Модераторы: Daevaorn |
![]() ![]() ![]() |
|
Garik |
|
|||
Бывалый ![]() Профиль Группа: Участник Клуба Сообщений: 216 Регистрация: 25.3.2002 Где: Москва Репутация: нет Всего: 4 |
Допустим, есть какой-то ярлык, как из него извлечь запускаемый с помощью него файл и рабочую директорию? Хотелось бы чтобы это работало и для pif-файлов...
--------------------
Программист - это не профессия. Это диагноз... |
|||
|
||||
Blade |
|
|||
![]() Шустрый ![]() Профиль Группа: Участник Сообщений: 99 Регистрация: 8.7.2002 Репутация: нет Всего: нет |
Хм, а в чём, собственно говоря, проблема-то? Открой свой .lnk plain text'ом и выдери из него что нужно. Exe-шник и директроия там в конце хранятся...
Или м.б. я чё не так понял... |
|||
|
||||
Vit |
|
|||
![]() Vitaly Nevzorov ![]() ![]() ![]() ![]() Профиль Группа: Экс. модератор Сообщений: 10964 Регистрация: 25.3.2002 Где: Chicago Репутация: нет Всего: 207 |
В Shell32.dll зашиты все нужные тебе функции...
-------------------- With the best wishes, Vit I have done so much with so little for so long that I am now qualified to do anything with nothing Самый большой Delphi FAQ на русском языке здесь: www.drkb.ru |
|||
|
||||
Garik |
|
|||
Бывалый ![]() Профиль Группа: Участник Клуба Сообщений: 216 Регистрация: 25.3.2002 Где: Москва Репутация: нет Всего: 4 |
Blade, обычным текстовиком не хочется открывать, т.к. есть стандартные функции для этого.
Vit, вот только какие ![]() --------------------
Программист - это не профессия. Это диагноз... |
|||
|
||||
Vit |
|
|||
![]() Vitaly Nevzorov ![]() ![]() ![]() ![]() Профиль Группа: Экс. модератор Сообщений: 10964 Регистрация: 25.3.2002 Где: Chicago Репутация: нет Всего: 207 |
The FindExecutable function retrieves the name and handle to the executable (.EXE) file associated with the specified filename.
HINSTANCE FindExecutable( LPCTSTR lpFile, // pointer to string for filename LPCTSTR lpDirectory, // pointer to string for default directory LPTSTR lpResult // pointer to buffer for string for executable file on return ); Parameters lpFile Pointer to a null-terminated string specifying a filename. This can be a document or executable file. lpDirectory Pointer to a null-terminated string specifying the default directory. lpResult Pointer to a buffer to receive the filename when the function returns. This filename is a null-terminated string specifying the executable file started when an "open" association is run on the file specified in the lpFile parameter. Return Values If the function succeeds, the return value is greater than 32. If the function fails, the return value is less than or equal to 32. The following table lists the possible error values: Value Meaning 0 The system is out of memory or resources. 31 There is no association for the specified file type. ERROR_FILE_NOT_FOUND The specified file was not found. ERROR_PATH_NOT_FOUND The specified path was not found. ERROR_BAD_FORMAT The .EXE file is invalid (non-Win32 .EXE or error in .EXE image). Remarks When FindExecutable returns, the lpResult parameter may contain the path to the DDE server started if no server responds to a request to initiate a DDE conversation. See Also -------------------- With the best wishes, Vit I have done so much with so little for so long that I am now qualified to do anything with nothing Самый большой Delphi FAQ на русском языке здесь: www.drkb.ru |
|||
|
||||
Garik |
|
|||
Бывалый ![]() Профиль Группа: Участник Клуба Сообщений: 216 Регистрация: 25.3.2002 Где: Москва Репутация: нет Всего: 4 |
Спасибо большое! Буду экспериментировать.
--------------------
Программист - это не профессия. Это диагноз... |
|||
|
||||
![]() ![]() ![]() |
Правила форума "С++:Общие вопросы" | |
|
Добро пожаловать!
Если Вам понравилась атмосфера форума, заходите к нам чаще! С уважением, Earnest Daevaorn |
0 Пользователей читают эту тему (0 Гостей и 0 Скрытых Пользователей) | |
0 Пользователей: | |
« Предыдущая тема | C/C++: Общие вопросы | Следующая тема » |
|
По вопросам размещения рекламы пишите на vladimir(sobaka)vingrad.ru
Отказ от ответственности Powered by Invision Power Board(R) 1.3 © 2003 IPS, Inc. |