Lines Matching defs:handle

161   HANDLE handle = NULL;
166 handle = GetStdHandle(STD_INPUT_HANDLE);
172 if(GetConsoleMode(handle, &mode)) {
173 success = ReadConsole(handle, buf, curlx_uztoul(count), &rcount, NULL);
176 success = ReadFile(handle, buf, curlx_uztoul(count), &rcount, NULL);
193 HANDLE handle = NULL;
198 handle = GetStdHandle(STD_OUTPUT_HANDLE);
201 handle = GetStdHandle(STD_ERROR_HANDLE);
207 if(GetConsoleMode(handle, &mode)) {
208 success = WriteConsole(handle, buf, curlx_uztoul(count), &wcount, NULL);
211 success = WriteFile(handle, buf, curlx_uztoul(count), &wcount, NULL);
394 * handle the DATA command
427 * to re-create a select() function with support for other handle types.
430 * other handle types supported by WaitForMultipleObjectsEx() as
437 HANDLE handle; /* actual handle to wait for during select */
438 HANDLE signal; /* internal event to signal handle trigger */
449 HANDLE signal, handle, handles[2];
457 handle = data->handle;
459 handles[1] = handle;
467 type = GetFileType(handle);
470 /* The handle represents a file on disk, this means:
483 size.LowPart = GetFileSize(handle, &length);
489 pos.LowPart = SetFilePointer(handle, 0, &pos.HighPart, FILE_CURRENT);
501 logmsg("[select_ws_wait_thread] data available, DISK: %p", handle);
507 /* The handle represents a character input, this means:
516 /* check if this is an actual console handle */
517 if(GetConsoleMode(handle, &ret)) {
520 if(PeekConsoleInput(handle, &inputrecord, 1, &length)) {
524 ReadConsoleInput(handle, &inputrecord, 1, &length);
530 logmsg("[select_ws_wait_thread] data available, CHAR: %p", handle);
536 /* The handle represents an anonymous or named pipe, this means:
547 if(PeekNamedPipe(handle, NULL, 0, NULL, &length, NULL)) {
566 logmsg("[select_ws_wait_thread] pipe closed, PIPE: %p", handle);
570 logmsg("[select_ws_wait_thread] data available, PIPE: %p", handle);
576 /* The handle has an unknown type, try to wait on it */
579 logmsg("[select_ws_wait_thread] data available, HANDLE: %p", handle);
587 static HANDLE select_ws_wait(HANDLE handle, HANDLE signal, HANDLE abort)
600 data->handle = handle;
622 curl_socket_t wsasock; /* internal socket handle (indexed by nws) */
625 HANDLE thread; /* internal thread handle (indexed by nth) */
631 HANDLE abort, signal, handle, *handles;
717 handle = GetStdHandle(STD_INPUT_HANDLE);
718 handle = select_ws_wait(handle, signal, abort);
719 if(handle) {
722 data[nth].thread = handle;
771 handle = (HANDLE)wsasock;
772 handle = select_ws_wait(handle, signal, abort);
773 if(handle) {
776 data[nth].thread = handle;
803 /* signal the abort event handle and join the other waiting threads */
814 handle = handles[i];
817 /* check if the current internal handle was triggered */
819 WaitForSingleObjectEx(handle, 0, FALSE) == WAIT_OBJECT_0) {
820 /* first handle stdin, stdout and stderr */
832 /* try to handle the event with the WINSOCK2 functions */
834 error = WSAEnumNetworkEvents(wsasock, handle, &wsaevents);
860 /* remove from all descriptor sets since this handle did not trigger */