网站首页  词典首页

请输入您要查询的函数:

 

术语 buildcommdcbandtimeouts
释义 BuildCommDCBAndTimeouts
语法:
C++
BOOL WINAPI BuildCommDCBAndTimeouts(
__in LPCTSTR lpDef,
__out LPDCB lpDCB,
__out LPCOMMTIMEOUTS lpCommTimeouts
);
BuildCommDCBAndTimeouts功能
转换装置,将适当的设备定义字符串控制模块代码,并放到一个设备控制块他们。该功能还可以设置超时时间值,其中包括可能没有时间超时,一个装置,该函数在这方面的行为,对设备的内容定义的字符串而定。
参数
lpDef [in]
该设备控制信息。该函数这个字符串,分析它,然后设置在二氯苯结构适当的值指向lpDCB。
该字符串必须与模式命令的命令行参数相同的形式:
COMx [:] [波特= b的] [奇偶= p] [数据=?] [停止= ?] =(关于|关闭)[的] [xon =(关于|关闭)] [odsr =(关于|关闭) ] [价差=(关于|关闭)] [糖醇=(关于|关闭|房协)] [塞舌尔=(关于|关闭|房协|热)] [=(在idsr |关闭)]
该设备的名称是可选的,但它必须指定一个有效的设备如果使用。
例如,以下字符串指定一个1200波特率,无奇偶校验,8个数据位,1位停止位:
波特率= 1200平价= n个数据= 8站= 1
lpDCB [out]
阿二氯苯结构的接收来自设备的信息控制信息的字符串指针指向lpDef。这生技中心结构定义了通信设备的控制设置。
lpCommTimeouts [out]
阿COMMTIMEOUTS结构的时间内接收信息的指针。
返回值
如果函数成功,返回值为非零。
如果函数失败,返回值是零。为了获得更多错误信息,调用GetLastError。
备注
该BuildCommDCBAndTimeouts函数修改其超时设置=(上的存在或缺乏基础的行为是“以|关闭)”在lpDef子:
如果该字符串包含关于“子”为=,该函数设置的COMMTIMEOUTS结构WriteTotalTimeoutConstant成员60000和0的所有其他成员。
如果该字符串包含子串“为=关闭”,该函数设置为0 COMMTIMEOUTS的成员。
如果字符串不指定“为=(关于|关闭)”字符串,该函数会忽略lpCommTimeouts COMMTIMEOUTS结构。
有关更多信息,见BuildCommDCB函数的备注。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinbase.h(头文件:winuser.h)
LibraryKernel32.lib
DLLKernel32.dll
Unicode和ANSI namesBuildCommDCBAndTimeoutsW(Unicode)和BuildCommDCBAndTimeoutsA(ANSI)的
参见
BuildCommDCB
COMMTIMEOUTS
通讯功能
通信资源
二氯苯
GetCommTimeouts
SetCommTimeouts
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月30日
==英文原文==BuildCommDCBAndTimeouts Function
Translates a device-definition string into appropriate device-control block codes and places them into a device control block. The function can also set up time-out values, including the possibility of no time-outs, for a device; the function's behavior in this regard depends on the contents of the device-definition string.
Syntax
C++
BOOL WINAPI BuildCommDCBAndTimeouts(
__in LPCTSTR lpDef,
__out LPDCB lpDCB,
__out LPCOMMTIMEOUTS lpCommTimeouts
);
Parameters
lpDef [in]
The device-control information. The function takes this string, parses it, and then sets appropriate values in the DCB structure pointed to by lpDCB.
The string must have the same form as the mode command's command-line arguments:
COMx[:][baud=b][parity=p][data=d][stop=s][to={on|off}][xon={on|off}][odsr={on|off}][octs={on|off}][dtr={on|off|hs}][rts={on|off|hs|tg}][idsr={on|off}]
The device name is optional, but it must specify a valid device if used.
For example, the following string specifies a baud rate of 1200, no parity, 8 data bits, and 1 stop bit:
baud=1200 parity=N data=8 stop=1
lpDCB [out]
A pointer to a DCB structure that receives information from the device-control information string pointed to by lpDef. This DCB structure defines the control settings for a communications device.
lpCommTimeouts [out]
A pointer to a COMMTIMEOUTS structure that receives time-out information.
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 BuildCommDCBAndTimeouts function modifies its time-out setting behavior based on the presence or absence of a "to={on|off}" substring in lpDef:
If that string contains the substring "to=on", the function sets the WriteTotalTimeoutConstant member of the COMMTIMEOUTS structure to 60000 and all other members to 0.
If that string contains the substring "to=off", the function sets the members of COMMTIMEOUTS to 0.
If that string does not specify a "to={on|off}" substring, the function ignores the COMMTIMEOUTS structure in lpCommTimeouts.
For more information, see the Remarks for the BuildCommDCB function.
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinbase.h (include Windows.h)
LibraryKernel32.lib
DLLKernel32.dll
Unicode and ANSI namesBuildCommDCBAndTimeoutsW (Unicode) and BuildCommDCBAndTimeoutsA (ANSI)
See Also
BuildCommDCB
COMMTIMEOUTS
Communications Functions
Communications Resources
DCB
GetCommTimeouts
SetCommTimeouts
Send comments about this topic to Microsoft
Build date: 7/30/2009
==原始网址==http://msdn.microsoft.com/en-us/library/aa363145(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 11:22:52