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

Вниз

AttachConsole - как вызвать?   Найти похожие ветки 

 
kay ©   (2006-10-15 12:58) [0]

Какой юнит необходимо добавить, чтобы можно было вызывать эту функцию?
уже используются модули TlHelp32 и Windows, но функция не вызывается:
[Error] main.pas(566): Undeclared identifier: "attachconsole"


 
Орион ©   (2006-10-15 13:06) [1]

AllocConsole


 
ors_archangel ©   (2006-10-15 15:39) [2]

Орион, нет, именно Attach - присоединяемся к другой консоли
Дело в том, что Борландцы-молодцы не любят включать в Windows.pas что-нить, что не идёт под W98, даже динамически, поэтому никакого модуля (стандартного) нет, сам пиши


 
Орион ©   (2006-10-15 15:41) [3]

AttachConsole

Attaches the calling process to the console of the specified process.

BOOL WINAPI AttachConsole(
 DWORD dwProcessId
);


Parameters
dwProcessId
[in] Identifier of the process. This parameter can be following value.
Value Meaning
ATTACH_PARENT_PROCESS
(DWORD)-1 Identifies the console of the parent of the current process as the console to be attached.
Return Value

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero. To get extended error information, call GetLastError.
Remarks

The calling application can call any of the console functions. For example, a graphical application can use the console to display debugging output.

A process can be attached to one console. If the calling process is already attached to a console, AttachConsole fails with ERROR_ACCESS_DENIED.

A process can use the FreeConsole function to detach itself from its console. If other processes share the console, the console is not destroyed, but the process that called FreeConsole cannot refer to it. A console is closed when the last process attached to it terminates or calls FreeConsole.

To compile an application that uses this function, define _WIN32_WINNT as 0x0500 or later. For more information, see Using the SDK Headers.
Requirements
Client Requires Windows Vista or Windows XP.
Server Requires Windows Server "Longhorn" or Windows Server 2003.
Header

Declared in Wincon.h; include Windows.h.
Library

Use Kernel32.lib.
DLL Requires Kernel32.dll.


 
Орион ©   (2006-10-15 15:42) [4]

> [0] kay ©   (15.10.06 12:58)

надеюсь [3] тебе достаточно?


 
Ketmar ©   (2006-10-15 18:45) [5]

есть джедаи. а в них, кажется, очень много вкусного. %-)



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

Форум: "WinAPI";
Текущий архив: 2007.02.25;
Скачать: [xml.tar.bz2];

Наверх





Память: 0.45 MB
Время: 0.049 c
8-1151581381
пигмалеон
2006-06-29 15:43
2007.02.25
очистить прозрачный canvas


15-1170264009
Piroxyline
2007-01-31 20:20
2007.02.25
"Назад в будущее"


2-1170746474
Grover
2007-02-06 10:21
2007.02.25
Использование dll


4-1161024235
spok
2006-10-16 22:43
2007.02.25
Процесс от имени другого юзера - как? (почему не работает?)


8-1139572607
DelphiMangler
2006-02-10 14:56
2007.02.25
Распознавание изображения на картинке (текст, цифры)





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
Английский Французский Немецкий Итальянский Португальский Русский Испанский