d3d9: Use unsafe_impl_from_IDirect3DVertexBuffer9 for app provided ifaces.
[wine] / include / winsock2.h
index d54e8a8..5e1f489 100644 (file)
@@ -144,7 +144,7 @@ extern "C" {
 #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
@@ -180,7 +180,7 @@ extern "C" {
 #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() */
@@ -401,7 +401,7 @@ typedef int (CALLBACK *LPCONDITIONPROC)
     LPWSABUF lpCalleeId,
     LPWSABUF lpCalleeData,
     GROUP *g,
-    DWORD dwCallbackData
+    DWORD_PTR dwCallbackData
 );
 
 typedef void (CALLBACK *LPWSAOVERLAPPED_COMPLETION_ROUTINE)
@@ -506,6 +506,37 @@ DECL_WINELIB_TYPE_AW(WSANAMESPACE_INFO)
 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
  *
@@ -547,13 +578,13 @@ typedef struct WS(servent)* (WINAPI *LPFN_GETSERVBYNAME)(const char*,const char*
 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*);
@@ -573,7 +604,7 @@ typedef SOCKET (WINAPI *LPFN_SOCKET)(int,int,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)
@@ -599,7 +630,7 @@ INT WINAPI WSAGetServiceClassInfoW(LPGUID,LPGUID,LPDWORD,LPWSASERVICECLASSINFOW)
 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);
@@ -613,7 +644,8 @@ INT WINAPI WSALookupServiceEnd(HANDLE);
 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);
@@ -646,7 +678,7 @@ DWORD WINAPI WSAWaitForMultipleEvents(DWORD,const WSAEVENT*,BOOL,DWORD,BOOL);
  * "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)
@@ -672,7 +704,7 @@ typedef INT (WINAPI *LPFNWSAGETSERVICECLASSINFOW)(LPGUID,LPGUID,LPDWORD,LPWSASER
 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);
@@ -685,7 +717,8 @@ typedef INT (WINAPI *LPFN_WSALOOKUPSERVICEEND(HANDLE);
 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);