#define WS_SIO_ADDRESS_LIST_QUERY _WSAIOR(WS_IOC_WS2,22)
#define WS_SIO_ADDRESS_LIST_CHANGE _WSAIO(WS_IOC_WS2,23)
#define WS_SIO_QUERY_TARGET_PNP_HANDLE _WSAIOR(WS_IOC_WS2,24)
-#define WS_SIO_GET_INTERFACE_LIST WS__IOR('t', 127, WS_u_long)
+#define WS_SIO_GET_INTERFACE_LIST WS__IOR('t', 127, ULONG)
#else /* USE_WS_PREFIX */
#undef IOC_VOID
#undef IOC_IN
#define SIO_ADDRESS_LIST_QUERY _WSAIOR(IOC_WS2,22)
#define SIO_ADDRESS_LIST_CHANGE _WSAIO(IOC_WS2,23)
#define SIO_QUERY_TARGET_PNP_HANDLE _WSAIOR(IOC_WS2,24)
-#define SIO_GET_INTERFACE_LIST _IOR ('t', 127, u_long)
+#define SIO_GET_INTERFACE_LIST _IOR ('t', 127, ULONG)
#endif /* USE_WS_PREFIX */
/* Constants for WSAIoctl() */
LPWSABUF lpCalleeId,
LPWSABUF lpCalleeData,
GROUP *g,
- DWORD dwCallbackData
+ DWORD_PTR dwCallbackData
);
typedef void (CALLBACK *LPWSAOVERLAPPED_COMPLETION_ROUTINE)
DECL_WINELIB_TYPE_AW(PWSANAMESPACE_INFO)
DECL_WINELIB_TYPE_AW(LPWSANAMESPACE_INFO)
+typedef enum _WSACOMPLETIONTYPE {
+ NSP_NOTIFY_IMMEDIATELY = 0,
+ NSP_NOTIFY_HWND = 1,
+ NSP_NOTIFY_EVENT = 2,
+ NSP_NOTIFY_PORT = 3,
+ NSP_NOTIFY_APC = 4
+} WSACOMPLETIONTYPE, * PWSACOMPLETIONTYPE, * LPWSACOMPLETIONTYPE;
+
+typedef struct _WSACOMPLETION {
+ WSACOMPLETIONTYPE Type;
+ union {
+ struct {
+ HWND hWnd;
+ UINT uMsg;
+ WPARAM context;
+ } WindowMessage;
+ struct {
+ LPWSAOVERLAPPED lpOverlapped;
+ } Event;
+ struct {
+ LPWSAOVERLAPPED lpOverlapped;
+ LPWSAOVERLAPPED_COMPLETION_ROUTINE lpfnCompletionProc;
+ } Apc;
+ struct {
+ LPWSAOVERLAPPED lpOverlapped;
+ HANDLE hPort;
+ ULONG_PTR Key;
+ } Port;
+ } Parameters;
+} WSACOMPLETION, *PWSACOMPLETION, *LPWSACOMPLETION;
+
/*
* Winsock Function Typedefs
*
typedef struct WS(servent)* (WINAPI *LPFN_GETSERVBYPORT)(int,const char*);
typedef int (WINAPI *LPFN_GETSOCKNAME)(SOCKET,struct WS(sockaddr)*,int*);
typedef int (WINAPI *LPFN_GETSOCKOPT)(SOCKET,int,int,char*,int*);
-typedef WS(u_long) (WINAPI *LPFN_HTONL)(WS(u_long));
+typedef ULONG (WINAPI *LPFN_HTONL)(ULONG);
typedef WS(u_short) (WINAPI *LPFN_HTONS)(WS(u_short));
typedef ULONG (WINAPI *LPFN_INET_ADDR)(const char*);
-typedef char* (WINAPI *LPFN_INET_NTOA)(struct WS(in_addr);
-typedef int (WINAPI *LPFN_IOCTLSOCKET)(SOCKET,LONG,WS(u_long)*);
+typedef char* (WINAPI *LPFN_INET_NTOA)(struct WS(in_addr));
+typedef int (WINAPI *LPFN_IOCTLSOCKET)(SOCKET,LONG,ULONG*);
typedef int (WINAPI *LPFN_LISTEN)(SOCKET,int);
-typedef WS(u_long) (WINAPI *LPFN_NTOHL)(WS(u_long));
+typedef ULONG (WINAPI *LPFN_NTOHL)(ULONG);
typedef WS(u_short) (WINAPI *LPFN_NTOHS)(WS(u_short));
typedef int (WINAPI *LPFN_RECV)(SOCKET,char*,int,int);
typedef int (WINAPI *LPFN_RECVFROM)(SOCKET,char*,int,int,struct WS(sockaddr)*,int*);
* "Winsock2 Function Typedefs" section below.
*/
#if WS_API_PROTOTYPES
-SOCKET WINAPI WSAAccept(SOCKET,struct WS(sockaddr)*,LPINT,LPCONDITIONPROC,DWORD);
+SOCKET WINAPI WSAAccept(SOCKET,struct WS(sockaddr)*,LPINT,LPCONDITIONPROC,DWORD_PTR);
INT WINAPI WSAAddressToStringA(LPSOCKADDR,DWORD,LPWSAPROTOCOL_INFOA,LPSTR,LPDWORD);
INT WINAPI WSAAddressToStringW(LPSOCKADDR,DWORD,LPWSAPROTOCOL_INFOW,LPWSTR,LPDWORD);
#define WSAAddressToString WINELIB_NAME_AW(WSAAddressToString)
INT WINAPI WSAGetServiceClassNameByClassIdA(LPGUID,LPSTR,LPDWORD);
INT WINAPI WSAGetServiceClassNameByClassIdW(LPGUID,LPWSTR,LPDWORD);
#define WSAGetServiceClassNameByClassId WINELIB_NAME_AW(WSAGetServiceClassNameByClassId)
-int WINAPI WSAHtonl(SOCKET,WS(u_long),WS(u_long)*);
+int WINAPI WSAHtonl(SOCKET,ULONG,ULONG*);
int WINAPI WSAHtons(SOCKET,WS(u_short),WS(u_short)*);
int WINAPI WSAInstallServiceClassA(LPWSASERVICECLASSINFOA);
int WINAPI WSAInstallServiceClassW(LPWSASERVICECLASSINFOW);
INT WINAPI WSALookupServiceNextA(HANDLE,DWORD,LPDWORD,LPWSAQUERYSETA);
INT WINAPI WSALookupServiceNextW(HANDLE,DWORD,LPDWORD,LPWSAQUERYSETW);
#define WSALookupServiceNext WINELIB_NAME_AW(WSALookupServiceNext)
-int WINAPI WSANtohl(SOCKET,WS(u_long),WS(u_long)*);
+int WINAPI WSANSPIoctl(HANDLE,DWORD,LPVOID,DWORD,LPVOID,DWORD,LPDWORD,LPWSACOMPLETION);
+int WINAPI WSANtohl(SOCKET,ULONG,ULONG*);
int WINAPI WSANtohs(SOCKET,WS(u_short),WS(u_short)*);
INT WINAPI WSAProviderConfigChange(LPHANDLE,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);
int WINAPI WSARecv(SOCKET,LPWSABUF,DWORD,LPDWORD,LPDWORD,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);
* "Winsock2 Prototypes" section above.
*/
#if WS_API_TYPEDEFS
-typedef SOCKET (WINAPI *LPFN_WSAACCEPT)(SOCKET,WS(sockaddr)*,LPINT,LPCONDITIONPROC,DWORD);
+typedef SOCKET (WINAPI *LPFN_WSAACCEPT)(SOCKET,WS(sockaddr)*,LPINT,LPCONDITIONPROC,DWORD_PTR);
typedef INT (WINAPI *LPFN_WSAADRESSTOSTRINGA)(LPSOCKADDR,DWORD,LPWSAPROTOCOL_INFOA,LPSTR,LPDWORD);
typedef INT (WINAPI *LPFN_WSAADRESSTOSTRINGW)(LPSOCKADDR,DWORD,LPWSAPROTOCOL_INFOW,LPWSTR,LPDWORD);
#define LPFN_WSAADDRESSTOSTRING WINELIB_NAME_AW(LPFN_WSAADDRESSTOSTRING)
typedef INT (WINAPI *LPFN_WSAGETSERVICECLASSNAMEBYCLASSIDA)(LPGUID,LPSTR,LPDWORD);
typedef INT (WINAPI *LPFN_WSAGETSERVICECLASSNAMEBYCLASSIDW)(LPGUID,LPWSTR,LPDWORD);
#define LPFN_WSAGETSERVICECLASSNAMEBYCLASSID WINELIB_NAME_AW(LPFN_WSAGETSERVICECLASSNAMEBYCLASSID)
-typedef int (WINAPI *LPFN_WSAHTONL)(SOCKET,WS(u_long),WS(u_long)*);
+typedef int (WINAPI *LPFN_WSAHTONL)(SOCKET,ULONG,ULONG*);
typedef int (WINAPI *LPFN_WSAHTONS)(SOCKET,WS(u_short),WS(u_short)*);
typedef int (WINAPI LPFN_WSAINSTALLSERVICECLASSA)(LPWSASERVICECLASSINFOA);
typedef int (WINAPI LPFN_WSAINSTALLSERVICECLASSW)(LPWSASERVICECLASSINFOW);
typedef INT (WINAPI *LPFN_WSALOOKUPSERVICENEXTA)(HANDLE,DWORD,LPDWORD,LPWSAQUERYSETA);
typedef INT (WINAPI *LPFN_WSALOOKUPSERVICENEXTW)(HANDLE,DWORD,LPDWORD,LPWSAQUERYSETW);
#define LPFN_WSALOOKUPSERVICENEXT WINELIB_NAME_AW(LPFN_WSALOOKUPSERVICENEXT)
-typedef int (WINAPI *LPFN_WSANTOHL)(SOCKET,WS(u_long),WS(u_long)*);
+typedef int (WINAPI *LPFN_WSANSPIoctl)(HANDLE, DWORD,LPVOID,DWORD,LPVOID,DWORD,LPDWORD,LPWSACOMPLETION);
+typedef int (WINAPI *LPFN_WSANTOHL)(SOCKET,ULONG,ULONG*);
typedef int (WINAPI *LPFN_WSANTOHS)(SOCKET,WS(u_short),WS(u_short)*);
typedef INT (WINAPI *LPFN_WSAPROVIDERCONFIGCHANGE)(LPHANDLE,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);
typedef int (WINAPI *LPFN_WSARECV)(SOCKET,LPWSABUF,DWORD,LPDWORD,LPDWORD,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);