Winsock 2.2 Download

-->

Jul 05, 2007 The plugin has 60+ commands so far and is fully documented. You can access the help files with F1 if your editing cursor is above a winsock command. All the commands start with 'WINSOCK' to better keep them clustered. There are two server-clients examples included in the help directory, which should help you get started.

  • XP TCP/IP Repair 2.2 on 32-bit and 64-bit PCs. This download is licensed as freeware for the Windows (32-bit and 64-bit) operating system on a laptop or desktop PC from network software without restrictions. XP TCP IP Repair 2.2 is available to all software users as a free download for Windows. Though this program tested positive for virus.
  • Windows. Sockets 2 Application Programming Interface An Interface for Transparent Network Programming Under Microsoft WindowsTM Revision 2.2.2 August 7, 1997 Subject to Change Without Notice.
  • OstroSoft Winsock Component v.2.2 COM library for Visual Basic 6, providing an easy access to the network layer of operating system (UDP and TCP sockets). Winsock Mutex Vulnerability N/A Microsoft has released a patch that eliminates a security vulnerability in Microsoft Windows NT 4.0.

TheWSAStartup function initiates use of the Winsock DLL by a process.

Syntax

Parameters

wVersionRequested

The highest version of Windows Sockets specification that the caller can use. The high-order byte specifies the minor version number; the low-order byte specifies the major version number.

lpWSAData

A pointer to theWSADATA data structure that is to receive details of the Windows Sockets implementation.

Return value

If successful, theWSAStartup function returns zero. Otherwise, it returns one of the error codes listed below.

The WSAStartup function directly returns the extended error code in the return value for this function. A call to the WSAGetLastError function is not needed and should not be used.

Error codeMeaning
WSASYSNOTREADY
The underlying network subsystem is not ready for network communication.
WSAVERNOTSUPPORTED
The version of Windows Sockets support requested is not provided by this particular Windows Sockets implementation.
WSAEINPROGRESS
A blocking Windows Sockets 1.1 operation is in progress.
WSAEPROCLIM
A limit on the number of tasks supported by the Windows Sockets implementation has been reached.
WSAEFAULT
The lpWSAData parameter is not a valid pointer.

Remarks

TheWSAStartup function must be the first Windows Sockets function called by an application or DLL. It allows an application or DLL to specify the version of Windows Sockets required and retrieve details of the specific Windows Sockets implementation. The application or DLL can only issue further Windows Sockets functions after successfully callingWSAStartup.

In order to support various Windows Sockets implementations and applications that can have functional differences from the latest version of Windows Sockets specification, a negotiation takes place inWSAStartup. The caller ofWSAStartup passes in the wVersionRequested parameter the highest version of the Windows Sockets specification that the application supports. The Winsock DLL indicates the highest version of the Windows Sockets specification that it can support in its response. The Winsock DLL also replies with version of the Windows Sockets specification that it expects the caller to use.

When an application or DLL calls theWSAStartup function, the Winsock DLL examines the version of the Windows Sockets specification requested by the application passed in the wVersionRequested parameter. If the version requested by the application is equal to or higher than the lowest version supported by the Winsock DLL, the call succeeds and the Winsock DLL returns detailed information in the WSADATA structure pointed to by the lpWSAData parameter. The wHighVersion member of the WSADATA structure indicates the highest version of the Windows Sockets specification that the Winsock DLL supports. The wVersion member of the WSADATA structure indicates the version of the Windows Sockets specification that the Winsock DLL expects the caller to use.

If the wVersion member of theWSADATA structure is unacceptable to the caller, the application or DLL should callWSACleanup to release the Winsock DLL resources and fail to initialize the Winsock application. In order to support this application or DLL, it will be necessary to search for an updated version of the Winsock DLL to install on the platform.

The current version of the Windows Sockets specification is version 2.2. The current Winsock DLL, Ws2_32.dll, supports applications that request any of the following versions of Windows Sockets specification:

  • 1.0
  • 1.1
  • 2.0
  • 2.1
  • 2.2

