少年修仙传客户端基础资源
hch
2024-04-01 d01413b00ef631ac20347716b23818b0b811f65f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/**
 * \file
 */
 
#ifndef __MONO_UTILS_W32API_H__
#define __MONO_UTILS_W32API_H__
 
#include <glib.h>
 
G_BEGIN_DECLS
 
#ifndef HOST_WIN32
 
#define WAIT_FAILED        ((gint) 0xFFFFFFFF)
#define WAIT_OBJECT_0      ((gint) 0x00000000)
#define WAIT_ABANDONED_0   ((gint) 0x00000080)
#define WAIT_TIMEOUT       ((gint) 0x00000102)
#define WAIT_IO_COMPLETION ((gint) 0x000000C0)
 
#define WINAPI
 
typedef guint32 DWORD;
typedef gboolean BOOL;
typedef gint32 LONG;
typedef guint32 ULONG;
typedef guint UINT;
 
typedef gpointer HANDLE;
typedef gpointer HMODULE;
 
#else
 
#define __USE_W32_SOCKETS
#include <winsock2.h>
#include <windows.h>
#include <winbase.h>
/* The mingw version says: /usr/i686-pc-mingw32/sys-root/mingw/include/ws2tcpip.h:38:2: error: #error "ws2tcpip.h is not compatible with winsock.h. Include winsock2.h instead." */
#ifdef _MSC_VER
#include <ws2tcpip.h>
#endif
#include <psapi.h>
 
/* Workaround for missing WSAPOLLFD typedef in mingw's winsock2.h
 * that is required for mswsock.h below. Remove once
 * http://sourceforge.net/p/mingw/bugs/1980/ is fixed. */
#if defined(__MINGW_MAJOR_VERSION) && __MINGW_MAJOR_VERSION == 4
typedef struct pollfd {
    SOCKET fd;
    short  events;
    short  revents;
} WSAPOLLFD, *PWSAPOLLFD, *LPWSAPOLLFD;
#endif
 
#if G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT | HAVE_UWP_WINAPI_SUPPORT)
#include <mswsock.h>
#endif
 
#endif /* HOST_WIN32 */
 
G_END_DECLS
 
#endif /* __MONO_UTILS_W32API_H__ */