WSOCK32.DLL vs WS2_32.DLL

WSOCK32.DLL vs WS2_32.DLL

Post by Mark Yan » Thu, 25 Sep 1997 04:00:00



Hi there,

  I am writing a 32-bit networking program which should run in WIN NT and

95.

I am confused whether I should call WSOCK32.DLL (32-bit winsock 1 APIs) or

WS2_32.DLL (32-bit winsock 2 APIs). I know that 95 has no build-in

WS2_32.DLL

and we have to install it manually. Besides WSAEnumProtocols of WS2_32.DLL

seems NOT work in 95. Any body can tell which one is suitable for my

program?

And is there any good books for programming NT/95 networks?

  Thanks.

Moore

 
 
 

WSOCK32.DLL vs WS2_32.DLL

Post by Alun Jon » Thu, 25 Sep 1997 04:00:00



Quote:>  I am writing a 32-bit networking program which should run in WIN NT and
>95.

>I am confused whether I should call WSOCK32.DLL (32-bit winsock 1 APIs) or
>WS2_32.DLL (32-bit winsock 2 APIs). I know that 95 has no build-in
>WS2_32.DLL
>and we have to install it manually. Besides WSAEnumProtocols of WS2_32.DLL
>seems NOT work in 95. Any body can tell which one is suitable for my
>program?

>And is there any good books for programming NT/95 networks?

Why not do both?  Try and do a LoadLibrary on WS2_32.DLL - if it
succeeds, then you can use the Winsock 2.0 function calls (when they
work), and if it fails, simply do another LoadLibrary, but on
WSOCK32.DLL instead.  Then use the Winsock 1.1 function calls.  Note
that you can LoadLibrary on WS2_32.DLL and use Winsock 1.1 function
calls, so if all you're using is WS1.1, you will still benefit from
having both LoadLibrary calls in there.

A couple of provisos for tech support:

A dialog box that says "The parameter entry point QueueUserAPC could not
be located in the dynamic link library KERNEL32.dll" means that someone
copied NT 4.0's WS2_32.DLL onto Windows NT 3.51 - a platform that
will _never_ have Winsock 2.0 installed (at least with current plans).

An error return from a call to the socket() function that has the code
"WSAESOCKTNOSUPPORT" returned from WSAGetLastError indicates that the
Windows 95 WS2_32.DLL has been copied into a Windows 95 system, but the
supporting parts of the Winsock 2.0 package have not.

Note that VXtreme's 2.2 Web Theater Client (acknowledged in only one
place on their web site as a beta version, and in others as the "New
Release") has been pulling just such a stupid stunt in its installs
since it was released in the beginning of July.  I don't feel bad about
telling on them, because I informed them of this problem within days of
the beta's release, was told that it would be fixed, and yet I still
have to support a problem of their making, which they refuse to fix or
document.

Alun.
~~~~

---
Texas Imperial Software     |   Try WFTPD, the Windows FTP Server.
1602 Harvest Moon Place     |   Available at the web site
Cedar Park TX 78613         |   http://www.wftpd.com

Phone +1 (512) 257 2578     |   Now accepting credit card orders!
===================================================================
***** WFTPD Pro, an NT Service FTP Server supporting multiple *****
** simultaneous virtual hosts, is now available for $80 per copy **

 
 
 

1. Socket Number Limitations for ws2_32.dll or wsock32.dll

Hello,

I understand how to set the FD_SETSIZE to increase the number of sockets per
process from 64.  I am trying to find information out on what the limits are
for the number of sockets supported by the Windows Sockets service provider
as implemented in ws2_32.dll and / or wsock32.dll.

I would appreciate any links or information concerning this issue.

James Harris
American Computer Technologies

(407) 8751188 x202

Excerpt from Platform SDK:

////////////////////////////////////////////////////////////////////////////
/////////////////////
The maximum number of sockets supported by a particular Windows Sockets
service provider is implementation specific. An application should make no
assumptions about the availability of a certain number of sockets. For more
information on this topic see WSAStartup.

The maximum number of sockets that an application can actually use is
independent of the number of sockets supported by a particular
implementation. The maximum number of sockets that a Windows Sockets
application can use is determined at compile time by the manifest constant
FD_SETSIZE. This value is used in constructing the FD_SET structures used in
select. The default value in Winsock2.h is 64. If an application is designed
to be capable of working with more than 64 sockets, the implementer should
define the manifest FD_SETSIZE in every source file before including
Winsock2.h. One way of doing this may be to include the definition within
the compiler options in the makefile. For example, you could add
"-DFD_SETSIZE=128" as an option to the compiler command line for Microsoft
C. It must be emphasized that defining FD_SETSIZE as a particular value has
no effect on the actual number of sockets provided by a Windows Sockets
service provider.
////////////////////////////////////////////////////////////////////////////
/////////////////////

2. Null fields in the user information section

3. How to distribute Winsock2 DLL WS2_32.DLL for Win95 (and upgrade for 98, NT)

4. Peer to peer cannot see any other computers

5. ws2_32.dll release vs Debug

6. Paging a DataList

7. Problem with WS2_32.DLL and NTDLL.DLL

8. inverted backlight for V/Vx?

9. how replace Winsock.dll with Wsock32.dll

10. Writing a pass-through shell dll to replace wsock32.dll

11. HOW replace Winsock.dll with Wsock32.dll?

12. winsock.dll & wsock32.dll current version #'s and location

13. WSACancelBlockingCall() in 95's wsock32.dll vs. NT 4.0