To get full access to the new syntax of a higher version of the Windows Sockets specification, the application must negotiate for this higher version. In this case, the wVersionRequested parameter should be set to request version 2.2. The application must also fully conform to that higher version of the Windows Socket specification, such as compiling against the appropriate header file, linking with a new library, or other special cases. The Winsock2.h header file for Winsock 2 support is included with the Microsoft Windows Software Development Kit (SDK).

Windows Sockets version 2.2 is supported on Windows Server 2008,Windows Vista, Windows Server 2003,Windows XP,Windows 2000, Windows NT 4.0 with Service Pack 4 (SP4) and later,Windows Me,Windows 98, and Windows 95 OSR2.Windows Sockets version 2.2 is also supported on
Windows 95 with the Windows Socket 2 Update. Applications on these platforms should normally request Winsock 2.2 by setting the wVersionRequested parameter accordingly.

On Windows 95 and versions of Windows NT 3.51 and earlier, Windows Sockets version 1.1 is the highest version of the Windows Sockets specification supported.

It is legal and possible for an application or DLL written to use a lower version of the Windows Sockets specification that is supported by the Winsock DLL to successfully negotiate this lower version using the WSAStartup function. For example, an application can request version 1.1 in the wVersionRequested parameter passed to the WSAStartup function on a platform with the Winsock 2.2 DLL. In this case, the application should only rely on features that fit within the version requested. New Ioctl codes, new behavior of existing functions, and new functions should not be used. The version negotiation provided by the WSAStartup was primarily used to allow older Winsock 1.1 applications developed for Windows 95 and Windows NT 3.51 and earlier to run with the same behavior on later versions of Windows. The Winsock.h header file for Winsock 1.1 support is included with the Windows SDK.

This negotiation in the WSAStartup function allows both the application or DLL that uses Windows Sockets and the Winsock DLL to support a range of Windows Sockets versions. An application or DLL can use the Winsock DLL if there is any overlap in the version ranges. Detailed information on the Windows Sockets implementation is provided in theWSADATA structure returned by the WSAStartup function.

The following table shows howWSAStartup works with different applications and Winsock DLL versions.

Caller version supportWinsock DLL version supportwVersion requestedwVersion returnedwHighVersion returnedEnd result
1.11.11.11.11.1use 1.1
1.0 1.11.01.11.01.0use 1.0
1.01.0 1.11.01.01.1use 1.0
1.11.0 1.11.11.11.1use 1.1
1.11.01.11.01.0Application fails
1.01.11.0WSAVERNOTSUPPORTED
1.0 1.11.0 1.11.11.11.1use 1.1
1.1 2.01.0 1.12.01.11.1use 1.1
2.01.0 1.1 2.02.02.02.0use 2.0
2.0 2.21.0 1.1 2.02.22.02.0use 2.0
2.21.0 1.1 2.0 2.1 2.22.22.22.2use 2.2

Once an application or DLL has made a successfulWSAStartup call, it can proceed to make other Windows Sockets calls as needed. When it has finished using the services of the Winsock DLL, the application must callWSACleanup to allow the Winsock DLL to free internal Winsock resources used by the application.

An application can callWSAStartup more than once if it needs to obtain theWSADATA structure information more than once. On each such call, the application can specify any version number supported by the Winsock DLL.

Programming

TheWSAStartup function typically leads to protocol-specific helper DLLs being loaded. As a result, theWSAStartup function should not be called from the DllMain function in a application DLL. This can potentially cause deadlocks. For more information, please see the DLL Main Function.

An application must call the WSACleanup function for every successfultime the WSAStartup function is called. This means, for example, that if an application callsWSAStartup three times, it must callWSACleanup three times. The first two calls toWSACleanup do nothing except decrement an internal counter; the finalWSACleanup call for the task does all necessary resource deallocation for the task.

Note An application can call the WSAGetLastError function to determine the extended error code for other Windows sockets functions as is normally done in Windows Sockets even if the WSAStartup function fails or the WSAStartup function was not called to properly initialize Windows Sockets before calling a Windows Sockets function. The WSAGetLastError function is one of the only functions in the Winsock 2.2 DLL that can be called in the case of a WSAStartup failure.

