网站首页  词典首页

请输入您要查询的函数:

 

术语 setstdhandle
释义 SetStdHandle
语法:
C++
BOOL WINAPI SetStdHandle(
__in DWORD nStdHandle,
__in HANDLE hHandle
);
SetStdHandle功能
设置指定的标准设备句柄(标准输入,标准输出或标准错误)。
参数
nStdHandle [in]
标准装置的句柄被设置。此参数可以是下列值之一。
ValueMeaning
STD_INPUT_HANDLE
(DWORD值)- 10The标准输入设备。
STD_OUTPUT_HANDLE
(DWORD值),至11标准输出设备。
STD_ERROR_HANDLE
(DWORD值),第十二标准错误设备。
hHandle [in]
在处理标准的设备。
返回值
如果函数成功,返回值为非零。
如果函数失败,返回值是零。为了获得更多错误信息,调用GetLastError。
备注
标准处理可能是由一对SetStdHandle,呼吁在这种情况下GetStdHandle将返回处理重定向重定向的一个过程。如果标准处理已经被重定向,您可以指定CONIN美元值调用CreateFile函数来获取句柄到控制台的输入缓冲区。同样,您可以指定CONOUT $值获取句柄到控制台的积极屏幕缓冲区。
实例
有关示例,请参阅创建与重定向输入和输出子进程。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinbase.h(头文件:winuser.h)
LibraryKernel32.lib
DLLKernel32.dll
参见
控制台函数
控制台拉手
CreateFile
GetStdHandle
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年8月27日
==英文原文==SetStdHandle Function
Sets the handle for the specified standard device (standard input, standard output, or standard error).
Syntax
C++
BOOL WINAPI SetStdHandle(
__in DWORD nStdHandle,
__in HANDLE hHandle
);
Parameters
nStdHandle [in]
The standard device for which the handle is to be set. This parameter can be one of the following values.
ValueMeaning
STD_INPUT_HANDLE
(DWORD)-10The standard input device.
STD_OUTPUT_HANDLE
(DWORD)-11The standard output device.
STD_ERROR_HANDLE
(DWORD)-12The standard error device.

hHandle [in]
The handle for the standard device.
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 standard handles of a process may have been redirected by a call to SetStdHandle, in which case GetStdHandle will return the redirected handle. If the standard handles have been redirected, you can specify the CONIN$ value in a call to the CreateFile function to get a handle to a console's input buffer. Similarly, you can specify the CONOUT$ value to get a handle to the console's active screen buffer.
Examples
For an example, see Creating a Child Process with Redirected Input and Output .
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinbase.h (include Windows.h)
LibraryKernel32.lib
DLLKernel32.dll
See Also
Console Functions
Console Handles
CreateFile
GetStdHandle
Send comments about this topic to Microsoft
Build date: 8/27/2009
==原始网址==http://msdn.microsoft.com/en-us/library/ms686244(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 13:25:14