术语 | setmailslotinfo |
释义 | SetMailslotInfo 语法: C++ BOOL WINAPI SetMailslotInfo( __in HANDLE hMailslot, __in DWORD lReadTimeout ); SetMailslotInfo功能 设置超时的一个邮筒读操作指定使用的值。 参数 hMailslot [in] 一个句柄,邮筒。该CreateMailslot函数必须创建此处理。 lReadTimeout [in] 时间一读操作可以等待消息被写入到邮筒之前超时,以毫秒为单位。下面的值具有特殊的意义。 ValueMeaning 0Returns立即如果存在任何消息。 (系统不会将作为一个错误立即返回。) MAILSLOT_WAIT_FOREVER ((DWORD值)-1)永远等待一个消息。 此超时值适用于所有后续读取操作,并处理所有继承的邮筒。 返回值 如果函数成功,返回值为非零。 如果函数失败,返回值是零。为了获得更多错误信息,调用GetLastError。 备注 最初的时间由一个读操作邮筒使用的值通常是由CreateMailslot邮筒时设置的创建。 要求: 最低支持:client-Windows 2000专业版 最低支持server-Windows 2000服务器 HeaderWinbase.h(头文件:winuser.h) LibraryKernel32.lib DLLKernel32.dll 参见 CreateMailslot GetMailslotInfo 邮槽函数 邮筒概述 如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com) 生成日期:2009年7月30日 ==英文原文==SetMailslotInfo Function Sets the time-out value used by the specified mailslot for a read operation. Syntax C++ BOOL WINAPI SetMailslotInfo( __in HANDLE hMailslot, __in DWORD lReadTimeout ); Parameters hMailslot [in] A handle to a mailslot. The CreateMailslot function must create this handle. lReadTimeout [in] The time a read operation can wait for a message to be written to the mailslot before a time-out occurs, in milliseconds. The following values have special meanings. ValueMeaning 0Returns immediately if no message is present. (The system does not treat an immediate return as an error.) MAILSLOT_WAIT_FOREVER ((DWORD)-1)Waits forever for a message. This time-out value applies to all subsequent read operations and to all inherited mailslot handles. 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 initial time-out value used by a mailslot for a read operation is typically set by CreateMailslot when the mailslot is created. Requirements Minimum supported clientWindows 2000 Professional Minimum supported serverWindows 2000 Server HeaderWinbase.h (include Windows.h) LibraryKernel32.lib DLLKernel32.dll See Also CreateMailslot GetMailslotInfo Mailslot Functions Mailslots Overview Send comments about this topic to Microsoft Build date: 7/30/2009 ==原始网址==http://msdn.microsoft.com/en-us/library/aa365786(VS.85).aspx\n |
随便看 |
|
windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。