Windows Phone 8: This function is supported for Windows Phone Store apps on Windows Phone 8 and later.

Windows 8.1 and Windows Server 2012 R2: This function is supported for Windows Store apps on Windows 8.1, Windows Server 2012 R2, and later.

Examples

The following code fragment demonstrates how an application that supports only version 2.2 of Windows Sockets makes aWSAStartup call:

Requirements

Minimum supported clientWindows 8.1, Windows Vista [desktop apps | UWP apps]
Minimum supported serverWindows Server 2003 [desktop apps | UWP apps]
Target PlatformWindows
Headerwinsock2.h (include Winsock2.h)
LibraryWs2_32.lib
DLLWs2_32.dll

Winsock 2.2 Download

See also

Oct 3rd, 2017
Never
Not a member of Pastebin yet?Sign Up, it unlocks many cool features!
  1. [14:24:14] Winsock 2.2 -- OpenSSL 1.1.0e 16 Feb 2017
  2. [14:24:26] [R] Connecting to nfs1.wwwfarm.uwr.local -> DNS=nfs1.wwwfarm.uwr.local IP=192.168.9.31 PORT=21
  3. [14:24:26] [R] Connected to nfs1.wwwfarm.uwr.local
  4. [14:24:26] [R] USER uniwrocpl
  5. [14:24:26] [R] PASS (hidden)
  6. [14:24:26] [R] SYST
  7. [14:24:26] [R] FEAT
  8. [14:24:26] [R] EPRT
  9. [14:24:26] [R] MDTM
  10. [14:24:26] [R] REST STREAM
  11. [14:24:26] [R] TVFS
  12. [14:24:26] [R] PWD
  13. [14:24:26] [R] PASV
  14. [14:24:26] [R] 227 Entering Passive Mode (192,168,9,31,156,99).
  15. [14:24:26] [R] Opening data connection IP: 192.168.9.31 PORT: 40035
  16. [14:24:26] [R] 150 Here comes the directory listing.
  17. [14:24:26] [R] List Complete: 1 KB in 0.04 seconds (1.9 KB/s)
  18. [14:24:26] [R] Calculating timezone offset of server...
  19. [14:24:26] [R] 213 20170929150651
  20. [14:24:26] [R] Timezone offsets: Server: 0 seconds. Local: 7200 seconds. Difference: 7200 seconds.
  21. [14:24:27] [R] 250 Directory successfully changed.
  22. [14:24:27] [R] 257 '/wp-includes'
  23. [14:24:27] [R] 227 Entering Passive Mode (192,168,9,31,212,220).
  24. [14:24:27] [R] Opening data connection IP: 192.168.9.31 PORT: 54492
  25. [14:24:27] [R] 150 Here comes the directory listing.
  26. [14:24:27] [R] List Complete: 13 KB in 0.04 seconds (13.4 KB/s)
  27. [14:24:32] [R] 250 Directory successfully changed.
  28. [14:24:32] [R] 257 '/wp-content'
  29. [14:24:32] [R] 227 Entering Passive Mode (192,168,9,31,184,66).
  30. [14:24:32] [R] Opening data connection IP: 192.168.9.31 PORT: 47170
  31. [14:24:32] [R] 150 Here comes the directory listing.
  32. [14:24:32] [R] List Complete: 1 KB in 0.01 seconds (1.3 KB/s)
  33. [14:24:41] [R] 250 Directory successfully changed.
  34. [14:24:41] [R] 257 '/wp-content/themes'
  35. [14:24:41] [R] 227 Entering Passive Mode (192,168,9,31,137,55).
  36. [14:24:41] [R] Opening data connection IP: 192.168.9.31 PORT: 35127
  37. [14:24:41] [R] 150 Here comes the directory listing.
  38. [14:24:41] [R] List Complete: 2 KB in 0.03 seconds (2.7 KB/s)
  39. [14:24:49] [R] 250 Directory successfully changed.
  40. [14:24:49] [R] 257 '/wp-content/themes/uniwroc-theme'
  41. [14:24:49] [R] 227 Entering Passive Mode (192,168,9,31,111,59).
  42. [14:24:49] [R] Opening data connection IP: 192.168.9.31 PORT: 28475
  43. [14:24:49] [R] 150 Here comes the directory listing.
  44. [14:24:49] [R] List Complete: 2 KB in 0.02 seconds (3.0 KB/s)
  45. [14:24:56] [R] 200 Switching to ASCII mode.
  46. [14:24:56] [R] 213 1193
  47. [14:24:56] [R] 213 20171003130429
  48. [14:24:56] [R] 227 Entering Passive Mode (192,168,9,31,119,162).
  49. [14:24:56] [R] Opening data connection IP: 192.168.9.31 PORT: 30626
  50. [14:24:56] [R] 150 Opening BINARY mode data connection for single.php (1193 bytes).
  51. [14:24:56] Download: single.php 1 KB in 0 seconds (1.2 KB/s)
  52. [14:24:56] Transferred 1 File (1 KB) in 0.02 seconds (1.2 KB/s)
  53. [14:24:59] [R] 350 Ready for RNTO.
  54. [14:24:59] [R] 250 Rename successful.
  55. [14:25:00] [R] 550 Could not get file size.
  56. [14:25:00] [R] 227 Entering Passive Mode (192,168,9,31,134,215).
  57. [14:25:00] [R] Opening data connection IP: 192.168.9.31 PORT: 34519
  58. [14:25:00] [R] 150 Ok to send data.
  59. [14:25:00] Upload: single.php 1 KB in 0.00 seconds (1.2 KB/s)
  60. [14:25:00] [R] MDTM 20171003130429 /wp-content/themes/uniwroc-theme/single.php
  61. [14:25:00] [R] PASV
  62. [14:25:00] [R] 227 Entering Passive Mode (192,168,9,31,92,102).
  63. [14:25:00] [R] Opening data connection IP: 192.168.9.31 PORT: 23654
  64. [14:25:00] [R] 150 Here comes the directory listing.
  65. [14:25:00] [R] List Complete: 3 KB in 0.01 seconds (3.1 KB/s)
  66. [14:25:00] Transferred 1 File (1 KB) in 0.03 seconds (1.2 KB/s)
  67. [14:25:05] [R] 213 1193
  68. [14:25:05] [R] 213 20171003130429
  69. [14:25:06] [R] 227 Entering Passive Mode (192,168,9,31,42,193).
  70. [14:25:06] [R] Opening data connection IP: 192.168.9.31 PORT: 10945
  71. [14:25:06] [R] 150 Ok to send data.
  72. [14:25:06] Upload: single.php 1 KB in 0.00 seconds (1.2 KB/s)
  73. [14:25:06] [R] MDTM 20171003122503 /wp-content/themes/uniwroc-theme/single.php
  74. [14:25:06] [R] PASV
  75. [14:25:06] [R] 227 Entering Passive Mode (192,168,9,31,39,182).
  76. [14:25:06] [R] Opening data connection IP: 192.168.9.31 PORT: 10166
  77. [14:25:06] [R] 150 Here comes the directory listing.
  78. [14:25:06] [R] List Complete: 3 KB in 0.01 seconds (3.1 KB/s)
  79. [14:25:06] Transferred 1 File (1 KB) in 2 seconds (0.8 KB/s)
  80. [14:25:12] [R] 250 Delete operation successful.
  81. [14:25:12] Deleted 1 File and 0 Folders (1 KB) in 0.01 seconds
  82. [14:25:14] [R] 350 Ready for RNTO.
  83. [14:25:14] [R] 250 Rename successful.
  84. [14:25:18] [R] 227 Entering Passive Mode (192,168,9,31,149,234).
  85. [14:25:18] [R] Opening data connection IP: 192.168.9.31 PORT: 38378
  86. [14:25:18] [R] 150 Opening BINARY mode data connection for single.php (1193 bytes).
  87. [14:25:18] Download: single.php 1 KB in 0 seconds (1.2 KB/s)
RAW Paste Data

Winsock 2.2 Download

Comments are closed.