2 * iaxclient: a cross-platform IAX softphone library
5 * Copyright (C) 2003-2006, Horizon Wimba, Inc.
6 * Copyright (C) 2007, Wimba, Inc.
9 * Steve Kann <stevek@stevek.com>
11 * This program is free software, distributed under the terms of
12 * the GNU Lesser (Library) General Public License.
15 #include "winpoop.h" // include winsock2.h, windows.h, stdio.h, io.h
16 #include "iaxclient_lib.h"
22 if(WSAStartup(0x0101,&wsd))
28 /* yes, it could have just been a #define, but that makes linking trickier */
29 EXPORT void iaxc_millisleep(long ms)
34 int iaxci_post_event_callback(iaxc_event ev) {
36 e = (iaxc_event *)malloc(sizeof(ev));
39 if (!PostMessage((HWND)post_event_handle,post_event_id,(WPARAM) NULL, (LPARAM) e))
44 /* Increasing the Thread Priority. See
45 * http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/scheduling_priorities.asp
46 * for discussion on Win32 scheduling priorities.
49 int iaxci_prioboostbegin() {
50 if ( !SetThreadPriority(GetCurrentThread(),THREAD_PRIORITY_TIME_CRITICAL) ) {
51 fprintf(stderr, "SetThreadPriority failed: %ld.\n", GetLastError());
56 int iaxci_prioboostend() {