![]() |
|
|
![]()
|
|
| szz |
|
|||
![]() Эксперт ![]() ![]() ![]() Профиль Группа: Завсегдатай Сообщений: 1289 Регистрация: 31.5.2005 Где: Moscow, Jerusalem Репутация: 1 Всего: 33 |
Я пишу гуи-программу (стандартная Application), a запустить ее нужно через командную строку, присем чтоб ей передались аргументы, например
Project1.exe argument1 argument2 но так как функции main(int argc, char **argv) нету, то я не знаю как получить эти параметры. Помогите!!! --------------------
|
|||
|
||||
| Aleksandor |
|
|||
|
Практик ![]() ![]() Профиль Группа: Участник Сообщений: 272 Регистрация: 22.11.2005 Где: россия, зеленогра д Репутация: нет Всего: 12 |
ANSI console processes written in C can use the argc and argv arguments of the main function to access the command-line arguments. ANSI GUI applications can use the lpCmdLine parameter of the WinMain function to access the command-line string, excluding the program name. The reason that main and WinMain cannot return Unicode strings is that argc, argv, and lpCmdLine use the LPSTR data type for parameters, not the LPTSTR data type. The GetCommandLine function can be used to access Unicode strings, because it uses the LPTSTR data type.
To convert the command line to an argv style array of strings, call the CommandLineToArgvW function. Note The name of the executable in the command line that the operating system provides to a process is not necessarily identical to that in the command line that the calling process gives to the CreateProcess function. The operating system may prepend a fully qualified path to an executable name that is provided without a fully qualified path. -------------------- Call out Gouranga be happy!!! Gouranga Gouranga Gouranga .... That which brings the highest happiness!! |
|||
|
||||
| szz |
|
|||
![]() Эксперт ![]() ![]() ![]() Профиль Группа: Завсегдатай Сообщений: 1289 Регистрация: 31.5.2005 Где: Moscow, Jerusalem Репутация: 1 Всего: 33 |
То что надо, сапсибо!
--------------------
|
|||
|
||||
![]()
|
| Правила форума "С++ Builder" | |
|
|
Запрещается! 1. Публиковать ссылки на вскрытые компоненты 2. Обсуждать взлом компонентов и делиться вскрытыми компонентами
Если Вам понравилась атмосфера форума, заходите к нам чаще! С уважением, Rrader. |
| 0 Пользователей читают эту тему (0 Гостей и 0 Скрытых Пользователей) | |
| 0 Пользователей: | |
| « Предыдущая тема | C++ Builder | Следующая тема » |
|
|
По вопросам размещения рекламы пишите на vladimir(sobaka)vingrad.ru
Отказ от ответственности Powered by Invision Power Board(R) 1.3 © 2003 IPS, Inc. |