The SendMessageTimeout function sends the specified message to a window or windows. The function calls the window procedure for the specified window and, if the specified window belongs to a different thread, does not return until the window procedure has processed the message or the specified time-out period has elapsed. If the window receiving the message belongs to the same queue as the current thread, the window procedure is called directly ¾ the time-out value is ignored.
LRESULT SendMessageTimeout(
HWND hWnd, |
// handle of destination window |
UINT Msg, |
// message to send |
WPARAM wParam, |
// first message parameter |
LPARAM lParam, |
// second message parameter |
UINT fuFlags, |
// how to send the message |
UINT uTimeout, |
// time-out duration |
LPDWORD lpdwResult |
// return value for synchronous call |
); |
Value |
Meaning |
SMTO_ABORTIFHUNG |
Returns without waiting for the time-out period to elapse if the receiving process appears to be in a “hung” state. |
SMTO_BLOCK |
Prevents the calling thread from processing any other requests until the function returns. |
SMTO_NORMAL |
The calling thread is not prevented from processing other requests while waiting for the function to return. |
If the function succeeds, the return value is nonzero.
If the function fails or time out, the return value is zero. To get extended error information, call GetLastError. If GetLastError returns zero, then the function timed out. SendMessageTimeout does not provide information about individual windows timing out if HWND_BROADCAST is used.
InSendMessage, PostMessage, SendDlgItemMessage, SendMessage, SendMessageCallback, SendNotifyMessage
file: /Techref/os/win/api/win32/func/src/f75_17.htm, 5KB, , updated: 2000/4/7 11:19, local time: 2024/11/12 16:57,
18.117.186.153:LOG IN
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://sxlist.com/techref/os/win/api/win32/func/src/f75_17.htm"> SendMessageTimeout</A> |
Did you find what you needed? |
Welcome to sxlist.com!sales, advertizing, & kind contributors just like you! Please don't rip/copy (here's why Copies of the site on CD are available at minimal cost. |
Ashley Roll has put together a really nice little unit here. Leave off the MAX232 and keep these handy for the few times you need true RS232! |
.