[42] | 1 | #ifndef _WINSOCK2API_
|
---|
| 2 | #define _WINSOCK2API_
|
---|
| 3 | #define _WINSOCKAPI_
|
---|
[1] | 4 |
|
---|
[42] | 5 | Const WINSOCK_VERSION = MAKEWORD(2, 2)
|
---|
[1] | 6 |
|
---|
| 7 | TypeDef SOCKET = ULONG_PTR
|
---|
| 8 |
|
---|
[42] | 9 | Const FD_SETSIZE = 64
|
---|
[1] | 10 |
|
---|
[42] | 11 | Type fd_set
|
---|
| 12 | fd_count As DWord
|
---|
| 13 | fd_array[ELM(FD_SETSIZE)] As SOCKET
|
---|
| 14 | End Type
|
---|
[1] | 15 |
|
---|
[42] | 16 | Declare Function __WSAFDIsSet Lib "ws2_32" (fd As SOCKET, ByRef set As fd_set) As Long
|
---|
[1] | 17 |
|
---|
[42] | 18 | Sub FD_CLR(fd As SOCKET, ByRef set As fd_set)
|
---|
| 19 | Dim i As DWord
|
---|
| 20 | With set
|
---|
| 21 | For i = 0 To .fd_count
|
---|
| 22 | If .fd_array[i] = fd Then
|
---|
| 23 | While i < .fd_count - 1
|
---|
| 24 | .fd_array[i] = .fd_array[i + 1]
|
---|
| 25 | WEnd
|
---|
| 26 | .fd_count--
|
---|
| 27 | Exit For
|
---|
| 28 | End If
|
---|
| 29 | Next
|
---|
| 30 | End With
|
---|
| 31 | End Sub
|
---|
[1] | 32 |
|
---|
[42] | 33 | Sub FD_SET(fd As SOCKET, ByRef set As fd_set)
|
---|
| 34 | Dim i As DWord
|
---|
| 35 | With set
|
---|
| 36 | For i = 0 To ELM(.fd_count)
|
---|
| 37 | If .fd_array[i] = fd Then
|
---|
| 38 | Exit Sub
|
---|
| 39 | End If
|
---|
| 40 | Next
|
---|
| 41 | If i = .fd_count Then
|
---|
[237] | 42 | If .fd_count < FD_SETSIZE Then
|
---|
[42] | 43 | .fd_array[i] = fd
|
---|
| 44 | .fd_count++
|
---|
| 45 | End If
|
---|
| 46 | End If
|
---|
| 47 | End With
|
---|
| 48 | End Sub
|
---|
[1] | 49 |
|
---|
[42] | 50 | Sub FD_ZERO(ByRef set As fd_set)
|
---|
| 51 | set.fd_count = 0
|
---|
| 52 | End Sub
|
---|
[1] | 53 |
|
---|
[42] | 54 | Const FD_ISSET(fd, set) = __WSAFDIsSet(fd, set)
|
---|
[1] | 55 |
|
---|
[42] | 56 | Type timeval
|
---|
| 57 | tv_sec As Long
|
---|
| 58 | tv_usec As Long
|
---|
| 59 | End Type
|
---|
[1] | 60 |
|
---|
[42] | 61 | ' Operations on timevals.
|
---|
| 62 | Function timerisset(ByRef tvp As timeval) As BOOL
|
---|
| 63 | Return tvp.tv_sec Or tvp.tv_usec
|
---|
| 64 | End Function
|
---|
[1] | 65 |
|
---|
[42] | 66 | /*
|
---|
| 67 | #define timercmp(tvp, uvp, cmp) \
|
---|
| 68 | ((tvp)->tv_sec cmp (uvp)->tv_sec || \
|
---|
| 69 | (tvp)->tv_sec == (uvp)->tv_sec && (tvp)->tv_usec cmp (uvp)->tv_usec)
|
---|
| 70 | */
|
---|
[1] | 71 |
|
---|
[42] | 72 | Sub timerclear(ByRef tvp As timeval)
|
---|
| 73 | tvp.tv_sec = 0
|
---|
| 74 | tvp.tv_usec = 0
|
---|
| 75 | End Sub
|
---|
[1] | 76 |
|
---|
[42] | 77 | ' Commands for ioctlsocket(), taken from the BSD file fcntl.h.
|
---|
| 78 | Const IOCPARM_MASK = &h7f
|
---|
| 79 | Const IOC_VOID = &h20000000
|
---|
| 80 | Const IOC_OUT = &h40000000
|
---|
| 81 | Const IOC_IN = &h80000000
|
---|
| 82 | Const IOC_INOUT= (IOC_IN Or IOC_OUT)
|
---|
[1] | 83 |
|
---|
[42] | 84 | Const _IO(x ,y) = (IOC_VOID Or (x << 8) Or y)
|
---|
[1] | 85 |
|
---|
[42] | 86 | Const _IOR(x, y, size) = (IOC_OUT Or ((size And IOCPARM_MASK) << 16) Or ((x) << 8) Or (y))
|
---|
[1] | 87 |
|
---|
[42] | 88 | Const _IOW(x, y, size) = (IOC_IN Or ((size And IOCPARM_MASK) << 16) Or ((x) << 8) Or (y))
|
---|
| 89 |
|
---|
| 90 | Const FIONREAD = _IOR(&h66,127, SizeOf (DWord)) '&h66は'f'
|
---|
| 91 | Const FIONBIO = _IOW(&h66,126, SizeOf (DWord))
|
---|
| 92 | Const FIOASYNC = _IOW(&h66,125, SizeOf (DWord))
|
---|
| 93 |
|
---|
| 94 | ' Socket I/O Controls
|
---|
| 95 | Const SIOCSHIWAT = _IOW(&h73, 0, SizeOf (DWord)) '&h73は's'
|
---|
| 96 | Const SIOCGHIWAT = _IOR(&h73, 1, SizeOf (DWord))
|
---|
| 97 | Const SIOCSLOWAT = _IOW(&h73, 2, SizeOf (DWord))
|
---|
| 98 | Const SIOCGLOWAT = _IOR(&h73, 3, SizeOf (DWord))
|
---|
| 99 | Const SIOCATMARK = _IOR(&h73, 7, SizeOf (DWord))
|
---|
| 100 |
|
---|
| 101 |
|
---|
[150] | 102 | Type /*Class*/ hostent
|
---|
| 103 | 'Public
|
---|
[42] | 104 | h_name As *Byte
|
---|
| 105 | h_aliases As **Byte
|
---|
[1] | 106 | h_addrtype As Integer
|
---|
[42] | 107 | h_lengt As Integer
|
---|
| 108 | h_addr_list As **Byte
|
---|
[150] | 109 | /*
|
---|
[42] | 110 | Function h_addr() As *Byte
|
---|
| 111 | Return h_addr_list[0]
|
---|
| 112 | End Function
|
---|
| 113 |
|
---|
| 114 | Sub h_addr(l As *Byte)
|
---|
| 115 | h_addr_list[0] = i
|
---|
| 116 | End Sub
|
---|
[150] | 117 | */
|
---|
[167] | 118 | End Type 'Class
|
---|
[42] | 119 |
|
---|
| 120 | Type netent
|
---|
[521] | 121 | n_name As *Byte
|
---|
| 122 | n_aliases As **Byte
|
---|
[42] | 123 | n_addrtyp As Integer
|
---|
| 124 | n_net As DWord
|
---|
[1] | 125 | End Type
|
---|
| 126 |
|
---|
[42] | 127 | Type servent
|
---|
| 128 | s_name As *Byte
|
---|
| 129 | s_aliases As **Byte
|
---|
| 130 | #ifdef _WIN64
|
---|
| 131 | s_proto As *Byte
|
---|
[1] | 132 | s_port As Integer
|
---|
[42] | 133 | #else
|
---|
| 134 | s_port As Integer
|
---|
| 135 | s_proto As *Byte
|
---|
| 136 | #endif
|
---|
[1] | 137 | End Type
|
---|
| 138 |
|
---|
[42] | 139 | Type protoent
|
---|
| 140 | p_name As *Byte
|
---|
| 141 | p_aliases As **Byte
|
---|
| 142 | p_proto As Integer
|
---|
[1] | 143 | End Type
|
---|
| 144 |
|
---|
[42] | 145 | ' Protocols
|
---|
| 146 | Const IPPROTO_IP = 0
|
---|
| 147 | Const IPPROTO_HOPOPTS = 0
|
---|
| 148 | Const IPPROTO_ICMP = 1
|
---|
| 149 | Const IPPROTO_IGMP = 2
|
---|
| 150 | Const IPPROTO_GGP = 3
|
---|
| 151 | Const IPPROTO_IPV4 = 4
|
---|
| 152 | Const IPPROTO_TCP = 6
|
---|
| 153 | Const IPPROTO_PUP = 12
|
---|
| 154 | Const IPPROTO_UDP = 17
|
---|
| 155 | Const IPPROTO_IDP = 22
|
---|
| 156 | Const IPPROTO_IPV6 = 41
|
---|
| 157 | Const IPPROTO_ROUTING = 43
|
---|
| 158 | Const IPPROTO_FRAGMENT = 44
|
---|
| 159 | Const IPPROTO_ESP = 50
|
---|
| 160 | Const IPPROTO_AH = 51
|
---|
| 161 | Const IPPROTO_ICMPV6 = 58
|
---|
| 162 | Const IPPROTO_NONE = 59
|
---|
| 163 | Const IPPROTO_DSTOPTS = 60
|
---|
| 164 | Const IPPROTO_ND = 77
|
---|
| 165 | Const IPPROTO_ICLFXBM = 78
|
---|
[1] | 166 |
|
---|
[42] | 167 | Const IPPROTO_RAW = 255
|
---|
| 168 | Const IPPROTO_MAX = 256
|
---|
[1] | 169 |
|
---|
[42] | 170 | ' Port/socket numbers: network standard functions
|
---|
| 171 | Const IPPORT_ECHO = 7
|
---|
| 172 | Const IPPORT_DISCARD = 9
|
---|
| 173 | Const IPPORT_SYSTAT = 11
|
---|
| 174 | Const IPPORT_DAYTIME = 13
|
---|
| 175 | Const IPPORT_NETSTAT = 15
|
---|
| 176 | Const IPPORT_FTP = 21
|
---|
| 177 | Const IPPORT_TELNET = 23
|
---|
| 178 | Const IPPORT_SMTP = 25
|
---|
| 179 | Const IPPORT_TIMESERVER = 37
|
---|
| 180 | Const IPPORT_NAMESERVER = 42
|
---|
| 181 | Const IPPORT_WHOIS = 43
|
---|
| 182 | Const IPPORT_MTP = 57
|
---|
[1] | 183 |
|
---|
[42] | 184 | ' Port/socket numbers: host specific functions
|
---|
| 185 | Const IPPORT_TFTP = 69
|
---|
| 186 | Const IPPORT_RJE = 77
|
---|
| 187 | Const IPPORT_FINGER = 79
|
---|
| 188 | Const IPPORT_TTYLINK = 87
|
---|
| 189 | Const IPPORT_SUPDUP = 95
|
---|
[1] | 190 |
|
---|
[42] | 191 | ' UNIX TCP sockets
|
---|
| 192 | Const IPPORT_EXECSERVER = 512
|
---|
| 193 | Const IPPORT_LOGINSERVER = 513
|
---|
| 194 | Const IPPORT_CMDSERVER = 514
|
---|
| 195 | Const IPPORT_EFSSERVER = 520
|
---|
[1] | 196 |
|
---|
[42] | 197 | ' UNIX UDP sockets
|
---|
| 198 | Const IPPORT_BIFFUDP = 512
|
---|
| 199 | Const IPPORT_WHOSERVER = 513
|
---|
| 200 | Const IPPORT_ROUTESERVER = 520
|
---|
| 201 | ' 520+1 also used
|
---|
[1] | 202 |
|
---|
[42] | 203 | ' Ports < IPPORT_RESERVED are reserved for privileged processes (e.g. root).
|
---|
| 204 | Const IPPORT_RESERVED = 1024
|
---|
| 205 |
|
---|
| 206 | ' Link numbers
|
---|
| 207 | Const IMPLINK_IP = 155
|
---|
| 208 | Const IMPLINK_LOWEXPER = 156
|
---|
| 209 | Const IMPLINK_HIGHEXPER = 158
|
---|
| 210 |
|
---|
| 211 | ' Internet address (old style... should be updated)
|
---|
[150] | 212 | Type /*Class*/ in_addr
|
---|
| 213 | 'Public
|
---|
[42] | 214 | /*
|
---|
| 215 | Union S_un
|
---|
| 216 | S_un_b As Type
|
---|
| 217 | s_b1 As Byte
|
---|
| 218 | s_b2 As Byte
|
---|
| 219 | s_b3 As Byte
|
---|
| 220 | s_b4 As Byte
|
---|
| 221 | End Type
|
---|
| 222 | S_un_w As Type
|
---|
| 223 | s_w1 As Word
|
---|
| 224 | s_w2 As Word
|
---|
| 225 | End Type
|
---|
| 226 | S_addr As DWord
|
---|
| 227 | End Union
|
---|
| 228 | */
|
---|
| 229 | s_addr As DWord
|
---|
[150] | 230 | /*
|
---|
[42] | 231 | Function s_host() As Byte
|
---|
| 232 | Return GetByte(VarPtr(s_addr) + 1)
|
---|
| 233 | End Function
|
---|
| 234 |
|
---|
| 235 | Sub s_host(h As Byte)
|
---|
| 236 | Return SetByte(VarPtr(s_addr) + 2, h)
|
---|
| 237 | End Sub
|
---|
| 238 |
|
---|
| 239 | Function s_net() As Byte
|
---|
| 240 | Return GetByte(VarPtr(s_addr) + 0)
|
---|
| 241 | End Function
|
---|
| 242 |
|
---|
| 243 | Sub s_net(n As Byte)
|
---|
| 244 | Return SetByte(VarPtr(s_addr) + 0, n)
|
---|
| 245 | End Sub
|
---|
| 246 |
|
---|
| 247 | Function s_imp() As Word
|
---|
| 248 | Return GetWord(VarPtr(s_addr) + 1)
|
---|
| 249 | End Function
|
---|
| 250 |
|
---|
| 251 | Sub s_imp(i As Word)
|
---|
| 252 | Return SetWord(VarPtr(s_addr) + 1, i)
|
---|
| 253 | End Sub
|
---|
| 254 |
|
---|
| 255 | Function s_impno() As Byte
|
---|
| 256 | Return GetByte(VarPtr(s_addr) + 3)
|
---|
| 257 | End Function
|
---|
| 258 |
|
---|
| 259 | Sub s_impno(i As Byte)
|
---|
| 260 | Return SetByte(VarPtr(s_addr) + 3, i)
|
---|
| 261 | End Sub
|
---|
| 262 |
|
---|
| 263 | Function s_lh() As Byte
|
---|
| 264 | Return GetByte(VarPtr(s_addr) + 2)
|
---|
| 265 | End Function
|
---|
| 266 |
|
---|
| 267 | Sub s_lh(l As Byte)
|
---|
| 268 | Return SetByte(VarPtr(s_addr) + 2, l)
|
---|
| 269 | End Sub
|
---|
[150] | 270 | */
|
---|
| 271 | End Type 'Class
|
---|
[42] | 272 |
|
---|
| 273 | Const IN_CLASSA(i) = (((i) As DWord And &h80000000) = 0)
|
---|
| 274 | Const IN_CLASSA_NET = &hff000000
|
---|
| 275 | Const IN_CLASSA_NSHIFT = 24
|
---|
| 276 | Const IN_CLASSA_HOST = &h00ffffff
|
---|
| 277 | Const IN_CLASSA_MAX = 128
|
---|
| 278 |
|
---|
| 279 | Const IN_CLASSB(i) = (((i) As DWord & &hc0000000) = &h80000000)
|
---|
| 280 | Const IN_CLASSB_NET= &hffff0000
|
---|
| 281 | Const IN_CLASSB_NSHIFT = 16
|
---|
| 282 | Const IN_CLASSB_HOST = &h0000ffff
|
---|
| 283 | Const IN_CLASSB_MAX = 65536
|
---|
| 284 |
|
---|
| 285 | Const IN_CLASSC(i) = (((i) As DWord And &he0000000) = &hc0000000)
|
---|
| 286 | Const IN_CLASSC_NET = &hffffff00
|
---|
| 287 | Const IN_CLASSC_NSHIFT = 8
|
---|
| 288 | Const IN_CLASSC_HOST = &h000000ff
|
---|
| 289 |
|
---|
| 290 | Const IN_CLASSD(i) = (((i) As DWord And &hf0000000) = &he0000000)
|
---|
| 291 | Const IN_CLASSD_NET = &hf0000000
|
---|
| 292 | Const IN_CLASSD_NSHIFT = 28
|
---|
| 293 | Const IN_CLASSD_HOST = &h0fffffff
|
---|
| 294 | Const IN_MULTICAST(i) = IN_CLASSD(i)
|
---|
| 295 |
|
---|
| 296 | Const INADDR_ANY = &h00000000 As DWord
|
---|
| 297 | Const INADDR_LOOPBACK = &h7f000001
|
---|
| 298 | Const INADDR_BROADCAST = &hffffffff As DWord
|
---|
| 299 | Const INADDR_NONE = &hffffffff
|
---|
| 300 |
|
---|
| 301 | Const ADDR_ANY = INADDR_ANY
|
---|
| 302 |
|
---|
| 303 | ' Socket address, internet style.
|
---|
| 304 | Type sockaddr_in
|
---|
| 305 | sin_family As Integer
|
---|
| 306 | sin_port As Word
|
---|
| 307 | sin_addr As in_addr
|
---|
| 308 | sin_zero[ELM(8)] As Byte
|
---|
| 309 | End Type
|
---|
| 310 |
|
---|
[1] | 311 | Const WSADESCRIPTION_LEN = 256
|
---|
[42] | 312 | Const WSASYS_STATUS_LEN = 128
|
---|
| 313 |
|
---|
[1] | 314 | Type WSADATA
|
---|
| 315 | wVersion As Word
|
---|
| 316 | wHighVersion As Word
|
---|
[42] | 317 | #ifdef _WIN64
|
---|
| 318 | iMaxSockets As Word
|
---|
| 319 | iMaxUdpDg As Word
|
---|
| 320 | lpVendorInfo As *Byte
|
---|
[1] | 321 | szDescription[WSADESCRIPTION_LEN] As Byte
|
---|
| 322 | szSystemStatus[WSASYS_STATUS_LEN] As Byte
|
---|
[42] | 323 | #else
|
---|
| 324 | szDescription[WSADESCRIPTION_LEN] As Byte
|
---|
| 325 | szSystemStatus[WSASYS_STATUS_LEN] As Byte
|
---|
[1] | 326 | iMaxSockets As Word
|
---|
| 327 | iMaxUdpDg As Word
|
---|
[42] | 328 | lpVendorInfo As *Byte
|
---|
| 329 | #endif
|
---|
[1] | 330 | End Type
|
---|
| 331 |
|
---|
[42] | 332 | TypeDef LPWSADATA = *WSADATA
|
---|
[1] | 333 |
|
---|
[42] | 334 | ' Definitions related to sockets: types, address families, options, taken from the BSD file sys/socket.h.
|
---|
[1] | 335 |
|
---|
[42] | 336 | Const INVALID_SOCKET = (Not 0) As ULONG_PTR
|
---|
| 337 | Const SOCKET_ERROR = (-1)
|
---|
[1] | 338 |
|
---|
[42] | 339 | Const FROM_PROTOCOL_INFO = (-1)
|
---|
[1] | 340 |
|
---|
[42] | 341 | ' Types
|
---|
| 342 | Const SOCK_STREAM = 1
|
---|
| 343 | Const SOCK_DGRAM = 2
|
---|
| 344 | Const SOCK_RAW = 3
|
---|
| 345 | Const SOCK_RDM = 4
|
---|
| 346 | Const SOCK_SEQPACKET = 5
|
---|
[1] | 347 |
|
---|
[42] | 348 | ' Option flags per-socket.
|
---|
| 349 | Const SO_DEBUG = &h0001
|
---|
| 350 | Const SO_ACCEPTCONN = &h0002
|
---|
| 351 | Const SO_REUSEADDR = &h0004
|
---|
| 352 | Const SO_KEEPALIVE = &h0008
|
---|
| 353 | Const SO_DONTROUTE = &h0010
|
---|
| 354 | Const SO_BROADCAST = &h0020
|
---|
| 355 | Const SO_USELOOPBACK = &h0040
|
---|
| 356 | Const SO_LINGER = &h0080
|
---|
| 357 | Const SO_OOBINLINE = &h0100
|
---|
| 358 |
|
---|
| 359 | Const SO_DONTLINGER = ((Not SO_LINGER) As Long)
|
---|
| 360 | Const SO_EXCLUSIVEADDRUSE = ((Not SO_REUSEADDR) As Long)
|
---|
| 361 |
|
---|
| 362 | ' Additional options.
|
---|
| 363 | Const SO_SNDBUF = &h1001
|
---|
| 364 | Const SO_RCVBUF = &h1002
|
---|
| 365 | Const SO_SNDLOWAT = &h1003
|
---|
| 366 | Const SO_RCVLOWAT = &h1004
|
---|
| 367 | Const SO_SNDTIMEO = &h1005
|
---|
| 368 | Const SO_RCVTIMEO = &h1006
|
---|
| 369 | Const SO_ERROR = &h1007
|
---|
| 370 | Const SO_TYPE = &h1008
|
---|
| 371 |
|
---|
| 372 | ' WinSock 2 extension -- new options
|
---|
| 373 | Const SO_GROUP_ID = &h2001
|
---|
| 374 | Const SO_GROUP_PRIORITY = &h2002
|
---|
| 375 | Const SO_MAX_MSG_SIZE = &h2003
|
---|
| 376 | Const SO_PROTOCOL_INFOA = &h2004
|
---|
| 377 | Const SO_PROTOCOL_INFOW = &h2005
|
---|
| 378 | #ifdef UNICODE
|
---|
| 379 | Const SO_PROTOCOL_INFO = SO_PROTOCOL_INFOW
|
---|
| 380 | #else
|
---|
| 381 | Const SO_PROTOCOL_INFO = SO_PROTOCOL_INFOA
|
---|
| 382 | #endif /* UNICODE */
|
---|
| 383 | Const PVD_CONFIG = &h3001
|
---|
| 384 | Const SO_CONDITIONAL_ACCEPT = &h3002
|
---|
| 385 |
|
---|
| 386 | ' TCP options.
|
---|
| 387 | Const TCP_NODELAY = &h0001
|
---|
| 388 |
|
---|
| 389 | ' Address families.
|
---|
| 390 | Const AF_UNSPEC = 0
|
---|
| 391 | Const AF_UNIX = 1
|
---|
| 392 | Const AF_INET = 2
|
---|
| 393 | Const AF_IMPLINK = 3
|
---|
| 394 | Const AF_PUP = 4
|
---|
| 395 | Const AF_CHAOS = 5
|
---|
| 396 | Const AF_NS = 6
|
---|
| 397 | Const AF_IPX = AF_NS
|
---|
| 398 | Const AF_ISO = 7
|
---|
| 399 | Const AF_OSI = AF_ISO
|
---|
| 400 | Const AF_ECMA = 8
|
---|
| 401 | Const AF_DATAKIT = 9
|
---|
| 402 | Const AF_CCITT = 10
|
---|
| 403 | Const AF_SNA = 11
|
---|
| 404 | Const AF_DECnet = 12
|
---|
| 405 | Const AF_DLI = 13
|
---|
| 406 | Const AF_LAT = 14
|
---|
| 407 | Const AF_HYLINK = 15
|
---|
| 408 | Const AF_APPLETALK = 16
|
---|
| 409 | Const AF_NETBIOS = 17
|
---|
| 410 | Const AF_VOICEVIEW = 18
|
---|
| 411 | Const AF_FIREFOX = 19
|
---|
| 412 | Const AF_UNKNOWN1 = 20
|
---|
| 413 | Const AF_BAN = 21
|
---|
| 414 | Const AF_ATM = 22
|
---|
| 415 | Const AF_INET6 = 23
|
---|
| 416 | Const AF_CLUSTER = 24
|
---|
| 417 | Const AF_12844 = 25
|
---|
| 418 | Const AF_IRDA = 26
|
---|
| 419 | Const AF_NETDES = 28
|
---|
| 420 |
|
---|
| 421 | Const AF_TCNPROCESS = 29
|
---|
| 422 | Const AF_TCNMESSAGE = 30
|
---|
| 423 | Const AF_ICLFXBM = 31
|
---|
| 424 |
|
---|
| 425 | Const AF_MAX = 32
|
---|
| 426 |
|
---|
| 427 | ' Structure used by kernel to store most addresses.
|
---|
| 428 | Type sockaddr
|
---|
| 429 | sa_family As Word
|
---|
| 430 | sa_data[ELM(14)] As Byte
|
---|
| 431 | End Type
|
---|
| 432 |
|
---|
| 433 | ' Portable socket structure (RFC 2553).
|
---|
| 434 |
|
---|
| 435 | ' Desired design of maximum size and alignment.
|
---|
| 436 | ' These are implementation specific.
|
---|
| 437 | Const _SS_MAXSIZE = 128 ' Maximum size.
|
---|
| 438 | Const _SS_ALIGNSIZE = (SizeOf (Int64)) 'Desired alignment.
|
---|
| 439 |
|
---|
| 440 | ' Definitions used for sockaddr_storage structure paddings design.
|
---|
| 441 | Const _SS_PAD1SIZE = (_SS_ALIGNSIZE - SizeOf (Integer))
|
---|
| 442 | Const _SS_PAD2SIZE = (_SS_MAXSIZE - (SizeOf (Integer) + _SS_PAD1SIZE + _SS_ALIGNSIZE))
|
---|
| 443 |
|
---|
| 444 | Type sockaddr_storage
|
---|
| 445 | ss_family As Integer
|
---|
| 446 | __ss_pad1[ELM(_SS_PAD1SIZE)] As Byte
|
---|
| 447 | __ss_align As Int64
|
---|
| 448 | __ss_pad2[ELM(_SS_PAD2SIZE)] As Byte
|
---|
| 449 | End Type
|
---|
| 450 |
|
---|
| 451 | Type sockproto
|
---|
| 452 | sp_family As Word
|
---|
| 453 | sp_protocol As Word
|
---|
| 454 | End Type
|
---|
| 455 |
|
---|
| 456 | ' Protocol families, same as address families for now.
|
---|
| 457 | Const PF_UNSPEC = AF_UNSPEC
|
---|
| 458 | Const PF_UNIX = AF_UNIX
|
---|
| 459 | Const PF_INET = AF_INET
|
---|
| 460 | Const PF_IMPLINK = AF_IMPLINK
|
---|
| 461 | Const PF_PUP = AF_PUP
|
---|
| 462 | Const PF_CHAOS = AF_CHAOS
|
---|
| 463 | Const PF_NS = AF_NS
|
---|
| 464 | Const PF_IPX = AF_IPX
|
---|
| 465 | Const PF_ISO = AF_ISO
|
---|
| 466 | Const PF_OSI = AF_OSI
|
---|
| 467 | Const PF_ECMA = AF_ECMA
|
---|
| 468 | Const PF_DATAKIT = AF_DATAKIT
|
---|
| 469 | Const PF_CCITT = AF_CCITT
|
---|
| 470 | Const PF_SNA = AF_SNA
|
---|
| 471 | Const PF_DECnet = AF_DECnet
|
---|
| 472 | Const PF_DLI = AF_DLI
|
---|
| 473 | Const PF_LAT = AF_LAT
|
---|
| 474 | Const PF_HYLINK = AF_HYLINK
|
---|
| 475 | Const PF_APPLETALK = AF_APPLETALK
|
---|
| 476 | Const PF_VOICEVIEW = AF_VOICEVIEW
|
---|
| 477 | Const PF_FIREFOX = AF_FIREFOX
|
---|
| 478 | Const PF_UNKNOWN1 = AF_UNKNOWN1
|
---|
| 479 | Const PF_BAN = AF_BAN
|
---|
| 480 | Const PF_ATM = AF_ATM
|
---|
| 481 | Const PF_INET6 = AF_INET6
|
---|
| 482 |
|
---|
| 483 | Const PF_MAX = AF_MAX
|
---|
| 484 |
|
---|
| 485 | ' Structure used for manipulating linger option.
|
---|
| 486 | Type linger
|
---|
| 487 | l_onoff As Word
|
---|
| 488 | l_linger As Word
|
---|
| 489 | End Type
|
---|
| 490 |
|
---|
| 491 | ' Level number for (get/set)sockopt() to apply to socket itself.
|
---|
| 492 | Const SOL_SOCKET = &hffff
|
---|
| 493 |
|
---|
| 494 | ' Maximum queue length specifiable by listen.
|
---|
| 495 | Const SOMAXCONN = &h7fffffff
|
---|
| 496 |
|
---|
| 497 | Const MSG_OOB = &h1
|
---|
| 498 | Const MSG_PEEK = &h2
|
---|
| 499 | Const MSG_DONTROUTE = &h4
|
---|
| 500 | Const MSG_WAITALL = &h8
|
---|
| 501 |
|
---|
| 502 | Const MSG_PARTIAL = &h8000
|
---|
| 503 |
|
---|
| 504 | ' WinSock 2 extension -- new flags for WSASend(), WSASendTo(), WSARecv() and
|
---|
| 505 | ' WSARecvFrom()
|
---|
| 506 | Const MSG_INTERRUPT = &h10
|
---|
| 507 |
|
---|
| 508 | Const MSG_MAXIOVLEN = 16
|
---|
| 509 |
|
---|
| 510 | ' Define constant based on rfc883, used by gethostbyxxxx() calls.
|
---|
| 511 | Const MAXGETHOSTSTRUCT = 1024
|
---|
| 512 |
|
---|
| 513 | ' WinSock 2 extension -- bit values and indices for FD_XXX network events
|
---|
| 514 | Const FD_READ_BIT = 0
|
---|
| 515 | Const FD_READ = (1 << FD_READ_BIT)
|
---|
| 516 |
|
---|
| 517 | Const FD_WRITE_BIT = 1
|
---|
| 518 | Const FD_WRITE = (1 << FD_WRITE_BIT)
|
---|
| 519 |
|
---|
| 520 | Const FD_OOB_BIT = 2
|
---|
| 521 | Const FD_OOB = (1 << FD_OOB_BIT)
|
---|
| 522 |
|
---|
| 523 | Const FD_ACCEPT_BIT = 3
|
---|
| 524 | Const FD_ACCEPT = (1 << FD_ACCEPT_BIT)
|
---|
| 525 |
|
---|
| 526 | Const FD_CONNECT_BIT = 4
|
---|
| 527 | Const FD_CONNECT = (1 << FD_CONNECT_BIT)
|
---|
| 528 |
|
---|
| 529 | Const FD_CLOSE_BIT = 5
|
---|
| 530 | Const FD_CLOSE = (1 << FD_CLOSE_BIT)
|
---|
| 531 |
|
---|
| 532 | Const FD_QOS_BIT = 6
|
---|
| 533 | Const FD_QOS = (1 << FD_QOS_BIT)
|
---|
| 534 |
|
---|
| 535 | Const FD_GROUP_QOS_BIT = 7
|
---|
| 536 | Const FD_GROUP_QOS = (1 << FD_GROUP_QOS_BIT)
|
---|
| 537 |
|
---|
| 538 | Const FD_ROUTING_INTERFACE_CHANGE_BIT = 8
|
---|
| 539 | Const FD_ROUTING_INTERFACE_CHANGE = (1 << FD_ROUTING_INTERFACE_CHANGE_BIT)
|
---|
| 540 |
|
---|
| 541 | Const FD_ADDRESS_LIST_CHANGE_BIT = 9
|
---|
| 542 | Const FD_ADDRESS_LIST_CHANGE = (1 << FD_ADDRESS_LIST_CHANGE_BIT)
|
---|
| 543 |
|
---|
| 544 | Const FD_MAX_EVENTS = 10
|
---|
| 545 | Const FD_ALL_EVENTS = ((1 << FD_MAX_EVENTS) - 1)
|
---|
| 546 |
|
---|
[497] | 547 | #require <api_winerror.sbp>
|
---|
[42] | 548 |
|
---|
| 549 | ' Compatibility macros.
|
---|
| 550 |
|
---|
| 551 | 'Const h_errno = WSAGetLastError()
|
---|
| 552 | Const HOST_NOT_FOUND = WSAHOST_NOT_FOUND
|
---|
| 553 | Const TRY_AGAIN = WSATRY_AGAIN
|
---|
| 554 | Const NO_RECOVERY = WSANO_RECOVERY
|
---|
| 555 | Const NO_DATA = WSANO_DATA
|
---|
| 556 | Const WSANO_ADDRESS = WSANO_DATA
|
---|
| 557 | Const NO_ADDRESS = WSANO_ADDRESS
|
---|
| 558 |
|
---|
| 559 | ' WinSock 2 extension -- new error codes and type definition
|
---|
| 560 |
|
---|
| 561 | '#ifdef _WIN32
|
---|
| 562 |
|
---|
| 563 | TypeDef WSAEVENT = HANDLE
|
---|
| 564 | TypeDef LPWSAEVENT = *HANDLE
|
---|
| 565 | TypeDef WSAOVERLAPPED = OVERLAPPED
|
---|
| 566 | TypeDef LPWSAOVERLAPPED = *OVERLAPPED
|
---|
| 567 |
|
---|
| 568 | Const WSA_IO_PENDING = (ERROR_IO_PENDING)
|
---|
| 569 | Const WSA_IO_INCOMPLETE = (ERROR_IO_INCOMPLETE)
|
---|
| 570 | Const WSA_INVALID_HANDLE = (ERROR_INVALID_HANDLE)
|
---|
| 571 | Const WSA_INVALID_PARAMETER = (ERROR_INVALID_PARAMETER)
|
---|
| 572 | Const WSA_NOT_ENOUGH_MEMORY = (ERROR_NOT_ENOUGH_MEMORY)
|
---|
| 573 | Const WSA_OPERATION_ABORTED = (ERROR_OPERATION_ABORTED)
|
---|
| 574 |
|
---|
| 575 | Const WSA_INVALID_EVENT = (0 As WSAEVENT)
|
---|
| 576 | Const WSA_MAXIMUM_WAIT_EVENTS = (MAXIMUM_WAIT_OBJECTS)
|
---|
| 577 | Const WSA_WAIT_FAILED = (WAIT_FAILED)
|
---|
| 578 | Const WSA_WAIT_EVENT_0 = (WAIT_OBJECT_0)
|
---|
| 579 | Const WSA_WAIT_IO_COMPLETION = (WAIT_IO_COMPLETION)
|
---|
| 580 | Const WSA_WAIT_TIMEOUT = (WAIT_TIMEOUT)
|
---|
| 581 | Const WSA_INFINITE = (INFINITE)
|
---|
| 582 |
|
---|
| 583 | '#elif defined _WIN16
|
---|
| 584 | '#endif
|
---|
| 585 |
|
---|
| 586 | Type WSABUF
|
---|
| 587 | len As DWord
|
---|
| 588 | buf As *Byte
|
---|
| 589 | End Type
|
---|
| 590 | TypeDef LPWSABUF = *WSABUF
|
---|
| 591 |
|
---|
[497] | 592 | #require <qos.ab>
|
---|
[42] | 593 |
|
---|
| 594 | Type QOS 'struct _QualityOfService
|
---|
| 595 | SendingFlowspec As FLOWSPEC
|
---|
| 596 | ReceivingFlowspec As FLOWSPEC
|
---|
| 597 | ProviderSpecific As WSABUF
|
---|
| 598 | End Type
|
---|
| 599 | TypeDef LPQOS = *QOS
|
---|
| 600 |
|
---|
| 601 | ' WinSock 2 extension -- manifest constants for return values of the condition function
|
---|
| 602 | Const CF_ACCEPT = &h0000
|
---|
| 603 | Const CF_REJECT = &h0001
|
---|
| 604 | Const CF_DEFER = &h0002
|
---|
| 605 |
|
---|
| 606 | ' WinSock 2 extension -- manifest constants for shutdown()
|
---|
| 607 | Const SD_RECEIVE = &h00
|
---|
| 608 | Const SD_SEND = &h01
|
---|
| 609 | Const SD_BOTH = &h02
|
---|
| 610 |
|
---|
| 611 | ' WinSock 2 extension -- data type and manifest constants for socket groups
|
---|
| 612 | TypeDef GROUP = DWord
|
---|
| 613 |
|
---|
| 614 | Const SG_UNCONSTRAINED_GROUP = &h01
|
---|
| 615 | Const SG_CONSTRAINED_GROUP = &h02
|
---|
| 616 |
|
---|
| 617 | ' WinSock 2 extension -- data type for WSAEnumNetworkEvents()
|
---|
| 618 | Type WSANETWORKEVENTS
|
---|
| 619 | lNetworkEvents As Long
|
---|
| 620 | iErrorCode[ELM(FD_MAX_EVENTS)] As Long
|
---|
| 621 | End Type
|
---|
| 622 | TypeDef LPWSANETWORKEVENTS = *WSANETWORKEVENTS
|
---|
| 623 |
|
---|
| 624 | ' WinSock 2 extension -- WSAPROTOCOL_INFO structure and associated
|
---|
| 625 | ' manifest constants
|
---|
| 626 |
|
---|
| 627 | Const MAX_PROTOCOL_CHAIN = 7
|
---|
| 628 |
|
---|
| 629 | Const BASE_PROTOCOL = 1
|
---|
| 630 | Const LAYERED_PROTOCOL = 0
|
---|
| 631 |
|
---|
| 632 | Type WSAPROTOCOLCHAIN
|
---|
| 633 | ChainLen As Long
|
---|
| 634 | ChainEntries[ELM(MAX_PROTOCOL_CHAIN)] As DWord
|
---|
| 635 | End Type
|
---|
| 636 | TypeDef LPWSAPROTOCOLCHAIN = *WSAPROTOCOLCHAIN
|
---|
| 637 |
|
---|
| 638 | Const WSAPROTOCOL_LEN = 255
|
---|
| 639 |
|
---|
| 640 | Type WSAPROTOCOL_INFOA
|
---|
| 641 | dwServiceFlags1 As DWord
|
---|
| 642 | dwServiceFlags2 As DWord
|
---|
| 643 | dwServiceFlags3 As DWord
|
---|
| 644 | dwServiceFlags4 As DWord
|
---|
| 645 | dwProviderFlags As DWord
|
---|
| 646 | ProviderId As GUID
|
---|
| 647 | dwCatalogEntryId As DWord
|
---|
| 648 | ProtocolChain As WSAPROTOCOLCHAIN
|
---|
| 649 | iVersion As Long
|
---|
| 650 | iAddressFamily As Long
|
---|
| 651 | iMaxSockAddr As Long
|
---|
| 652 | iMinSockAddr As Long
|
---|
| 653 | iSocketType As Long
|
---|
| 654 | iProtocol As Long
|
---|
| 655 | iProtocolMaxOffset As Long
|
---|
| 656 | iNetworkByteOrder As Long
|
---|
| 657 | iSecurityScheme As Long
|
---|
| 658 | dwMessageSize As DWord
|
---|
| 659 | dwProviderReserved As DWord
|
---|
| 660 | szProtocol[WSAPROTOCOL_LEN] As Byte
|
---|
| 661 | End Type
|
---|
| 662 | TypeDef LPWSAPROTOCOL_INFOA = *WSAPROTOCOL_INFOA
|
---|
| 663 |
|
---|
| 664 | Type WSAPROTOCOL_INFOW
|
---|
| 665 | dwServiceFlags1 As DWord
|
---|
| 666 | dwServiceFlags2 As DWord
|
---|
| 667 | dwServiceFlags3 As DWord
|
---|
| 668 | dwServiceFlags4 As DWord
|
---|
| 669 | dwProviderFlags As DWord
|
---|
| 670 | ProviderId As GUID
|
---|
| 671 | dwCatalogEntryId As DWord
|
---|
| 672 | ProtocolChain As WSAPROTOCOLCHAIN
|
---|
| 673 | iVersion As Long
|
---|
| 674 | iAddressFamily As Long
|
---|
| 675 | iMaxSockAddr As Long
|
---|
| 676 | iMinSockAddr As Long
|
---|
| 677 | iSocketType As Long
|
---|
| 678 | iProtocol As Long
|
---|
| 679 | iProtocolMaxOffset As Long
|
---|
| 680 | iNetworkByteOrder As Long
|
---|
| 681 | iSecurityScheme As Long
|
---|
| 682 | dwMessageSize As DWord
|
---|
| 683 | dwProviderReserved As DWord
|
---|
| 684 | szProtocol[WSAPROTOCOL_LEN] As WCHAR
|
---|
| 685 | End Type
|
---|
| 686 | TypeDef LPWSAPROTOCOL_INFOW = *WSAPROTOCOL_INFOW
|
---|
| 687 |
|
---|
| 688 | #ifdef UNICODE
|
---|
| 689 | TypeDef WSAPROTOCOL_INFO = WSAPROTOCOL_INFOW
|
---|
| 690 | TypeDef LPWSAPROTOCOL_INFO = LPWSAPROTOCOL_INFOW
|
---|
| 691 | #else
|
---|
| 692 | TypeDef WSAPROTOCOL_INFO = WSAPROTOCOL_INFOA
|
---|
| 693 | TypeDef LPWSAPROTOCOL_INFO = LPWSAPROTOCOL_INFOA
|
---|
| 694 | #endif
|
---|
| 695 |
|
---|
| 696 | ' Flag bit definitions for dwProviderFlags
|
---|
| 697 | Const PFL_MULTIPLE_PROTO_ENTRIES = &h00000001
|
---|
| 698 | Const PFL_RECOMMENDED_PROTO_ENTRY = &h00000002
|
---|
| 699 | Const PFL_HIDDEN = &h00000004
|
---|
| 700 | Const PFL_MATCHES_PROTOCOL_ZERO = &h00000008
|
---|
| 701 |
|
---|
| 702 | ' Flag bit definitions for dwServiceFlags1
|
---|
| 703 | Const XP1_CONNECTIONLESS = &h00000001
|
---|
| 704 | Const XP1_GUARANTEED_DELIVERY = &h00000002
|
---|
| 705 | Const XP1_GUARANTEED_ORDER = &h00000004
|
---|
| 706 | Const XP1_MESSAGE_ORIENTED = &h00000008
|
---|
| 707 | Const XP1_PSEUDO_STREAM = &h00000010
|
---|
| 708 | Const XP1_GRACEFUL_CLOSE = &h00000020
|
---|
| 709 | Const XP1_EXPEDITED_DATA = &h00000040
|
---|
| 710 | Const XP1_CONNECT_DATA = &h00000080
|
---|
| 711 | Const XP1_DISCONNECT_DATA = &h00000100
|
---|
| 712 | Const XP1_SUPPORT_BROADCAST = &h00000200
|
---|
| 713 | Const XP1_SUPPORT_MULTIPOINT = &h00000400
|
---|
| 714 | Const XP1_MULTIPOINT_CONTROL_PLANE = &h00000800
|
---|
| 715 | Const XP1_MULTIPOINT_DATA_PLANE = &h00001000
|
---|
| 716 | Const XP1_QOS_SUPPORTED = &h00002000
|
---|
| 717 | Const XP1_INTERRUPT = &h00004000
|
---|
| 718 | Const XP1_UNI_SEND = &h00008000
|
---|
| 719 | Const XP1_UNI_RECV = &h00010000
|
---|
| 720 | Const XP1_IFS_HANDLES = &h00020000
|
---|
| 721 | Const XP1_PARTIAL_MESSAGE = &h00040000
|
---|
| 722 |
|
---|
| 723 | Const BIGENDIAN = &h0000
|
---|
| 724 | Const LITTLEENDIAN = &h0001
|
---|
| 725 |
|
---|
| 726 | Const SECURITY_PROTOCOL_NONE = &h0000
|
---|
| 727 |
|
---|
| 728 | ' WinSock 2 extension -- manifest constants for WSAJoinLeaf()
|
---|
| 729 | Const JL_SENDER_ONLY = &h01
|
---|
| 730 | Const JL_RECEIVER_ONLY = &h02
|
---|
| 731 | Const JL_BOTH = &h04
|
---|
| 732 |
|
---|
| 733 | ' WinSock 2 extension -- manifest constants for WSASocket()
|
---|
| 734 | Const WSA_FLAG_OVERLAPPED = &h01
|
---|
| 735 | Const WSA_FLAG_MULTIPOINT_C_ROOT = &h02
|
---|
| 736 | Const WSA_FLAG_MULTIPOINT_C_LEAF = &h04
|
---|
| 737 | Const WSA_FLAG_MULTIPOINT_D_ROOT = &h08
|
---|
| 738 | Const WSA_FLAG_MULTIPOINT_D_LEAF = &h10
|
---|
| 739 |
|
---|
| 740 | ' WinSock 2 extension -- manifest constants for WSAIoctl()
|
---|
| 741 | Const IOC_UNIX = &h00000000
|
---|
| 742 | Const IOC_WS2 = &h08000000
|
---|
| 743 | Const IOC_PROTOCOL = &h10000000
|
---|
| 744 | Const IOC_VENDOR = &h18000000
|
---|
| 745 |
|
---|
| 746 | Const _WSAIO(x, y) = (IOC_VOID Or (x) Or (y))
|
---|
| 747 | Const _WSAIOR(x, y) = (IOC_OUT Or (x) Or (y))
|
---|
| 748 | Const _WSAIOW(x, y) = (IOC_IN Or (x) Or (y))
|
---|
| 749 | Const _WSAIORW(x, y) = (IOC_INOUT Or (x) Or (y))
|
---|
| 750 |
|
---|
| 751 | Const SIO_ASSOCIATE_HANDLE = _WSAIOW(IOC_WS2, 1)
|
---|
| 752 | Const SIO_ENABLE_CIRCULAR_QUEUEING = _WSAIO(IOC_WS2, 2)
|
---|
| 753 | Const SIO_FIND_ROUTE = _WSAIOR(IOC_WS2, 3)
|
---|
| 754 | Const SIO_FLUSH = _WSAIO(IOC_WS2, 4)
|
---|
| 755 | Const SIO_GET_BROADCAST_ADDRESS = _WSAIOR(IOC_WS2, 5)
|
---|
| 756 | Const SIO_GET_EXTENSION_FUNCTION_POINTER = _WSAIORW(IOC_WS2, 6)
|
---|
| 757 | Const SIO_GET_QOS = _WSAIORW(IOC_WS2, 7)
|
---|
| 758 | Const SIO_GET_GROUP_QOS = _WSAIORW(IOC_WS2, 8)
|
---|
| 759 | Const SIO_MULTIPOINT_LOOPBACK = _WSAIOW(IOC_WS2, 9)
|
---|
| 760 | Const SIO_MULTICAST_SCOPE = _WSAIOW(IOC_WS2, 10)
|
---|
| 761 | Const SIO_SET_QOS = _WSAIOW(IOC_WS2, 11)
|
---|
| 762 | Const SIO_SET_GROUP_QOS = _WSAIOW(IOC_WS2, 12)
|
---|
| 763 | Const SIO_TRANSLATE_HANDLE = _WSAIORW(IOC_WS2, 13)
|
---|
| 764 | Const SIO_ROUTING_INTERFACE_QUERY = _WSAIORW(IOC_WS2, 20)
|
---|
| 765 | Const SIO_ROUTING_INTERFACE_CHANGE = _WSAIOW(IOC_WS2, 21)
|
---|
| 766 | Const SIO_ADDRESS_LIST_QUERY = _WSAIOR(IOC_WS2, 22)
|
---|
| 767 | Const SIO_ADDRESS_LIST_CHANGE = _WSAIO(IOC_WS2, 23)
|
---|
| 768 | Const SIO_QUERY_TARGET_PNP_HANDLE = _WSAIOR(IOC_WS2, 24)
|
---|
| 769 | Const SIO_ADDRESS_LIST_SORT = _WSAIORW(IOC_WS2, 25)
|
---|
| 770 |
|
---|
| 771 | ' WinSock 2 extensions -- data types for the condition function in
|
---|
| 772 | ' WSAAccept() and overlapped I/O completion routine.
|
---|
| 773 |
|
---|
| 774 | TypeDef LPCONDITIONPROC = *Function(
|
---|
| 775 | ByRef CallerId As WSABUF,
|
---|
| 776 | ByRef CallerData As WSABUF,
|
---|
| 777 | ByRef lpSQOS As QOS,
|
---|
| 778 | ByRef lpGQOS As QOS,
|
---|
| 779 | ByRef lpCalleeId As WSABUF,
|
---|
| 780 | ByRef lpCalleeData As WSABUF,
|
---|
| 781 | ByRef g As GROUP,
|
---|
| 782 | dwCallbackData As ULONG_PTR
|
---|
| 783 | ) As Long
|
---|
| 784 |
|
---|
| 785 | TypeDef LPWSAOVERLAPPED_COMPLETION_ROUTINE = *Sub(
|
---|
| 786 | dwError As DWord,
|
---|
| 787 | cbTransferred As DWord,
|
---|
| 788 | ByRef Overlapped As WSAOVERLAPPED,
|
---|
| 789 | dwFlags As DWord)
|
---|
| 790 |
|
---|
| 791 | ' WinSock 2 extension -- manifest constants and associated structures
|
---|
| 792 | ' for WSANSPIoctl()
|
---|
| 793 | Const SIO_NSP_NOTIFY_CHANGE = _WSAIOW(IOC_WS2, 25)
|
---|
| 794 |
|
---|
| 795 | Const Enum WSACOMPLETIONTYPE
|
---|
| 796 | NSP_NOTIFY_IMMEDIATELY = 0
|
---|
| 797 | NSP_NOTIFY_HWND
|
---|
| 798 | NSP_NOTIFY_EVENT
|
---|
| 799 | NSP_NOTIFY_PORT
|
---|
| 800 | NSP_NOTIFY_APC
|
---|
| 801 | End Enum
|
---|
| 802 |
|
---|
| 803 | TypeDef PWSACOMPLETIONTYPE = *WSACOMPLETIONTYPE
|
---|
| 804 | TypeDef LPWSACOMPLETIONTYPE = *WSACOMPLETIONTYPE
|
---|
| 805 |
|
---|
| 806 | Type _System_WinSock_WSACOMPLETION_WINDOWMESSAGE
|
---|
| 807 | hWnd As HWND
|
---|
| 808 | uMsg As DWord
|
---|
| 809 | context As WPARAM
|
---|
| 810 | End Type
|
---|
| 811 |
|
---|
| 812 | Type _System_WinSock_WSACOMPLETION_EVENT
|
---|
| 813 | lpOverlapped As LPWSAOVERLAPPED
|
---|
| 814 | End Type
|
---|
| 815 |
|
---|
| 816 | Type _System_WinSock_WSACOMPLETION_APC
|
---|
| 817 | lpOverlapped As LPWSAOVERLAPPED
|
---|
| 818 | lpfnCompletionProc As LPWSAOVERLAPPED_COMPLETION_ROUTINE
|
---|
| 819 | End Type
|
---|
| 820 |
|
---|
| 821 | Type _System_WinSock_WSACOMPLETION_PORT
|
---|
| 822 | lpOverlapped As LPWSAOVERLAPPED
|
---|
| 823 | hPort As HANDLE
|
---|
| 824 | Key As ULONG_PTR
|
---|
| 825 | End Type
|
---|
| 826 |
|
---|
[150] | 827 | Type /*Class*/ WSACOMPLETION
|
---|
| 828 | 'Public
|
---|
[42] | 829 | Type_ As WSACOMPLETIONTYPE
|
---|
| 830 | /*
|
---|
| 831 | Parameters As Union
|
---|
| 832 | WindowMessage As _System_WinSock_WSACOMPLETION_WINDOWMESSAGE
|
---|
| 833 | Event As _System_WinSock_WSACOMPLETION_EVENT
|
---|
| 834 | Apc As _System_WinSock_WSACOMPLETION_APC
|
---|
| 835 | Port As _System_WinSock_WSACOMPLETION_PORT
|
---|
| 836 | End Union
|
---|
| 837 | */
|
---|
| 838 | Port As _System_WinSock_WSACOMPLETION_PORT
|
---|
[150] | 839 | /*
|
---|
[42] | 840 | Function WindowMessage() As _System_WinSock_WSACOMPLETION_WINDOWMESSAGE
|
---|
| 841 | Dim p As *_System_WinSock_WSACOMPLETION_WINDOWMESSAGE
|
---|
| 842 | p = VarPtr(Port) As *_System_WinSock_WSACOMPLETION_WINDOWMESSAGE
|
---|
| 843 | Return p[0]
|
---|
| 844 | End Function
|
---|
| 845 |
|
---|
| 846 | Sub WindowMessage(w As _System_WinSock_WSACOMPLETION_WINDOWMESSAGE)
|
---|
| 847 | Dim p As *_System_WinSock_WSACOMPLETION_WINDOWMESSAGE
|
---|
| 848 | p = VarPtr(Port) As *_System_WinSock_WSACOMPLETION_WINDOWMESSAGE
|
---|
| 849 | p[0] = w
|
---|
| 850 | End Sub
|
---|
| 851 |
|
---|
| 852 | Function Event() As _System_WinSock_WSACOMPLETION_EVENT
|
---|
| 853 | Dim p As *_System_WinSock_WSACOMPLETION_EVENT
|
---|
| 854 | p = VarPtr(Port) As *_System_WinSock_WSACOMPLETION_EVENT
|
---|
| 855 | Return p[0]
|
---|
| 856 | End Function
|
---|
| 857 |
|
---|
| 858 | Sub Event(e As _System_WinSock_WSACOMPLETION_EVENT)
|
---|
| 859 | Dim p As *_System_WinSock_WSACOMPLETION_EVENT
|
---|
| 860 | p = VarPtr(Port) As *_System_WinSock_WSACOMPLETION_EVENT
|
---|
| 861 | p[0] = e
|
---|
| 862 | End Sub
|
---|
| 863 |
|
---|
| 864 | Function Apc() As _System_WinSock_WSACOMPLETION_APC
|
---|
| 865 | Dim p As *_System_WinSock_WSACOMPLETION_APC
|
---|
| 866 | p = VarPtr(Port) As *_System_WinSock_WSACOMPLETION_APC
|
---|
| 867 | Return p[0]
|
---|
| 868 | End Function
|
---|
| 869 |
|
---|
| 870 | Sub Apc(a As _System_WinSock_WSACOMPLETION_APC)
|
---|
| 871 | Dim p As *_System_WinSock_WSACOMPLETION_APC
|
---|
| 872 | p = VarPtr(Port) As *_System_WinSock_WSACOMPLETION_APC
|
---|
| 873 | p[0] = a
|
---|
| 874 | End Sub
|
---|
| 875 | /*
|
---|
| 876 | Function Port() As _System_WinSock_WSACOMPLETION_PORT
|
---|
| 877 | Dim p As *_System_WinSock_WSACOMPLETION_PORT
|
---|
| 878 | p = VarPtr(Port) As *_System_WinSock_WSACOMPLETION_PORT
|
---|
| 879 | Return p[0]
|
---|
| 880 | End Function
|
---|
| 881 |
|
---|
| 882 | Sub Port(p As _System_WinSock_WSACOMPLETION_PORT)
|
---|
| 883 | Dim p As *_System_WinSock_WSACOMPLETION_PORT
|
---|
| 884 | p = VarPtr(Port) As *_System_WinSock_WSACOMPLETION_PORT
|
---|
| 885 | p[0] = p
|
---|
| 886 | End Sub
|
---|
| 887 | */
|
---|
[150] | 888 | End Type 'Class
|
---|
[42] | 889 |
|
---|
| 890 | TypeDef PWSACOMPLETION = *WSACOMPLETION
|
---|
| 891 | TypeDef LPWSACOMPLETION = *WSACOMPLETION
|
---|
| 892 |
|
---|
| 893 | ' WinSock 2 extension -- manifest constants for SIO_TRANSLATE_HANDLE ioctl
|
---|
| 894 | Const TH_NETDEV = &h00000001
|
---|
| 895 | Const TH_TAPI = &h00000002
|
---|
| 896 |
|
---|
| 897 | TypeDef SOCKADDR = sockaddr
|
---|
| 898 | TypeDef PSOCKADDR = *sockaddr
|
---|
| 899 | TypeDef LPSOCKADDR = *sockaddr
|
---|
| 900 |
|
---|
| 901 | TypeDef SOCKADDR_STORAGE = sockaddr_storage
|
---|
| 902 | TypeDef PSOCKADDR_STORAGE = *sockaddr_storage
|
---|
| 903 | TypeDef LPSOCKADDR_STORAGE = *sockaddr_storage
|
---|
| 904 |
|
---|
| 905 | ' Manifest constants and type definitions related to name resolution and
|
---|
| 906 | ' registration (RNR) API
|
---|
| 907 |
|
---|
| 908 | Type BLOB
|
---|
| 909 | cbSize As DWord
|
---|
| 910 | #ifdef MIDL_PASS
|
---|
| 911 | [size_is(cbSize)] pBlobData As *Byte
|
---|
| 912 | #else
|
---|
| 913 | pBlobData As *Byte
|
---|
| 914 | #endif
|
---|
| 915 | End Type
|
---|
| 916 | TypeDef LPBLOB = *BLOB
|
---|
| 917 |
|
---|
| 918 | ' Service Install Flags
|
---|
| 919 | Const SERVICE_MULTIPLE = (&h00000001)
|
---|
| 920 |
|
---|
| 921 | ' Name Spaces
|
---|
| 922 |
|
---|
| 923 | Const NS_ALL = (0)
|
---|
| 924 |
|
---|
| 925 | Const NS_SAP = (1)
|
---|
| 926 | Const NS_NDS = (2)
|
---|
| 927 | Const NS_PEER_BROWSE = (3)
|
---|
| 928 | Const NS_SLP = (5)
|
---|
| 929 | Const NS_DHCP = (6)
|
---|
| 930 |
|
---|
| 931 | Const NS_TCPIP_LOCAL = (10)
|
---|
| 932 | Const NS_TCPIP_HOSTS = (11)
|
---|
| 933 | Const NS_DNS = (12)
|
---|
| 934 | Const NS_NETBT = (13)
|
---|
| 935 | Const NS_WINS = (14)
|
---|
| 936 | Const NS_NLA = (15)
|
---|
| 937 |
|
---|
| 938 | Const NS_NBP = (20)
|
---|
| 939 |
|
---|
| 940 | Const NS_MS = (30)
|
---|
| 941 | Const NS_STDA = (31)
|
---|
| 942 | Const NS_NTDS = (32)
|
---|
| 943 |
|
---|
| 944 | Const NS_X500 = (40)
|
---|
| 945 | Const NS_NIS = (41)
|
---|
| 946 | Const NS_NISPLUS = (42)
|
---|
| 947 |
|
---|
| 948 | Const NS_WRQ = (50)
|
---|
| 949 |
|
---|
| 950 | Const NS_NETDES = (60)
|
---|
| 951 |
|
---|
| 952 | ' Resolution flags for WSAGetAddressByName().
|
---|
| 953 | Const RES_UNUSED_1 = (&h00000001)
|
---|
| 954 | Const RES_FLUSH_CACHE = (&h00000002)
|
---|
| 955 | Const RES_SERVICE = (&h00000004)
|
---|
| 956 |
|
---|
| 957 | ' Well known value names for Service Types
|
---|
| 958 |
|
---|
[497] | 959 | 'Const SERVICE_TYPE_VALUE_IPXPORTA = "IpxSocket"
|
---|
[42] | 960 | 'Const SERVICE_TYPE_VALUE_IPXPORTW = L"IpxSocket"
|
---|
[497] | 961 | 'Const SERVICE_TYPE_VALUE_SAPIDA = "SapId"
|
---|
[42] | 962 | 'Const SERVICE_TYPE_VALUE_SAPIDW = L"SapId"
|
---|
| 963 |
|
---|
[497] | 964 | 'Const SERVICE_TYPE_VALUE_TCPPORTA = "TcpPort"
|
---|
[42] | 965 | 'Const SERVICE_TYPE_VALUE_TCPPORTW = L"TcpPort"
|
---|
| 966 |
|
---|
[497] | 967 | 'Const SERVICE_TYPE_VALUE_UDPPORTA = "UdpPort"
|
---|
[42] | 968 | 'Const SERVICE_TYPE_VALUE_UDPPORTW = L"UdpPort"
|
---|
| 969 |
|
---|
[497] | 970 | 'Const SERVICE_TYPE_VALUE_OBJECTIDA = "ObjectId"
|
---|
[42] | 971 | 'Const SERVICE_TYPE_VALUE_OBJECTIDW = L"ObjectId"
|
---|
[497] | 972 | /*
|
---|
[42] | 973 | #ifdef UNICODE
|
---|
| 974 | Const SERVICE_TYPE_VALUE_SAPID = SERVICE_TYPE_VALUE_SAPIDW
|
---|
| 975 | Const SERVICE_TYPE_VALUE_TCPPORT = SERVICE_TYPE_VALUE_TCPPORTW
|
---|
| 976 | Const SERVICE_TYPE_VALUE_UDPPORT = SERVICE_TYPE_VALUE_UDPPORTW
|
---|
| 977 | Const SERVICE_TYPE_VALUE_OBJECTID = SERVICE_TYPE_VALUE_OBJECTIDW
|
---|
| 978 | #else
|
---|
| 979 | Const SERVICE_TYPE_VALUE_SAPID = SERVICE_TYPE_VALUE_SAPIDA
|
---|
| 980 | Const SERVICE_TYPE_VALUE_TCPPORT = SERVICE_TYPE_VALUE_TCPPORTA
|
---|
| 981 | Const SERVICE_TYPE_VALUE_UDPPORT = SERVICE_TYPE_VALUE_UDPPORTA
|
---|
| 982 | Const SERVICE_TYPE_VALUE_OBJECTID = SERVICE_TYPE_VALUE_OBJECTIDA
|
---|
| 983 | #endif
|
---|
[497] | 984 | */
|
---|
| 985 | Const SERVICE_TYPE_VALUE_IPXPORT = "IpxSocket"
|
---|
| 986 | Const SERVICE_TYPE_VALUE_SAPID = "SapId"
|
---|
| 987 | Const SERVICE_TYPE_VALUE_TCPPORT = "TcpPort"
|
---|
| 988 | Const SERVICE_TYPE_VALUE_UDPPORT = "UdpPort"
|
---|
| 989 | Const SERVICE_TYPE_VALUE_OBJECTID = "ObjectId"
|
---|
[42] | 990 |
|
---|
| 991 | ' SockAddr Information
|
---|
| 992 | Type SOCKET_ADDRESS
|
---|
| 993 | lpSockaddr As LPSOCKADDR
|
---|
| 994 | iSockaddrLength As Long
|
---|
| 995 | End Type
|
---|
| 996 | TypeDef PSOCKET_ADDRESS = *SOCKET_ADDRESS
|
---|
| 997 | TypeDef LPSOCKET_ADDRESS = *SOCKET_ADDRESS
|
---|
| 998 |
|
---|
| 999 | ' CSAddr Information
|
---|
| 1000 | Type CSADDR_INFO
|
---|
| 1001 | LocalAddr As SOCKET_ADDRESS
|
---|
| 1002 | RemoteAddr As SOCKET_ADDRESS
|
---|
| 1003 | iSocketType As Long
|
---|
| 1004 | iProtocol As Long
|
---|
| 1005 | End Type
|
---|
| 1006 | TypeDef PCSADDR_INFO = *CSADDR_INFO
|
---|
| 1007 | TypeDef LPCSADDR_INFO = *CSADDR_INFO
|
---|
| 1008 |
|
---|
| 1009 | ' Address list returned via SIO_ADDRESS_LIST_QUERY
|
---|
| 1010 | Type SOCKET_ADDRESS_LIST
|
---|
| 1011 | iAddressCount As Long
|
---|
| 1012 | Address[ELM(1)] As SOCKET_ADDRESS
|
---|
| 1013 | End Type
|
---|
| 1014 | TypeDef LPSOCKET_ADDRESS_LIST = *SOCKET_ADDRESS_LIST
|
---|
| 1015 |
|
---|
| 1016 | ' Address Family/Protocol Tuples
|
---|
| 1017 | Type AFPROTOCOLS
|
---|
| 1018 | iAddressFamily As Long
|
---|
| 1019 | iProtocol As Long
|
---|
| 1020 | End Type
|
---|
| 1021 | TypeDef PAFPROTOCOLS = *AFPROTOCOLS
|
---|
| 1022 | TypeDef LPAFPROTOCOLS = *AFPROTOCOLS
|
---|
| 1023 |
|
---|
| 1024 | ' Client Query API Typedefs
|
---|
| 1025 |
|
---|
| 1026 | ' The comparators
|
---|
| 1027 | Const Enum WSAECOMPARATOR
|
---|
| 1028 | COMP_EQUAL = 0
|
---|
| 1029 | COMP_NOTLESS
|
---|
| 1030 | End Enum
|
---|
| 1031 | TypeDef PWSAECOMPARATOR = *WSAECOMPARATOR
|
---|
| 1032 | TypeDef LPWSAECOMPARATOR = *WSAECOMPARATOR
|
---|
| 1033 |
|
---|
| 1034 | Type WSAVERSION
|
---|
| 1035 | dwVersion As DWord
|
---|
| 1036 | ecHow As WSAECOMPARATOR
|
---|
| 1037 | End Type
|
---|
| 1038 | TypeDef PWSAVERSION = *WSAVERSION
|
---|
| 1039 | TypeDef LPWSAVERSION = *WSAVERSION
|
---|
| 1040 |
|
---|
| 1041 | Type WSAQUERYSETA
|
---|
| 1042 | dwSize As DWord
|
---|
| 1043 | lpszServiceInstanceName As LPSTR
|
---|
| 1044 | lpServiceClassId As *GUID
|
---|
| 1045 | lpVersion As LPWSAVERSION
|
---|
| 1046 | lpszComment As LPSTR
|
---|
| 1047 | dwNameSpace As DWord
|
---|
| 1048 | lpNSProviderId As *GUID
|
---|
| 1049 | lpszContext As LPSTR
|
---|
| 1050 | dwNumberOfProtocols As DWord
|
---|
| 1051 | lpafpProtocols As LPAFPROTOCOLS
|
---|
| 1052 | lpszQueryString As LPSTR
|
---|
| 1053 | dwNumberOfCsAddrs As DWord
|
---|
| 1054 | lpcsaBuffer As LPCSADDR_INFO
|
---|
| 1055 | dwOutputFlags As DWord
|
---|
| 1056 | lpBlob As LPBLOB
|
---|
| 1057 | End Type
|
---|
| 1058 | TypeDef PWSAQUERYSETA = *WSAQUERYSETA
|
---|
| 1059 | TypeDef LPWSAQUERYSETA = *WSAQUERYSETA
|
---|
| 1060 |
|
---|
| 1061 | Type WSAQUERYSETW
|
---|
| 1062 | dwSize As DWord
|
---|
| 1063 | lpszServiceInstanceName As LPWSTR
|
---|
| 1064 | lpServiceClassId As *GUID
|
---|
| 1065 | lpVersion As LPWSAVERSION
|
---|
| 1066 | lpszComment As LPWSTR
|
---|
| 1067 | dwNameSpace As DWord
|
---|
| 1068 | lpNSProviderId As *GUID
|
---|
| 1069 | lpszContext As LPWSTR
|
---|
| 1070 | dwNumberOfProtocols As DWord
|
---|
| 1071 | lpafpProtocols As LPAFPROTOCOLS
|
---|
| 1072 | lpszQueryString As LPWSTR
|
---|
| 1073 | dwNumberOfCsAddrs As DWord
|
---|
| 1074 | lpcsaBuffer As LPCSADDR_INFO
|
---|
| 1075 | dwOutputFlags As DWord
|
---|
| 1076 | lpBlob As LPBLOB
|
---|
| 1077 | End Type
|
---|
| 1078 | TypeDef PWSAQUERYSETW = *WSAQUERYSETW
|
---|
| 1079 | TypeDef LPWSAQUERYSETW = *WSAQUERYSETW
|
---|
| 1080 |
|
---|
| 1081 | #ifdef UNICODE
|
---|
| 1082 | TypeDef WSAQUERYSET = WSAQUERYSETW
|
---|
| 1083 | TypeDef PWSAQUERYSET = PWSAQUERYSETW
|
---|
| 1084 | TypeDef LPWSAQUERYSET = LPWSAQUERYSETW
|
---|
| 1085 | #else
|
---|
| 1086 | TypeDef WSAQUERYSET = WSAQUERYSETA
|
---|
| 1087 | TypeDef PWSAQUERYSET = PWSAQUERYSETA
|
---|
| 1088 | TypeDef LPWSAQUERYSET = LPWSAQUERYSETA
|
---|
| 1089 | #endif
|
---|
| 1090 |
|
---|
| 1091 | Const LUP_DEEP = &h0001
|
---|
| 1092 | Const LUP_CONTAINERS = &h0002
|
---|
| 1093 | Const LUP_NOCONTAINERS = &h0004
|
---|
| 1094 | Const LUP_NEAREST = &h0008
|
---|
| 1095 | Const LUP_RETURN_NAME = &h0010
|
---|
| 1096 | Const LUP_RETURN_TYPE = &h0020
|
---|
| 1097 | Const LUP_RETURN_VERSION = &h0040
|
---|
| 1098 | Const LUP_RETURN_COMMENT = &h0080
|
---|
| 1099 | Const LUP_RETURN_ADDR = &h0100
|
---|
| 1100 | Const LUP_RETURN_BLOB = &h0200
|
---|
| 1101 | Const LUP_RETURN_ALIASES = &h0400
|
---|
| 1102 | Const LUP_RETURN_QUERY_STRING = &h0800
|
---|
| 1103 | Const LUP_RETURN_ALL = &h0FF0
|
---|
| 1104 | Const LUP_RES_SERVICE = &h8000
|
---|
| 1105 |
|
---|
| 1106 | Const LUP_FLUSHCACHE = &h1000
|
---|
| 1107 | Const LUP_FLUSHPREVIOUS = &h2000
|
---|
| 1108 |
|
---|
| 1109 | ' Return flags
|
---|
| 1110 | Const RESULT_IS_ALIAS = &h0001
|
---|
| 1111 | Const RESULT_IS_ADDED = &h0010
|
---|
| 1112 | Const RESULT_IS_CHANGED = &h0020
|
---|
| 1113 | Const RESULT_IS_DELETED = &h0040
|
---|
| 1114 |
|
---|
| 1115 | ' Service Address Registration and Deregistration Data Types.
|
---|
| 1116 |
|
---|
| 1117 | Const Enum WSAESETSERVICEOP
|
---|
| 1118 | RNRSERVICE_REGISTER = 0
|
---|
| 1119 | RNRSERVICE_DEREGISTER
|
---|
| 1120 | RNRSERVICE_DELETE
|
---|
| 1121 | End Enum
|
---|
| 1122 | TypeDef PWSAESETSERVICEOP = *WSAESETSERVICEOP
|
---|
| 1123 | TypeDef LPWSAESETSERVICEOP = *WSAESETSERVICEOP
|
---|
| 1124 |
|
---|
| 1125 | ' Service Installation/Removal Data Types.
|
---|
| 1126 |
|
---|
| 1127 | Type WSANSCLASSINFOA
|
---|
| 1128 | lpszName As LPSTR
|
---|
| 1129 | dwNameSpace As DWord
|
---|
| 1130 | dwValueType As DWord
|
---|
| 1131 | dwValueSize As DWord
|
---|
| 1132 | lpValue As VoidPtr
|
---|
| 1133 | End Type
|
---|
| 1134 | TypeDef PWSANSCLASSINFOA = *WSANSCLASSINFOA
|
---|
| 1135 | TypeDef LPWSANSCLASSINFOA = *WSANSCLASSINFOA
|
---|
| 1136 |
|
---|
| 1137 | Type WSANSCLASSINFOW
|
---|
| 1138 | lpszName As LPWSTR
|
---|
| 1139 | dwNameSpace As DWord
|
---|
| 1140 | dwValueType As DWord
|
---|
| 1141 | dwValueSize As DWord
|
---|
| 1142 | lpValue As VoidPtr
|
---|
| 1143 | End Type
|
---|
| 1144 | TypeDef PWSANSCLASSINFOW = *WSANSCLASSINFOW
|
---|
| 1145 | TypeDef LPWSANSCLASSINFOW = *WSANSCLASSINFOW
|
---|
| 1146 |
|
---|
| 1147 | #ifdef UNICODE
|
---|
| 1148 | TypeDef WSANSCLASSINFO = WSANSCLASSINFOW
|
---|
| 1149 | TypeDef PWSANSCLASSINFO = PWSANSCLASSINFOW
|
---|
| 1150 | TypeDef LPWSANSCLASSINFO = LPWSANSCLASSINFOW
|
---|
| 1151 | #else
|
---|
| 1152 | TypeDef WSANSCLASSINFO = WSANSCLASSINFOA
|
---|
| 1153 | TypeDef PWSANSCLASSINFO = PWSANSCLASSINFOA
|
---|
| 1154 | TypeDef LPWSANSCLASSINFO = LPWSANSCLASSINFOA
|
---|
| 1155 | #endif
|
---|
| 1156 |
|
---|
| 1157 | Type WSASERVICECLASSINFOA
|
---|
| 1158 | lpServiceClassId As *GUID
|
---|
| 1159 | lpszServiceClassName As LPSTR
|
---|
| 1160 | dwCount As DWord
|
---|
| 1161 | lpClassInfos As LPWSANSCLASSINFOA
|
---|
| 1162 | End Type
|
---|
| 1163 | TypeDef PWSASERVICECLASSINFOA = *WSASERVICECLASSINFOA
|
---|
| 1164 | TypeDef LPWSASERVICECLASSINFOA = *WSASERVICECLASSINFOA
|
---|
| 1165 |
|
---|
| 1166 | Type WSASERVICECLASSINFOW
|
---|
| 1167 | lpServiceClassId As *GUID
|
---|
| 1168 | lpszServiceClassName As LPWSTR
|
---|
| 1169 | dwCount As DWord
|
---|
| 1170 | lpClassInfos As LPWSANSCLASSINFOA
|
---|
| 1171 | End Type
|
---|
| 1172 | TypeDef PWSASERVICECLASSINFOW = *WSASERVICECLASSINFOW
|
---|
| 1173 | TypeDef LPWSASERVICECLASSINFOW = *WSASERVICECLASSINFOW
|
---|
| 1174 |
|
---|
| 1175 | #ifdef UNICODE
|
---|
| 1176 | TypeDef WSASERVICECLASSINFO = WSASERVICECLASSINFOW
|
---|
| 1177 | TypeDef PWSASERVICECLASSINFO = PWSASERVICECLASSINFOW
|
---|
| 1178 | TypeDef LPWSASERVICECLASSINFO = LPWSASERVICECLASSINFOW
|
---|
| 1179 | #else
|
---|
| 1180 | TypeDef WSASERVICECLASSINFO = WSASERVICECLASSINFOA
|
---|
| 1181 | TypeDef PWSASERVICECLASSINFO = PWSASERVICECLASSINFOA
|
---|
| 1182 | TypeDef LPWSASERVICECLASSINFO = LPWSASERVICECLASSINFOA
|
---|
| 1183 | #endif
|
---|
| 1184 |
|
---|
| 1185 | Type WSANAMESPACE_INFOA
|
---|
| 1186 | NSProviderId As GUID
|
---|
| 1187 | dwNameSpace As DWord
|
---|
| 1188 | fActive As BOOL
|
---|
| 1189 | dwVersion As DWord
|
---|
| 1190 | lpszIdentifier As LPSTR
|
---|
| 1191 | End Type
|
---|
| 1192 | TypeDef PWSANAMESPACE_INFOA = *WSANAMESPACE_INFOA
|
---|
| 1193 | TypeDef LPWSANAMESPACE_INFOA = *WSANAMESPACE_INFOA
|
---|
| 1194 |
|
---|
| 1195 | Type WSANAMESPACE_INFOW
|
---|
| 1196 | NSProviderId As GUID
|
---|
| 1197 | dwNameSpace As DWord
|
---|
| 1198 | fActive As BOOL
|
---|
| 1199 | dwVersion As DWord
|
---|
| 1200 | lpszIdentifier As LPWSTR
|
---|
| 1201 | End Type
|
---|
| 1202 | TypeDef PWSANAMESPACE_INFOW = *WSANAMESPACE_INFOW
|
---|
| 1203 | TypeDef LPWSANAMESPACE_INFOW = *WSANAMESPACE_INFOW
|
---|
| 1204 |
|
---|
| 1205 | #ifdef UNICODE
|
---|
| 1206 | TypeDef WSANAMESPACE_INFO = WSANAMESPACE_INFOW
|
---|
| 1207 | TypeDef PWSANAMESPACE_INFO = PWSANAMESPACE_INFOW
|
---|
| 1208 | TypeDef LPWSANAMESPACE_INFO = LPWSANAMESPACE_INFOW
|
---|
| 1209 | #else
|
---|
| 1210 | TypeDef WSANAMESPACE_INFO = WSANAMESPACE_INFOA
|
---|
| 1211 | TypeDef PWSANAMESPACE_INFO = PWSANAMESPACE_INFOA
|
---|
| 1212 | TypeDef LPWSANAMESPACE_INFO = LPWSANAMESPACE_INFOA
|
---|
| 1213 | #endif
|
---|
| 1214 |
|
---|
| 1215 | ' Socket function prototypes
|
---|
| 1216 |
|
---|
| 1217 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1218 | Declare Function accept Lib "ws2_32" (s As SOCKET, ByRef addr As sockaddr, ByRef addrlen As Long) As SOCKET
|
---|
| 1219 | #endif
|
---|
| 1220 |
|
---|
| 1221 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1222 | TypeDef LPFN_ACCEPT = *Function(s As SOCKET, ByRef addr As sockaddr, ByRef addrlen As Long) As SOCKET
|
---|
| 1223 | #endif
|
---|
| 1224 |
|
---|
| 1225 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1226 | Declare Function bind Lib "ws2_32" (s As SOCKET, ByRef name As sockaddr, addrlen As Long) As Long
|
---|
| 1227 | #endif
|
---|
| 1228 |
|
---|
| 1229 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1230 | TypeDef LPFN_BIND = *Function(s As SOCKET, ByRef name As sockaddr, addrlen As Long) As Long
|
---|
| 1231 | #endif
|
---|
| 1232 |
|
---|
| 1233 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1234 | Declare Function closesocket Lib "ws2_32" (s As SOCKET) As Long
|
---|
| 1235 | #endif
|
---|
| 1236 |
|
---|
| 1237 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1238 | TypeDef LPFN_CLOSESOCKET = *Function(s As SOCKET) As Long
|
---|
| 1239 | #endif
|
---|
| 1240 |
|
---|
| 1241 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1242 | Declare Function connect Lib "ws2_32" (s As SOCKET, ByRef name As sockaddr, namelen As Long) As Long
|
---|
| 1243 | #endif
|
---|
| 1244 |
|
---|
| 1245 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1246 | TypeDef LPFN_CONNECT = *Function(s As SOCKET, ByRef name As sockaddr, namelen As Long) As Long
|
---|
| 1247 | #endif
|
---|
| 1248 |
|
---|
| 1249 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1250 | Declare Function ioctlsocket Lib "ws2_32" (s As SOCKET, cmd As Long, ByRef argp As DWord) As Long
|
---|
| 1251 | #endif
|
---|
| 1252 |
|
---|
| 1253 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1254 | TypeDef LPFN_IOCTLSOCKET = *Function(s As SOCKET, cmd As Long, ByRef argp As DWord) As Long
|
---|
| 1255 | #endif
|
---|
| 1256 |
|
---|
| 1257 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1258 | Declare Function getpeername Lib "ws2_32" (s As SOCKET, ByRef name As sockaddr, ByRef namelen As Long) As Long
|
---|
| 1259 | #endif
|
---|
| 1260 |
|
---|
| 1261 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1262 | TypeDef LPFN_GETPEERNAME = *Function(s As SOCKET, ByRef name As sockaddr, ByRef namelen As Long) As Long
|
---|
| 1263 | #endif
|
---|
| 1264 |
|
---|
| 1265 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1266 | Declare Function getsockname Lib "ws2_32" (s As SOCKET, ByRef name As sockaddr, ByRef namelen As Long) As Long
|
---|
| 1267 | #endif
|
---|
| 1268 |
|
---|
| 1269 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1270 | TypeDef LPFN_GETSOCKNAME = *Function(s As SOCKET, ByRef name As sockaddr, ByRef namelen As Long) As Long
|
---|
| 1271 | #endif
|
---|
| 1272 |
|
---|
| 1273 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1274 | Declare Function getsockopt Lib "ws2_32" (s As SOCKET, level As Long, optname As Long, optval As *Byte, ByRef optlen As Long) As Long
|
---|
| 1275 | #endif
|
---|
| 1276 |
|
---|
| 1277 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1278 | TypeDef LPFN_GETSOCKOPT = *Function(s As SOCKET, level As Long, optname As Long, optval As *Byte, ByRef optlen As Long) As Long
|
---|
| 1279 | #endif
|
---|
| 1280 |
|
---|
| 1281 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1282 | Declare Function htonl Lib "ws2_32" (hostlong As DWord) As DWord
|
---|
| 1283 | #endif
|
---|
| 1284 |
|
---|
| 1285 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1286 | TypeDef LPFN_HTONL = *Function(hostlong As DWord) As DWord
|
---|
| 1287 | #endif
|
---|
| 1288 |
|
---|
| 1289 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1290 | Declare Function htons Lib "ws2_32" (hostshort As Word) As Word
|
---|
| 1291 | #endif
|
---|
| 1292 |
|
---|
| 1293 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1294 | TypeDef LPFN_HTONS = *Function(hostshort As Word) As Word
|
---|
| 1295 | #endif
|
---|
| 1296 |
|
---|
| 1297 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1298 | Declare Function inet_addr Lib "ws2_32" (cp As *Byte) As DWord
|
---|
| 1299 | #endif
|
---|
| 1300 |
|
---|
| 1301 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1302 | TypeDef LPFN_INET_ADDR = *Function(cp As *Byte) As DWord
|
---|
| 1303 | #endif
|
---|
| 1304 |
|
---|
| 1305 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
[176] | 1306 | Declare Function inet_ntoa Lib "ws2_32" (in As DWord /*in_addr*/ ) As *Byte
|
---|
[42] | 1307 | #endif
|
---|
| 1308 |
|
---|
| 1309 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1310 | TypeDef LPFN_INET_NTOA = *Function(in As in_addr) As *Byte
|
---|
| 1311 | #endif
|
---|
| 1312 |
|
---|
| 1313 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1314 | Declare Function listen Lib "ws2_32" (s As SOCKET, backlog As Long) As Long
|
---|
| 1315 | #endif
|
---|
| 1316 |
|
---|
| 1317 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1318 | TypeDef LPFN_LISTEN = *Function(s As SOCKET, backlog As Long) As Long
|
---|
| 1319 | #endif
|
---|
| 1320 |
|
---|
| 1321 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1322 | Declare Function ntohl Lib "ws2_32" (netlong As DWord) As DWord
|
---|
| 1323 | #endif
|
---|
| 1324 |
|
---|
| 1325 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1326 | TypeDef LPFN_NTOHL = *Function(netlong As DWord) As DWord
|
---|
| 1327 | #endif
|
---|
| 1328 |
|
---|
| 1329 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1330 | Declare Function ntohs Lib "ws2_32" (netshort As Word) As Word
|
---|
| 1331 | #endif
|
---|
| 1332 |
|
---|
| 1333 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1334 | TypeDef LPFN_NTOHS = *Function(netshort As Word) As Word
|
---|
| 1335 | #endif
|
---|
| 1336 |
|
---|
| 1337 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1338 | Declare Function recv Lib "ws2_32" (s As SOCKET, buf As *Byte, len As Long, flags As Long) As Long
|
---|
| 1339 | #endif
|
---|
| 1340 |
|
---|
| 1341 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1342 | TypeDef LPFN_RECV = *Function(s As SOCKET, buf As *Byte, len As Long, flags As Long) As Long
|
---|
| 1343 | #endif
|
---|
| 1344 |
|
---|
| 1345 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1346 | Declare Function recvfrom Lib "ws2_32" (s As SOCKET, buf As *Byte, len As Long, flags As Long, ByRef from As sockaddr, ByRef fromlen As Long) As Long
|
---|
| 1347 | #endif
|
---|
| 1348 |
|
---|
| 1349 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1350 | TypeDef LPFN_RECVFROM = *Function(s As SOCKET, buf As *Byte, len As Long, flags As Long, ByRef from As sockaddr, ByRef fromlen As Long) As Long
|
---|
| 1351 | #endif
|
---|
| 1352 |
|
---|
| 1353 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1354 | Declare Function select Lib "ws2_32" (nfds As Long, ByRef readfds As fd_set, ByRef writefds As fd_set, ByRef exceptfds As fd_set, ByRef timeout As timeval) As Long
|
---|
| 1355 | #endif
|
---|
| 1356 |
|
---|
| 1357 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1358 | TypeDef LPFN_SELECT = *Function(nfds As Long, ByRef readfds As fd_set, ByRef writefds As fd_set, ByRef exceptfds As fd_set, ByRef timeout As timeval) As Long
|
---|
| 1359 | #endif
|
---|
| 1360 |
|
---|
| 1361 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1362 | Declare Function send Lib "ws2_32" (s As SOCKET, buf As *Byte, len As Long, flags As Long) As Long
|
---|
| 1363 | #endif
|
---|
| 1364 |
|
---|
| 1365 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1366 | TypeDef LPFN_SEND = *Function(s As SOCKET, buf As *Byte, len As Long, flags As Long) As Long
|
---|
| 1367 | #endif
|
---|
| 1368 |
|
---|
| 1369 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1370 | Declare Function sendto Lib "ws2_32" (s As SOCKET, buf As *Byte, len As Long, flags As Long, ByRef to_ As sockaddr, tolen As Long) As Long
|
---|
| 1371 | #endif
|
---|
| 1372 |
|
---|
| 1373 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1374 | TypeDef LPFN_SENDTO = *Function(s As SOCKET, buf As *Byte, len As Long, flags As Long, ByRef to_ As sockaddr, tolen As Long) As Long
|
---|
| 1375 | #endif
|
---|
| 1376 |
|
---|
| 1377 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1378 | Declare Function setsockopt Lib "ws2_32" (s As SOCKET, level As Long, optname As Long, optval As *Byte, optlen As Long) As Long
|
---|
| 1379 | #endif
|
---|
| 1380 |
|
---|
| 1381 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1382 | TypeDef LPFN_SETSOCKOPT = *Function(s As SOCKET, level As Long, optname As Long, optval As *Byte, optlen As Long) As Long
|
---|
| 1383 | #endif
|
---|
| 1384 |
|
---|
| 1385 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1386 | Declare Function shutdown Lib "ws2_32" (s As SOCKET, how As Long) As Long
|
---|
| 1387 | #endif
|
---|
| 1388 |
|
---|
| 1389 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1390 | TypeDef LPFN_SHUTDOWN = *Function(s As SOCKET, how As Long) As Long
|
---|
| 1391 | #endif
|
---|
| 1392 |
|
---|
| 1393 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1394 | Declare Function socket Lib "ws2_32" (af As Long, type_ As Long, protocol As Long) As SOCKET
|
---|
| 1395 | #endif
|
---|
| 1396 |
|
---|
| 1397 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1398 | TypeDef LPFN_SOCKET = *Function(af As Long, type_ As Long, protocol As Long) As SOCKET
|
---|
| 1399 | #endif
|
---|
| 1400 |
|
---|
| 1401 | ' Database function prototypes
|
---|
| 1402 |
|
---|
| 1403 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1404 | Declare Function gethostbyaddr Lib "ws2_32" (addr As PCSTR, len As Long, type_ As Long) As *hostent
|
---|
| 1405 | #endif
|
---|
| 1406 |
|
---|
| 1407 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1408 | TypeDef LPFN_GETHOSTBYADDR = *Function(addr As PCSTR, len As Long, type_ As Long) As *hostent
|
---|
| 1409 | #endif
|
---|
| 1410 |
|
---|
| 1411 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1412 | Declare Function gethostbyname Lib "ws2_32" (name As PCSTR) As *hostent
|
---|
| 1413 | #endif
|
---|
| 1414 |
|
---|
| 1415 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1416 | TypeDef LPFN_GETHOSTBYNAME = *Function(name As PCSTR) As *hostent
|
---|
| 1417 | #endif
|
---|
| 1418 |
|
---|
| 1419 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1420 | Declare Function gethostname Lib "ws2_32" (name As PCSTR, namelen As Long) As Long
|
---|
| 1421 | #endif
|
---|
| 1422 |
|
---|
| 1423 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1424 | TypeDef LPFN_GETHOSTNAME = *Function(name As PCSTR, namelen As Long) As Long
|
---|
| 1425 | #endif
|
---|
| 1426 |
|
---|
| 1427 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1428 | Declare Function getservbyport Lib "ws2_32" (port As Long, proto As PCSTR) As *servent
|
---|
| 1429 | #endif
|
---|
| 1430 |
|
---|
| 1431 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1432 | TypeDef LPFN_GETSERVBYPORT = *Function(port As Long, proto As PCSTR) As *servent
|
---|
| 1433 | #endif
|
---|
| 1434 |
|
---|
| 1435 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1436 | Declare Function getservbyname Lib "ws2_32" (name As PCSTR, proto As PCSTR) As *servent
|
---|
| 1437 | #endif
|
---|
| 1438 |
|
---|
| 1439 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1440 | TypeDef LPFN_GETSERVBYNAME = *Function(name As PCSTR, proto As PCSTR) As *servent
|
---|
| 1441 | #endif
|
---|
| 1442 |
|
---|
| 1443 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1444 | Declare Function getprotobynumber Lib "ws2_32" (number As Long) As *protoent
|
---|
| 1445 | #endif
|
---|
| 1446 |
|
---|
| 1447 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1448 | TypeDef LPFN_GETPROTOBYNUMBER = *Function(number As Long) As *protoent
|
---|
| 1449 | #endif
|
---|
| 1450 |
|
---|
| 1451 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1452 | Declare Function getprotobyname Lib "ws2_32" (name As PCSTR) As *protoent
|
---|
| 1453 | #endif
|
---|
| 1454 |
|
---|
| 1455 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1456 | TypeDef LPFN_GETPROTOBYNAME = (name As PCSTR) As *protoent
|
---|
| 1457 | #endif
|
---|
| 1458 |
|
---|
| 1459 | ' Microsoft Windows Extension function prototypes
|
---|
| 1460 |
|
---|
| 1461 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1462 | Declare Function WSAStartup Lib "ws2_32" (wVersionRequested As Word, ByRef WSAData As WSADATA) As Long
|
---|
| 1463 | #endif
|
---|
| 1464 |
|
---|
| 1465 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1466 | TypeDef LPFN_WSASTARTUP = *Function(wVersionRequested As Word, ByRef WSAData As WSADATA) As Long
|
---|
| 1467 | #endif
|
---|
| 1468 |
|
---|
| 1469 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1470 | Declare Function WSACleanup Lib "ws2_32" () As Long
|
---|
| 1471 | #endif
|
---|
| 1472 |
|
---|
| 1473 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1474 | TypeDef LPFN_WSACLEANUP = *Function() As Long
|
---|
| 1475 | #endif
|
---|
| 1476 |
|
---|
| 1477 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1478 | Declare Sub WSASetLastError Lib "ws2_32" (iError As Long)
|
---|
| 1479 | #endif
|
---|
| 1480 |
|
---|
| 1481 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1482 | TypeDef LPFN_WSASETLASTERROR = *Sub(iError As Long)
|
---|
| 1483 | #endif
|
---|
| 1484 |
|
---|
| 1485 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1486 | Declare Function WSAGetLastError Lib "ws2_32" () As Long
|
---|
| 1487 | #endif
|
---|
| 1488 |
|
---|
| 1489 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1490 | TypeDef LPFN_WSAGETLASTERROR = *Function() As Long
|
---|
| 1491 | #endif
|
---|
| 1492 |
|
---|
| 1493 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1494 | Declare Function WSAIsBlocking Lib "ws2_32" () As BOOL
|
---|
| 1495 | #endif
|
---|
| 1496 |
|
---|
| 1497 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1498 | TypeDef LPFN_WSAISBLOCKING = *Function() As BOOL
|
---|
| 1499 | #endif
|
---|
| 1500 |
|
---|
| 1501 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1502 | Declare Function WSAUnhookBlockingHook Lib "ws2_32" () As Long
|
---|
| 1503 | #endif
|
---|
| 1504 |
|
---|
| 1505 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1506 | TypeDef LPFN_WSAUNHOOKBLOCKINGHOOK = *Function() As Long
|
---|
| 1507 | #endif
|
---|
| 1508 |
|
---|
| 1509 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1510 | Declare Function WSASetBlockingHook Lib "ws2_32" (lpBlockFunc As FARPROC) As FARPROC
|
---|
| 1511 |
|
---|
| 1512 | #endif
|
---|
| 1513 |
|
---|
| 1514 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1515 | TypeDef LPFN_WSASETBLOCKINGHOOK = *Function(lpBlockFunc As FARPROC) As FARPROC
|
---|
| 1516 | #endif
|
---|
| 1517 |
|
---|
| 1518 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1519 | Declare Function WSACancelBlockingCall Lib "ws2_32" () As Long
|
---|
| 1520 | #endif
|
---|
| 1521 |
|
---|
| 1522 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1523 | TypeDef LPFN_WSACANCELBLOCKINGCALL = *Function() As Long
|
---|
| 1524 | #endif
|
---|
| 1525 |
|
---|
| 1526 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1527 | Declare Function WSAAsyncGetServByName Lib "ws2_32" (hwnd As HWND, msg As DWord, name As PCSTR, proto As PCSTR, buf As *Byte, buflen As Long) As HANDLE
|
---|
| 1528 | #endif
|
---|
| 1529 |
|
---|
| 1530 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1531 | TypeDef LPFN_WSAASYNCGETSERVBYNAME = *Function(hwnd As HWND, msg As DWord, name As PCSTR, proto As PCSTR, buf As *Byte, buflen As Long) As HANDLE
|
---|
| 1532 | #endif
|
---|
| 1533 |
|
---|
| 1534 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1535 | Declare Function WSAAsyncGetServByPort Lib "ws2_32" (hwnd As HWND, msg As DWord, port As Long, proto As PCSTR, buf As *Byte, buflen As Long) As HANDLE
|
---|
| 1536 | #endif
|
---|
| 1537 |
|
---|
| 1538 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1539 | TypeDef LPFN_WSAASYNCGETSERVBYPORT = *Function(hwnd As HWND, msg As DWord, port As Long, proto As PCSTR, buf As *Byte, buflen As Long) As HANDLE
|
---|
| 1540 | #endif
|
---|
| 1541 |
|
---|
| 1542 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1543 | Declare Function WSAAsyncGetProtoByName Lib "ws2_32" (hwnd As HWND, msg As DWord, name As PCSTR, buf As *Byte, buflen As Long) As HANDLE
|
---|
| 1544 | #endif
|
---|
| 1545 |
|
---|
| 1546 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1547 | TypeDef LPFN_WSAASYNCGETPROTOBYNAME = *Function(hwnd As HWND, msg As DWord, name As PCSTR, buf As *Byte, buflen As Long) As HANDLE
|
---|
| 1548 | #endif
|
---|
| 1549 |
|
---|
| 1550 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1551 | Declare Function WSAAsyncGetProtoByNumber Lib "ws2_32" (hwnd As HWND, msg As DWord, number As Long, buf As *Byte, buflen As Long) As HANDLE
|
---|
| 1552 | #endif
|
---|
| 1553 |
|
---|
| 1554 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1555 | TypeDef LPFN_WSAASYNCGETPROTOBYNUMBER = *Function(hwnd As HWND, msg As DWord, number As Long, buf As *Byte, buflen As Long) As HANDLE
|
---|
| 1556 | #endif
|
---|
| 1557 |
|
---|
| 1558 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1559 | Declare Function WSAAsyncGetHostByName Lib "ws2_32" (hwnd As HWND, msg As DWord, name As PCSTR, buf As *Byte, buflen As Long) As HANDLE
|
---|
| 1560 | #endif
|
---|
| 1561 |
|
---|
| 1562 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1563 | TypeDef LPFN_WSAASYNCGETHOSTBYNAME = *Function(hwnd As HWND, msg As DWord, name As PCSTR, buf As *Byte, buflen As Long) As HANDLE
|
---|
| 1564 | #endif
|
---|
| 1565 |
|
---|
| 1566 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1567 | Declare Function WSAAsyncGetHostByAddr Lib "ws2_32" (hwnd As HWND, msg As DWord, addr As PCSTR, len As Long, type_ As Long, buf As *Byte, buflen As Long) As HANDLE
|
---|
| 1568 | #endif
|
---|
| 1569 |
|
---|
| 1570 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1571 | TypeDef LPFN_WSAASYNCGETHOSTBYADDR = *Function(hwnd As HWND, msg As DWord, addr As PCSTR, len As Long, type_ As Long, buf As *Byte, buflen As Long) As HANDLE
|
---|
| 1572 | #endif
|
---|
| 1573 |
|
---|
| 1574 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1575 | Declare Function WSACancelAsyncRequest Lib "ws2_32" (hAsyncTaskHandle As HANDLE) As Long
|
---|
| 1576 | #endif
|
---|
| 1577 |
|
---|
| 1578 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1579 | TypeDef LPFN_WSACANCELASYNCREQUEST = *Function(hAsyncTaskHandle As HANDLE) As Long
|
---|
| 1580 | #endif
|
---|
| 1581 |
|
---|
| 1582 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1583 | Declare Function WSAAsyncSelect Lib "ws2_32" (s As SOCKET, hwnd As HWND, msg As DWord, Event As Long) As Long
|
---|
| 1584 | #endif
|
---|
| 1585 |
|
---|
| 1586 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1587 | TypeDef LPFN_WSAASYNCSELECT = *Function(s As SOCKET, hwnd As HWND, msg As DWord, Event As Long) As Long
|
---|
| 1588 | #endif
|
---|
| 1589 |
|
---|
| 1590 | /* WinSock 2 API new function prototypes */
|
---|
| 1591 |
|
---|
| 1592 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1593 | Declare Function WSAAccept Lib "ws2_32" (s As SOCKET, ByRef addr As sockaddr, ByRef addrlen As Long, lpfnCondition As LPCONDITIONPROC, CallbackData As ULONG_PTR) As SOCKET
|
---|
| 1594 | #endif
|
---|
| 1595 |
|
---|
| 1596 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1597 | TypeDef LPFN_WSAACCEPT = *Function(s As SOCKET, ByRef addr As sockaddr, ByRef addrlen As Long, lpfnCondition As LPCONDITIONPROC, CallbackData As ULONG_PTR) As SOCKET
|
---|
| 1598 | #endif
|
---|
| 1599 |
|
---|
| 1600 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1601 | Declare Function WSACloseEvent Lib "ws2_32" (hEvent As WSAEVENT) As BOOL
|
---|
| 1602 | #endif
|
---|
| 1603 |
|
---|
| 1604 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1605 | TypeDef LPFN_WSACLOSEEVENT = *Function(hEvent As WSAEVENT) As BOOL
|
---|
| 1606 | #endif
|
---|
| 1607 |
|
---|
| 1608 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1609 | Declare Function WSAConnect Lib "ws2_32" (s As SOCKET, ByRef name As sockaddr, namelen As Long, ByRef CallerData As WSABUF, ByRef CalleeData As WSABUF, ByRef SQOS As QOS, ByRef GQOS As QOS) As Long
|
---|
| 1610 | #endif
|
---|
| 1611 |
|
---|
| 1612 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1613 | TypeDef LPFN_WSACONNECT = *Functions As SOCKET, ByRef name As sockaddr, namelen As Long, ByRef CallerData As WSABUF, ByRef CalleeData As WSABUF, ByRef SQOS As QOS, ByRef GQOS As QOS) As Long
|
---|
| 1614 | #endif
|
---|
| 1615 |
|
---|
| 1616 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1617 | Declare Function WSACreateEvent Lib "ws2_32" () As WSAEVENT
|
---|
| 1618 | #endif
|
---|
| 1619 |
|
---|
| 1620 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1621 | TypeDef LPFN_WSACREATEEVENT = *Function() As WSAEVENT
|
---|
| 1622 | #endif
|
---|
| 1623 |
|
---|
| 1624 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1625 | Declare Function WSADuplicateSocketA Lib "ws2_32" (s As SOCKET, ProcessId As DWord, ByRef ProtocolInfo As WSAPROTOCOL_INFOA) As Long
|
---|
| 1626 | Declare Function WSADuplicateSocketW Lib "ws2_32" (s As SOCKET, ProcessId As DWord, ByRef ProtocolInfo As WSAPROTOCOL_INFOW) As Long
|
---|
| 1627 | #ifdef UNICODE
|
---|
| 1628 | Declare Function WSADuplicateSocket Lib "ws2_32" Alias "WSADuplicateSocketW" (s As SOCKET, ProcessId As DWord, ByRef ProtocolInfo As WSAPROTOCOL_INFO) As Long
|
---|
| 1629 | #else
|
---|
| 1630 | Declare Function WSADuplicateSocket Lib "ws2_32" Alias "WSADuplicateSocketA" (s As SOCKET, ProcessId As DWord, ByRef ProtocolInfo As WSAPROTOCOL_INFO) As Long
|
---|
| 1631 | #endif
|
---|
| 1632 | #endif
|
---|
| 1633 |
|
---|
| 1634 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1635 | TypeDef LPFN_WSADUPLICATESOCKETA = *Function(s As SOCKET, ProcessId As DWord, ByRef ProtocolInfo As WSAPROTOCOL_INFOA) As Long
|
---|
| 1636 | TypeDef LPFN_WSADUPLICATESOCKETW = *Function(s As SOCKET, ProcessId As DWord, ByRef ProtocolInfo As WSAPROTOCOL_INFOW) As Long
|
---|
| 1637 | #ifdef UNICODE
|
---|
| 1638 | TypeDef LPFN_WSADUPLICATESOCKET = LPFN_WSADUPLICATESOCKETW
|
---|
| 1639 | #else
|
---|
| 1640 | TypeDef LPFN_WSADUPLICATESOCKET = LPFN_WSADUPLICATESOCKETA
|
---|
| 1641 | #endif
|
---|
| 1642 | #endif
|
---|
| 1643 |
|
---|
| 1644 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1645 | Declare Function WSAEnumNetworkEvents Lib "ws2_32" (s As SOCKET, hEventObject As WSAEVENT, ByRef NetworkEvents As WSANETWORKEVENTS) As Long
|
---|
| 1646 | #endif
|
---|
| 1647 |
|
---|
| 1648 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1649 | TypeDef LPFN_WSAENUMNETWORKEVENTS = *Function(s As SOCKET, hEventObject As WSAEVENT, ByRef NetworkEvents As WSANETWORKEVENTS) As Long
|
---|
| 1650 | #endif
|
---|
| 1651 |
|
---|
| 1652 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1653 | Declare Function WSAEnumProtocolsA Lib "ws2_32" (Protocols As *Long, ByRef ProtocolBuffer As WSAPROTOCOL_INFOA, ByRef BufferLength As DWord) As Long
|
---|
| 1654 | Declare Function WSAEnumProtocolsW Lib "ws2_32" (Protocols As *Long, ByRef ProtocolBuffer As WSAPROTOCOL_INFOW, ByRef BufferLength As DWord) As Long
|
---|
| 1655 | #ifdef UNICODE
|
---|
| 1656 | Declare Function WSAEnumProtocols Lib "ws2_32" Alias "WSAEnumProtocolsW" (Protocols As *Long, ByRef ProtocolBuffer As WSAPROTOCOL_INFO, ByRef BufferLength As DWord) As Long
|
---|
| 1657 | #else
|
---|
| 1658 | Declare Function WSAEnumProtocols Lib "ws2_32" Alias "WSAEnumProtocolsA" (Protocols As *Long, ByRef ProtocolBuffer As WSAPROTOCOL_INFO, ByRef BufferLength As DWord) As Long
|
---|
| 1659 | #endif
|
---|
| 1660 | #endif
|
---|
| 1661 |
|
---|
| 1662 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1663 | TypeDef LPFN_WSAENUMPROTOCOLSA = *Function(Protocols As *Long, ByRef ProtocolBuffer As WSAPROTOCOL_INFOA, ByRef BufferLength As DWord) As Long
|
---|
| 1664 | TypeDef LPFN_WSAENUMPROTOCOLSW = *Function(Protocols As *Long, ByRef ProtocolBuffer As WSAPROTOCOL_INFOW, ByRef BufferLength As DWord) As Long
|
---|
| 1665 | #ifdef UNICODE
|
---|
| 1666 | TypeDef LPFN_WSAENUMPROTOCOLS = LPFN_WSAENUMPROTOCOLSW
|
---|
| 1667 | #else
|
---|
| 1668 | TypeDef LPFN_WSAENUMPROTOCOLS = LPFN_WSAENUMPROTOCOLSA
|
---|
| 1669 | #endif
|
---|
| 1670 | #endif
|
---|
| 1671 |
|
---|
| 1672 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1673 | Declare Function WSAEventSelect Lib "ws2_32" (s As SOCKET, hEventObject As WSAEVENT, NetworkEvents As Long) As Long
|
---|
| 1674 | #endif
|
---|
| 1675 |
|
---|
| 1676 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1677 | TypeDef LPFN_WSAEVENTSELECT = *Function(s As SOCKET, hEventObject As WSAEVENT, NetworkEvents As Long) As Long
|
---|
| 1678 | #endif
|
---|
| 1679 |
|
---|
| 1680 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1681 | Declare Function WSAGetOverlappedResult Lib "ws2_32" (s As SOCKET, ByRef Overlapped As WSAOVERLAPPED, ByRef cbTransfer As DWord, Wait As BOOL, ByRef Flags As DWord) As BOOL
|
---|
| 1682 | #endif
|
---|
| 1683 |
|
---|
| 1684 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1685 | TypeDef LPFN_WSAGETOVERLAPPEDRESULT = *Function(s As SOCKET, ByRef Overlapped As WSAOVERLAPPED, ByRef cbTransfer As DWord, Wait As BOOL, ByRef Flags As DWord) As BOOL
|
---|
| 1686 | #endif
|
---|
| 1687 |
|
---|
| 1688 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1689 | Declare Function WSAGetQOSByName Lib "ws2_32" (s As SOCKET, ByRef QOSName As WSABUF, ByRef qos As QOS) As BOOL
|
---|
| 1690 | #endif
|
---|
| 1691 |
|
---|
| 1692 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1693 | TypeDef LPFN_WSAGETQOSBYNAME = *Function(s As SOCKET, ByRef QOSName As WSABUF, ByRef qos As QOS) As BOOL
|
---|
| 1694 | #endif
|
---|
| 1695 |
|
---|
| 1696 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1697 | Declare Function WSAHtonl Lib "ws2_32" (s As SOCKET, hostlong As DWord, ByRef netlong As DWord) As Long
|
---|
| 1698 | #endif
|
---|
| 1699 |
|
---|
| 1700 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1701 | TypeDef LPFN_WSAHTONL = *Function(s As SOCKET, hostlong As DWord, ByRef netlong As DWord) As Long
|
---|
| 1702 | #endif
|
---|
| 1703 |
|
---|
| 1704 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1705 | Declare Function WSAHtons Lib "ws2_32" (s As SOCKET, hostshort As Word, ByRef netshort As Word) As Long
|
---|
| 1706 | #endif
|
---|
| 1707 |
|
---|
| 1708 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1709 | TypeDef LPFN_WSAHTONS = *Function(s As SOCKET, hostshort As Word, ByRef netshort As Word) As Long
|
---|
| 1710 | #endif
|
---|
| 1711 |
|
---|
| 1712 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1713 | Declare Function WSAIoctl Lib "ws2_32" (s As SOCKET, IoControlCode As DWord, pvInBuffer As VoidPtr, cbInBuffer As DWord, pvOutBuffer As VoidPtr, cbOutBuffer As DWord,
|
---|
| 1714 | ByRef cbBytesReturned As DWord, ByRef Overlapped As WSAOVERLAPPED, pCompletionRoutine As LPWSAOVERLAPPED_COMPLETION_ROUTINE) As Long
|
---|
| 1715 | #endif
|
---|
| 1716 |
|
---|
| 1717 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1718 | TypeDef LPFN_WSAIOCTL = *Function(s As SOCKET, IoControlCode As DWord, pvInBuffer As VoidPtr, cbInBuffer As DWord, pvOutBuffer As VoidPtr, cbOutBuffer As DWord,
|
---|
| 1719 | ByRef cbBytesReturned As DWord, ByRef Overlapped As WSAOVERLAPPED, pCompletionRoutine As LPWSAOVERLAPPED_COMPLETION_ROUTINE) As Long
|
---|
| 1720 | #endif
|
---|
| 1721 |
|
---|
| 1722 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1723 | Declare Function WSAJoinLeaf Lib "ws2_32" (s As SOCKET, ByRef name As sockaddr, namelen As Long, ByRef CallerData As WSABUF, ByRef CalleeData As WSABUF,
|
---|
| 1724 | ByRef SQOS As QOS, ByRef GQOS AS QOS, Flags As DWord) As SOCKET
|
---|
| 1725 | #endif
|
---|
| 1726 |
|
---|
| 1727 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1728 | TypeDef LPFN_WSAJOINLEAF = *Function(s As SOCKET, ByRef name As sockaddr, namelen As Long, ByRef CallerData As WSABUF, ByRef CalleeData As WSABUF,
|
---|
| 1729 | ByRef SQOS As QOS, ByRef GQOS AS QOS, Flags As DWord) As SOCKET
|
---|
| 1730 | #endif
|
---|
| 1731 |
|
---|
| 1732 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1733 | Declare Function WSANtohl Lib "ws2_32" (s As SOCKET, netlong As DWord, ByRef hostlong As DWord) As Long
|
---|
| 1734 | #endif
|
---|
| 1735 |
|
---|
| 1736 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1737 | TypeDef LPFN_WSANTOHL = *Function(s As SOCKET, netlong As DWord, ByRef hostlong As DWord) As Long
|
---|
| 1738 | #endif
|
---|
| 1739 |
|
---|
| 1740 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1741 | Declare Function WSANtohs Lib "ws2_32" (s As SOCKET, netshort As Word, ByRef hostshort As Word) As Long
|
---|
| 1742 | #endif
|
---|
| 1743 |
|
---|
| 1744 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1745 | TypeDef LPFN_WSANTOHS = *Function(s As SOCKET, netshort As Word, ByRef hostshort As Word) As Long
|
---|
| 1746 | #endif
|
---|
| 1747 |
|
---|
| 1748 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1749 | Declare Function WSARecv Lib "ws2_32" (s As SOCKET, ByRef Buffers As WSABUF, BufferCount As DWord, ByRef NumberOfBytesRecvd As DWord, ByRef Flags As DWord,
|
---|
| 1750 | ByRef Overlapped As WSAOVERLAPPED, lpCompletionRoutine As LPWSAOVERLAPPED_COMPLETION_ROUTINE) As Long
|
---|
| 1751 | #endif
|
---|
| 1752 |
|
---|
| 1753 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1754 | TypeDef LPFN_WSARECV = *Function(s As SOCKET, ByRef Buffers As WSABUF, BufferCount As DWord, ByRef NumberOfBytesRecvd As DWord, ByRef Flags As DWord,
|
---|
| 1755 | ByRef Overlapped As WSAOVERLAPPED, lpCompletionRoutine As LPWSAOVERLAPPED_COMPLETION_ROUTINE) As Long
|
---|
| 1756 | #endif
|
---|
| 1757 |
|
---|
| 1758 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1759 | Declare Function WSARecvDisconnect Lib "ws2_32" (s As SOCKET, ByRef InboundDisconnectData As WSABUF) As Long
|
---|
| 1760 | #endif
|
---|
| 1761 |
|
---|
| 1762 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1763 | TypeDef LPFN_WSARECVDISCONNECT = *Function(s As SOCKET, ByRef InboundDisconnectData As WSABUF) As Long
|
---|
| 1764 | #endif
|
---|
| 1765 |
|
---|
| 1766 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1767 | Declare Function WSARecvFrom Lib "ws2_32" (s As SOCKET, ByRef Buffers As WSABUF, BufferCount As DWord, ByRef NumberOfBytesRecvd As DWord, ByRef Flags As DWord,
|
---|
| 1768 | ByRef From As sockaddr, ByRef Fromlen As Long, ByRef Overlapped As WSAOVERLAPPED, lpCompletionRoutine As LPWSAOVERLAPPED_COMPLETION_ROUTINE) As Long
|
---|
| 1769 | #endif
|
---|
| 1770 |
|
---|
| 1771 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1772 | TypeDef LPFN_WSARECVFROM = *Function(s As SOCKET, ByRef Buffers As WSABUF, BufferCount As DWord, ByRef NumberOfBytesRecvd As DWord, ByRef Flags As DWord,
|
---|
| 1773 | ByRef From As sockaddr, ByRef Fromlen As Long, ByRef Overlapped As WSAOVERLAPPED, lpCompletionRoutine As LPWSAOVERLAPPED_COMPLETION_ROUTINE) As Long
|
---|
| 1774 | #endif
|
---|
| 1775 |
|
---|
| 1776 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1777 | Declare Function WSAResetEvent Lib "ws2_32" (hEvent As WSAEVENT) As BOOL
|
---|
| 1778 | #endif
|
---|
| 1779 |
|
---|
| 1780 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1781 | TypeDef LPFN_WSARESETEVENT = *Function(hEvent As WSAEVENT) As BOOL
|
---|
| 1782 | #endif
|
---|
| 1783 |
|
---|
| 1784 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1785 | Declare Function WSASend Lib "ws2_32" (s As SOCKET, ByRef Buffers As WSABUF, BufferCount As DWord, ByRef NumberOfBytesSent As DWord, ByRef Flags As DWord,
|
---|
| 1786 | ByRef Overlapped As WSAOVERLAPPED, lpCompletionRoutine As LPWSAOVERLAPPED_COMPLETION_ROUTINE) As Long
|
---|
| 1787 | #endif
|
---|
| 1788 |
|
---|
| 1789 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1790 | TypeDef LPFN_WSASEND = *Function(s As SOCKET, ByRef Buffers As WSABUF, BufferCount As DWord, ByRef NumberOfBytesSent As DWord, ByRef Flags As DWord,
|
---|
| 1791 | ByRef Overlapped As WSAOVERLAPPED, lpCompletionRoutine As LPWSAOVERLAPPED_COMPLETION_ROUTINE) As Long
|
---|
| 1792 | #endif
|
---|
| 1793 |
|
---|
| 1794 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1795 | Declare Function WSASendDisconnect Lib "ws2_32" (s As SOCKET, ByRef OutboundDisconnectData As WSABUF) As Long
|
---|
| 1796 | #endif
|
---|
| 1797 |
|
---|
| 1798 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1799 | TypeDef LPFN_WSASENDDISCONNECT = *Function(s As SOCKET, ByRef OutboundDisconnectData As WSABUF) As Long
|
---|
| 1800 | #endif
|
---|
| 1801 |
|
---|
| 1802 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1803 | Declare Function WSASendTo Lib "ws2_32" (s As SOCKET, ByRef Buffers As WSABUF, BufferCount As DWord, ByRef NumberOfBytesSent As DWord, ByRef Flags As DWord,
|
---|
| 1804 | ByRef To_ As sockaddr, ToLen As Long, ByRef Overlapped As WSAOVERLAPPED, lpCompletionRoutine As LPWSAOVERLAPPED_COMPLETION_ROUTINE) As Long
|
---|
| 1805 | #endif
|
---|
| 1806 |
|
---|
| 1807 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1808 | TypeDef LPFN_WSASENDTO = *Function(s As SOCKET, ByRef Buffers As WSABUF, BufferCount As DWord, ByRef NumberOfBytesSent As DWord, ByRef Flags As DWord,
|
---|
| 1809 | ByRef To_ As sockaddr, ToLen As Long, ByRef Overlapped As WSAOVERLAPPED, lpCompletionRoutine As LPWSAOVERLAPPED_COMPLETION_ROUTINE) As Long
|
---|
| 1810 | #endif
|
---|
| 1811 |
|
---|
| 1812 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1813 | Declare Function WSASetEvent Lib "ws2_32" (hEvent As WSAEVENT) As BOOL
|
---|
| 1814 | #endif
|
---|
| 1815 |
|
---|
| 1816 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1817 | TypeDef LPFN_WSASETEVENT = *Function(hEvent As WSAEVENT) As BOOL
|
---|
| 1818 | #endif
|
---|
| 1819 |
|
---|
| 1820 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1821 | Declare Function WSASocketA Lib "ws2_32" (af As Long, type_ As Long, protocol As Long, ByRef ProtocolInfo As WSAPROTOCOL_INFOA, g As GROUP, Flags As DWord) As SOCKET
|
---|
| 1822 | Declare Function WSASocketW Lib "ws2_32" (af As Long, type_ As Long, protocol As Long, ByRef ProtocolInfo As WSAPROTOCOL_INFOW, g As GROUP, Flags As DWord) As SOCKET
|
---|
| 1823 | #ifdef UNICODE
|
---|
| 1824 | Declare Function WSASocket Lib "ws2_32" Alias "WSASocketW" (af As Long, type_ As Long, protocol As Long, ByRef ProtocolInfo As WSAPROTOCOL_INFO, g As GROUP, Flags As DWord) As SOCKET
|
---|
| 1825 | #else
|
---|
| 1826 | Declare Function WSASocket Lib "ws2_32" Alias "WSASocketA" (af As Long, type_ As Long, protocol As Long, ByRef ProtocolInfo As WSAPROTOCOL_INFO, g As GROUP, Flags As DWord) As SOCKET
|
---|
| 1827 | #endif
|
---|
| 1828 | #endif
|
---|
| 1829 |
|
---|
| 1830 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1831 | TypeDef LPFN_WSASOCKETA = *Function(af As Long, type_ As Long, protocol As Long, ByRef ProtocolInfo As WSAPROTOCOL_INFOA, g As GROUP, Flags As DWord) As SOCKET
|
---|
| 1832 | TypeDef LPFN_WSASOCKETW = *Function(af As Long, type_ As Long, protocol As Long, ByRef ProtocolInfo As WSAPROTOCOL_INFOW, g As GROUP, Flags As DWord) As SOCKET
|
---|
| 1833 | #ifdef UNICODE
|
---|
| 1834 | TypeDef LPFN_WSASOCKET = LPFN_WSASOCKETW
|
---|
| 1835 | #else
|
---|
| 1836 | TypeDef LPFN_WSASOCKET = LPFN_WSASOCKETA
|
---|
| 1837 | #endif
|
---|
| 1838 | #endif
|
---|
| 1839 |
|
---|
| 1840 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1841 | Declare Function WSAWaitForMultipleEvents Lib "ws2_32" (cEvents As DWord, phEvents As *WSAEVENT, WaitAll As BOOL, Timeout As DWord, Alertable As BOOL) As DWord
|
---|
| 1842 | #endif
|
---|
| 1843 |
|
---|
| 1844 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1845 | TypeDef LPFN_WSAWAITFORMULTIPLEEVENTS = *Function(cEvents As DWord, phEvents As *WSAEVENT, WaitAll As BOOL, Timeout As DWord, Alertable As BOOL) As DWord
|
---|
| 1846 | #endif
|
---|
| 1847 |
|
---|
| 1848 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1849 | Declare Function WSAAddressToStringA Lib "ws2_32" (ByRef saAddress As SOCKADDR, AddressLength As DWord, ByRef ProtocolInfo As WSAPROTOCOL_INFOA,
|
---|
| 1850 | AddressString As PSTR, ByRef dwAddressStringLength As DWord) As Long
|
---|
| 1851 | Declare Function WSAAddressToStringW Lib "ws2_32" (ByRef saAddress As SOCKADDR, AddressLength As DWord, ByRef ProtocolInfo As WSAPROTOCOL_INFOA,
|
---|
| 1852 | AddressString As PWSTR, ByRef dwAddressStringLength As DWord) As Long
|
---|
| 1853 | #ifdef UNICODE
|
---|
| 1854 | Declare Function WSAAddressToString Lib "ws2_32" Alias "WSAAddressToStringW" (ByRef saAddress As SOCKADDR, AddressLength As DWord,
|
---|
| 1855 | ByRef ProtocolInfo As WSAPROTOCOL_INFO, AddressString As PSTR, ByRef dwAddressStringLength As DWord) As Long
|
---|
| 1856 | #else
|
---|
| 1857 | Declare Function WSAAddressToString Lib "ws2_32" Alias "WSAAddressToStringA" (ByRef saAddress As SOCKADDR, AddressLength As DWord,
|
---|
| 1858 | ByRef ProtocolInfo As WSAPROTOCOL_INFO, AddressString As PSTR, ByRef dwAddressStringLength As DWord) As Long
|
---|
| 1859 | #endif
|
---|
| 1860 | #endif
|
---|
| 1861 |
|
---|
| 1862 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1863 | TypeDef LPFN_WSAADDRESSTOSTRINGA = *Function(ByRef saAddress As SOCKADDR, AddressLength As DWord, ByRef ProtocolInfo As WSAPROTOCOL_INFOA,
|
---|
| 1864 | AddressString As PSTR, ByRef dwAddressStringLength As DWord) As Long
|
---|
| 1865 | TypeDef LPFN_WSAADDRESSTOSTRINGW = *Function(ByRef saAddress As SOCKADDR, AddressLength As DWord, ByRef ProtocolInfo As WSAPROTOCOL_INFOA,
|
---|
| 1866 | AddressString As PWSTR, ByRef dwAddressStringLength As DWord) As Long
|
---|
| 1867 | #ifdef UNICODE
|
---|
| 1868 | TypeDef LPFN_WSAADDRESSTOSTRING = LPFN_WSAADDRESSTOSTRINGW
|
---|
| 1869 | #else
|
---|
| 1870 | TypeDef LPFN_WSAADDRESSTOSTRING = LPFN_WSAADDRESSTOSTRINGA
|
---|
| 1871 | #endif
|
---|
| 1872 | #endif
|
---|
| 1873 |
|
---|
| 1874 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1875 | Declare Function WSAStringToAddressA Lib "ws2_32" (AddressString As PSTR, AddressFamily As Long, ByRef ProtocolInfo As WSAPROTOCOL_INFOA,
|
---|
| 1876 | ByRef Address As SOCKADDR, ByRef AddressLength As Long) As Long
|
---|
| 1877 | Declare Function WSAStringToAddressW Lib "ws2_32" (AddressString As PWSTR, AddressFamily As Long, ByRef ProtocolInfo As WSAPROTOCOL_INFOW,
|
---|
| 1878 | ByRef Address As SOCKADDR, ByRef AddressLength As Long) As Long
|
---|
| 1879 | #ifdef UNICODE
|
---|
| 1880 | Declare Function WSAStringToAddress Lib "ws2_32" Alias "WSAStringToAddressW" (AddressString As PSTR, AddressFamily As Long,
|
---|
| 1881 | ByRef ProtocolInfo As WSAPROTOCOL_INFO, ByRef Address As SOCKADDR, ByRef AddressLength As Long) As Long
|
---|
| 1882 | #else
|
---|
| 1883 | Declare Function WSAStringToAddress Lib "ws2_32" Alias "WSAStringToAddressA" (AddressString As PSTR, AddressFamily As Long,
|
---|
| 1884 | ByRef ProtocolInfo As WSAPROTOCOL_INFO, ByRef Address As SOCKADDR, ByRef AddressLength As Long) As Long
|
---|
| 1885 | #endif
|
---|
| 1886 | #endif
|
---|
| 1887 |
|
---|
| 1888 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1889 | TypeDef LPFN_WSASTRINGTOADDRESSA = *Function(AddressString As PSTR, AddressFamily As Long, ByRef ProtocolInfo As WSAPROTOCOL_INFOA,
|
---|
| 1890 | ByRef Address As SOCKADDR, ByRef AddressLength As Long) As Long
|
---|
| 1891 | TypeDef LPFN_WSASTRINGTOADDRESSW = *Function(AddressString As PWSTR, AddressFamily As Long, ByRef ProtocolInfo As WSAPROTOCOL_INFOW,
|
---|
| 1892 | ByRef Address As SOCKADDR, ByRef AddressLength As Long) As Long
|
---|
| 1893 | #ifdef UNICODE
|
---|
| 1894 | TypeDef LPFN_WSASTRINGTOADDRESS = LPFN_WSASTRINGTOADDRESSW
|
---|
| 1895 | #else
|
---|
| 1896 | TypeDef LPFN_WSASTRINGTOADDRESS = LPFN_WSASTRINGTOADDRESSA
|
---|
| 1897 | #endif
|
---|
| 1898 | #endif
|
---|
| 1899 |
|
---|
| 1900 | ' Registration and Name Resolution API functions
|
---|
| 1901 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1902 | Declare Function WSALookupServiceBeginA Lib "ws2_32" (ByRef qsRestrictions As WSAQUERYSETA, ControlFlags As DWord, ByRef hLookup As HANDLE) As Long
|
---|
| 1903 | Declare Function WSALookupServiceBeginW Lib "ws2_32" (ByRef qsRestrictions As WSAQUERYSETW, ControlFlags As DWord, ByRef hLookup As HANDLE) As Long
|
---|
| 1904 | #ifdef UNICODE
|
---|
| 1905 | Declare Function WSALookupServiceBegin Lib "ws2_32" Alias "WSALookupServiceBeginW" (ByRef qsRestrictions As WSAQUERYSET, ControlFlags As DWord, ByRef hLookup As HANDLE) As Long
|
---|
| 1906 | #else
|
---|
| 1907 | Declare Function WSALookupServiceBegin Lib "ws2_32" Alias "WSALookupServiceBeginA" (ByRef qsRestrictions As WSAQUERYSET, ControlFlags As DWord, ByRef hLookup As HANDLE) As Long
|
---|
| 1908 | #endif
|
---|
| 1909 | #endif
|
---|
| 1910 |
|
---|
| 1911 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1912 | TypeDef LPFN_WSALOOKUPSERVICEBEGINA = *Function(ByRef qsRestrictions As WSAQUERYSETA, ControlFlags As DWord, ByRef hLookup As HANDLE) As Long
|
---|
| 1913 | TypeDef LPFN_WSALOOKUPSERVICEBEGINW = *Function(ByRef qsRestrictions As WSAQUERYSETW, ControlFlags As DWord, ByRef hLookup As HANDLE) As Long
|
---|
| 1914 | #ifdef UNICODE
|
---|
| 1915 | TypeDef LPFN_WSALOOKUPSERVICEBEGIN = LPFN_WSALOOKUPSERVICEBEGINW
|
---|
| 1916 | #else
|
---|
| 1917 | TypeDef LPFN_WSALOOKUPSERVICEBEGIN = LPFN_WSALOOKUPSERVICEBEGINA
|
---|
| 1918 | #endif
|
---|
| 1919 | #endif
|
---|
| 1920 |
|
---|
| 1921 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1922 | Declare Function WSALookupServiceNextA Lib "ws2_32" (hLookup As HANDLE, ControlFlags As DWord, ByRef BufferLength As DWord, ByRef qsResults As WSAQUERYSETA) As Long
|
---|
| 1923 | Declare Function WSALookupServiceNextW Lib "ws2_32" (hLookup As HANDLE, ControlFlags As DWord, ByRef BufferLength As DWord, ByRef qsResults As WSAQUERYSETW) As Long
|
---|
| 1924 | #ifdef UNICODE
|
---|
| 1925 | Declare Function WSALookupServiceNext Lib "ws2_32" Alias "WSALookupServiceNextW" (hLookup As HANDLE, ControlFlags As DWord, ByRef BufferLength As DWord, ByRef qsResults As WSAQUERYSET) As Long
|
---|
| 1926 | #else
|
---|
| 1927 | Declare Function WSALookupServiceNext Lib "ws2_32" Alias "WSALookupServiceNextA" (hLookup As HANDLE, ControlFlags As DWord, ByRef BufferLength As DWord, ByRef qsResults As WSAQUERYSET) As Long
|
---|
| 1928 | #endif
|
---|
| 1929 | #endif
|
---|
| 1930 |
|
---|
| 1931 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1932 | TypeDef LPFN_WSALOOKUPSERVICENEXTA = *FunctionhLookup As HANDLE, ControlFlags As DWord, ByRef BufferLength As DWord, ByRef qsResults As WSAQUERYSETA) As Long
|
---|
| 1933 | TypeDef LPFN_WSALOOKUPSERVICENEXTW = *FunctionhLookup As HANDLE, ControlFlags As DWord, ByRef BufferLength As DWord, ByRef qsResults As WSAQUERYSETW) As Long
|
---|
| 1934 | #ifdef UNICODE
|
---|
| 1935 | TypeDef LPFN_WSALOOKUPSERVICENEXT = LPFN_WSALOOKUPSERVICENEXTW
|
---|
| 1936 | #else
|
---|
| 1937 | TypeDef LPFN_WSALOOKUPSERVICENEXT = LPFN_WSALOOKUPSERVICENEXTA
|
---|
| 1938 | #endif
|
---|
| 1939 | #endif
|
---|
| 1940 |
|
---|
| 1941 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1942 | Declare Function WSANSPIoctl Lib "ws2_32" (hLookup As HANDLE, ControlCode As DWord, pvInBuffer As VoidPtr, cbInBuffer As DWord,
|
---|
| 1943 | pvOutBuffer As VoidPtr, cbOutBuffer As DWord, ByRef cbBytesReturned As DWord, ByRef Completion As WSACOMPLETION) As Long
|
---|
| 1944 | #endif
|
---|
| 1945 |
|
---|
| 1946 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1947 | TypeDef LPFN_WSANSPIOCTL = *Function(hLookup As HANDLE, ControlCode As DWord, pvInBuffer As VoidPtr, cbInBuffer As DWord,
|
---|
| 1948 | pvOutBuffer As VoidPtr, cbOutBuffer As DWord, ByRef cbBytesReturned As DWord, ByRef Completion As WSACOMPLETION) As Long
|
---|
| 1949 | #endif
|
---|
| 1950 |
|
---|
| 1951 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1952 | Declare Function WSALookupServiceEnd Lib "ws2_32" (hLookup As HANDLE) As Long
|
---|
| 1953 | #endif
|
---|
| 1954 |
|
---|
| 1955 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1956 | TypeDef LPFN_WSALOOKUPSERVICEEND = *Function(hLookup As HANDLE) As Long
|
---|
| 1957 | #endif
|
---|
| 1958 |
|
---|
| 1959 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1960 | Declare Function WSAInstallServiceClassA Lib "ws2_32" (ByRef ServiceClassInfo As WSASERVICECLASSINFOA) As Long
|
---|
| 1961 | Declare Function WSAInstallServiceClassW Lib "ws2_32" (ByRef ServiceClassInfo As WSASERVICECLASSINFOW) As Long
|
---|
| 1962 | #ifdef UNICODE
|
---|
| 1963 | Declare Function WSAInstallServiceClass Lib "ws2_32" Alias "WSAInstallServiceClassW" (ByRef ServiceClassInfo As WSASERVICECLASSINFO) As Long
|
---|
| 1964 | #else
|
---|
| 1965 | Declare Function WSAInstallServiceClass Lib "ws2_32" Alias "WSAInstallServiceClassA" (ByRef ServiceClassInfo As WSASERVICECLASSINFO) As Long
|
---|
| 1966 | #endif
|
---|
| 1967 | #endif
|
---|
| 1968 |
|
---|
| 1969 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1970 | TypeDef LPFN_WSAINSTALLSERVICECLASSA = *Function(ByRef ServiceClassInfo As WSASERVICECLASSINFOA) As Long
|
---|
| 1971 | TypeDef LPFN_WSAINSTALLSERVICECLASSW = *Function(ByRef ServiceClassInfo As WSASERVICECLASSINFOW) As Long
|
---|
| 1972 | #ifdef UNICODE
|
---|
| 1973 | TypeDef LPFN_WSAINSTALLSERVICECLASS = LPFN_WSAINSTALLSERVICECLASSW
|
---|
| 1974 | #else
|
---|
| 1975 | TypeDef LPFN_WSAINSTALLSERVICECLASS = LPFN_WSAINSTALLSERVICECLASSA
|
---|
| 1976 | #endif
|
---|
| 1977 | #endif
|
---|
| 1978 |
|
---|
| 1979 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1980 | Declare Function WSARemoveServiceClass Lib "ws2_32" (ByRef ServiceClassId As GUID) As Long
|
---|
| 1981 | #endif
|
---|
| 1982 |
|
---|
| 1983 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1984 | TypeDef LPFN_WSAREMOVESERVICECLASS = *Function(ByRef ServiceClassId As GUID) As Long
|
---|
| 1985 | #endif
|
---|
| 1986 |
|
---|
| 1987 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 1988 | Declare Function WSAGetServiceClassInfoA Lib "ws2_32" (ByRef ProviderId As GUID, ByRef ServiceClassId As GUID, ByRef BufSize As DWord, ByRef ServiceClassInfo As WSASERVICECLASSINFOA) As Long
|
---|
| 1989 | Declare Function WSAGetServiceClassInfoW Lib "ws2_32" (ByRef ProviderId As GUID, ByRef ServiceClassId As GUID, ByRef BufSize As DWord, ByRef ServiceClassInfo As WSASERVICECLASSINFOW) As Long
|
---|
| 1990 | #ifdef UNICODE
|
---|
| 1991 | Declare Function WSAGetServiceClassInfo Lib "ws2_32" Alias "WSAGetServiceClassInfoW" (ByRef ProviderId As GUID, ByRef ServiceClassId As GUID, ByRef BufSize As DWord, ByRef ServiceClassInfo As WSASERVICECLASSINFO) As Long
|
---|
| 1992 | #else
|
---|
| 1993 | Declare Function WSAGetServiceClassInfo Lib "ws2_32" Alias "WSAGetServiceClassInfoA" (ByRef ProviderId As GUID, ByRef ServiceClassId As GUID, ByRef BufSize As DWord, ByRef ServiceClassInfo As WSASERVICECLASSINFO) As Long
|
---|
| 1994 | #endif
|
---|
| 1995 | #endif
|
---|
| 1996 |
|
---|
| 1997 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 1998 | TypeDef LPFN_WSAGETSERVICECLASSINFOA = *Function(ByRef ProviderId As GUID, ByRef ServiceClassId As GUID, ByRef BufSize As DWord, ByRef ServiceClassInfo As WSASERVICECLASSINFOA) As Long
|
---|
| 1999 | TypeDef LPFN_WSAGETSERVICECLASSINFOW = *Function(ByRef ProviderId As GUID, ByRef ServiceClassId As GUID, ByRef BufSize As DWord, ByRef ServiceClassInfo As WSASERVICECLASSINFOW) As Long
|
---|
| 2000 | #ifdef UNICODE
|
---|
| 2001 | TypeDef LPFN_WSAGETSERVICECLASSINFO = LPFN_WSAGETSERVICECLASSINFOW
|
---|
| 2002 | #else
|
---|
| 2003 | TypeDef LPFN_WSAGETSERVICECLASSINFO = LPFN_WSAGETSERVICECLASSINFOA
|
---|
| 2004 | #endif
|
---|
| 2005 | #endif
|
---|
| 2006 |
|
---|
| 2007 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 2008 | Declare Function WSAEnumNameSpaceProvidersA Lib "ws2_32" (ByRef BufferLength As DWord, ByRef nspBuffer As WSANAMESPACE_INFOA) As Long
|
---|
| 2009 | Declare Function WSAEnumNameSpaceProvidersW Lib "ws2_32" (ByRef BufferLength As DWord, ByRef nspBuffer As WSANAMESPACE_INFOW) As Long
|
---|
| 2010 | #ifdef UNICODE
|
---|
| 2011 | Declare Function WSAEnumNameSpaceProviders Lib "ws2_32" Alias "WSAEnumNameSpaceProvidersW" (ByRef BufferLength As DWord, ByRef nspBuffer As WSANAMESPACE_INFO) As Long
|
---|
| 2012 | #else
|
---|
| 2013 | Declare Function WSAEnumNameSpaceProviders Lib "ws2_32" Alias "WSAEnumNameSpaceProvidersA" (ByRef BufferLength As DWord, ByRef nspBuffer As WSANAMESPACE_INFO) As Long
|
---|
| 2014 | #endif
|
---|
| 2015 | #endif
|
---|
| 2016 |
|
---|
| 2017 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 2018 | TypeDef LPFN_WSAENUMNAMESPACEPROVIDERSA = *Function(ByRef BufferLength As DWord, ByRef nspBuffer As WSANAMESPACE_INFOA) As Long
|
---|
| 2019 | TypeDef LPFN_WSAENUMNAMESPACEPROVIDERSW = *Function(ByRef BufferLength As DWord, ByRef nspBuffer As WSANAMESPACE_INFOW) As Long
|
---|
| 2020 | #ifdef UNICODE
|
---|
| 2021 | TypeDef LPFN_WSAENUMNAMESPACEPROVIDERS = LPFN_WSAENUMNAMESPACEPROVIDERSW
|
---|
| 2022 | #else
|
---|
| 2023 | TypeDef LPFN_WSAENUMNAMESPACEPROVIDERS = LPFN_WSAENUMNAMESPACEPROVIDERSA
|
---|
| 2024 | #endif
|
---|
| 2025 | #endif
|
---|
| 2026 |
|
---|
| 2027 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 2028 | Declare Function WSAGetServiceClassNameByClassIdA Lib "ws2_32" (ByRef ServiceClassId As GUID, ServiceClassName As PSTR, ByRef BufferLength As DWord) As Long
|
---|
| 2029 | Declare Function WSAGetServiceClassNameByClassIdW Lib "ws2_32" (ByRef ServiceClassId As GUID, ServiceClassName As PWSTR, ByRef BufferLength As DWord) As Long
|
---|
| 2030 | #ifdef UNICODE
|
---|
| 2031 | Declare Function WSAGetServiceClassNameByClassId Lib "ws2_32" Alias "WSAGetServiceClassNameByClassIdW" (ByRef ServiceClassId As GUID, ServiceClassName As PWSTR, ByRef BufferLength As DWord) As Long
|
---|
| 2032 | #else
|
---|
| 2033 | Declare Function WSAGetServiceClassNameByClassId Lib "ws2_32" Alias "WSAGetServiceClassNameByClassIdA" (ByRef ServiceClassId As GUID, ServiceClassName As PSTR, ByRef BufferLength As DWord) As Long
|
---|
| 2034 | #endif
|
---|
| 2035 | #endif
|
---|
| 2036 |
|
---|
| 2037 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 2038 | TypeDef LPFN_WSAGETSERVICECLASSNAMEBYCLASSIDA = *Function(ByRef ServiceClassId As GUID, ServiceClassName As PSTR, ByRef BufferLength As DWord) As Long
|
---|
| 2039 | TypeDef LPFN_WSAGETSERVICECLASSNAMEBYCLASSIDW = *Function(ByRef ServiceClassId As GUID, ServiceClassName As PWSTR, ByRef BufferLength As DWord) As Long
|
---|
| 2040 | #ifdef UNICODE
|
---|
| 2041 | TypeDef LPFN_WSAGETSERVICECLASSNAMEBYCLASSID = LPFN_WSAGETSERVICECLASSNAMEBYCLASSIDW
|
---|
| 2042 | #else
|
---|
| 2043 | TypeDef LPFN_WSAGETSERVICECLASSNAMEBYCLASSID = LPFN_WSAGETSERVICECLASSNAMEBYCLASSIDA
|
---|
| 2044 | #endif
|
---|
| 2045 | #endif
|
---|
| 2046 |
|
---|
| 2047 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 2048 | Declare Function WSASetServiceA Lib "ws2_32" (ByRef qsRegInfo As WSAQUERYSETA, essoperation As WSAESETSERVICEOP, ControlFlags As DWord) As Long
|
---|
| 2049 | Declare Function WSASetServiceW Lib "ws2_32" (ByRef qsRegInfo As WSAQUERYSETW, essoperation As WSAESETSERVICEOP, ControlFlags As DWord) As Long
|
---|
| 2050 | #ifdef UNICODE
|
---|
| 2051 | Declare Function WSASetService Lib "ws2_32" Alias "WSASetServiceW" (ByRef qsRegInfo As WSAQUERYSET, essoperation As WSAESETSERVICEOP, ControlFlags As DWord) As Long
|
---|
| 2052 | #else
|
---|
| 2053 | Declare Function WSASetService Lib "ws2_32" Alias "WSASetServiceA" (ByRef qsRegInfo As WSAQUERYSET, essoperation As WSAESETSERVICEOP, ControlFlags As DWord) As Long
|
---|
| 2054 | #endif
|
---|
| 2055 | #endif
|
---|
| 2056 |
|
---|
| 2057 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 2058 | TypeDef LPFN_WSASETSERVICEA = *Function(ByRef qsRegInfo As WSAQUERYSETA, essoperation As WSAESETSERVICEOP, ControlFlags As DWord) As Long
|
---|
| 2059 | TypeDef LPFN_WSASETSERVICEW = *Function(ByRef qsRegInfo As WSAQUERYSETW, essoperation As WSAESETSERVICEOP, ControlFlags As DWord) As Long
|
---|
| 2060 | #ifdef UNICODE
|
---|
| 2061 | TypeDef LPFN_WSASETSERVICE = LPFN_WSASETSERVICEW
|
---|
| 2062 | #else
|
---|
| 2063 | TypeDef LPFN_WSASETSERVICE = LPFN_WSASETSERVICEA
|
---|
| 2064 | #endif
|
---|
| 2065 | #endif
|
---|
| 2066 |
|
---|
| 2067 | #ifndef NO_INCL_WINSOCK_API_PROTOTYPES
|
---|
| 2068 | Declare Function WSAProviderConfigChange Lib "ws2_32" (ByRef NotificationHandle As HANDLE, ByRef Overlapped As WSAOVERLAPPED, lpCompletionRoutine As LPWSAOVERLAPPED_COMPLETION_ROUTINE) As Long
|
---|
| 2069 | #endif
|
---|
| 2070 |
|
---|
| 2071 | #ifdef INCL_WINSOCK_API_TYPEDEFS
|
---|
| 2072 | TypeDef LPFN_WSAPROVIDERCONFIGCHANGE = *Function(ByRef NotificationHandle As HANDLE, ByRef Overlapped As WSAOVERLAPPED, lpCompletionRoutine As LPWSAOVERLAPPED_COMPLETION_ROUTINE) As Long
|
---|
| 2073 | #endif
|
---|
| 2074 |
|
---|
| 2075 | ' Microsoft Windows Extended data types
|
---|
| 2076 | TypeDef SOCKADDR_IN = sockaddr_in
|
---|
| 2077 | TypeDef PSOCKADDR_IN = *sockaddr_in
|
---|
| 2078 | TypeDef LPSOCKADDR_IN = *sockaddr_in
|
---|
| 2079 |
|
---|
| 2080 | TypeDef LINGER = linger
|
---|
| 2081 | TypeDef PLINGER = *linger
|
---|
| 2082 | TypeDef LPLINGER = *linger
|
---|
| 2083 |
|
---|
| 2084 | TypeDef IN_ADDR = in_addr
|
---|
| 2085 | TypeDef PIN_ADDR = *in_addr
|
---|
| 2086 | TypeDef LPIN_ADDR = *in_addr
|
---|
| 2087 |
|
---|
| 2088 | TypeDef FD_SET = fd_set
|
---|
| 2089 | TypeDef PFD_SET = *fd_set
|
---|
| 2090 | TypeDef LPFD_SET = *fd_set
|
---|
| 2091 |
|
---|
| 2092 | TypeDef HOSTENT = hostent
|
---|
| 2093 | TypeDef PHOSTENT = *hostent
|
---|
| 2094 | TypeDef LPHOSTENT = *hostent
|
---|
| 2095 |
|
---|
| 2096 | TypeDef SERVENT = servent
|
---|
| 2097 | TypeDef PSERVENT = *servent
|
---|
| 2098 | TypeDef LPSERVENT = *servent
|
---|
| 2099 |
|
---|
| 2100 | TypeDef PROTOENT = protoent
|
---|
| 2101 | TypeDef PPROTOENT = *protoent
|
---|
| 2102 | TypeDef LPPROTOENT = *protoent
|
---|
| 2103 |
|
---|
| 2104 | TypeDef TIMEVAL = timeval
|
---|
| 2105 | TypeDef PTIMEVAL = *timeval
|
---|
| 2106 | TypeDef LPTIMEVAL = *timeval
|
---|
| 2107 |
|
---|
| 2108 | ' Windows message parameter composition and decomposition macros.
|
---|
| 2109 | Const WSAMAKEASYNCREPLY(buflen, error) = MAKELONG(buflen, error)
|
---|
| 2110 | Const WSAMAKESELECTREPLY(event, error) = MAKELONG(event, error)
|
---|
| 2111 | Const WSAGETASYNCBUFLEN(lParam) = LOWORD(lParam)
|
---|
| 2112 | Const WSAGETASYNCERROR(lParam) = HIWORD(lParam)
|
---|
| 2113 | Const WSAGETSELECTEVENT(lParam) = LOWORD(lParam)
|
---|
| 2114 | Const WSAGETSELECTERROR(lParam) = HIWORD(lParam)
|
---|
| 2115 |
|
---|
[497] | 2116 | '#ifdef IPV6STRICT
|
---|
| 2117 | '#require <wsipv6ok.ab>
|
---|
| 2118 | '#endif
|
---|
[42] | 2119 |
|
---|
| 2120 | #endif
|
---|