Winsock SO_EXCLUSIVEADDRUSE on Vista

I’ve been asked a couple times about the socket option SO_EXCLUSIVEADDRUSE on Vista and especially how it relates to dual stack sockets. The following doc link describes the basic idea of this socket option: http://msdn2.microsoft.com/en-us/library/ms740621.aspx However, it hasn’t been updated with any Vista specific behavior. We’re working on updating that doc but it takes a…

1

Winsock Header Weirdness

There are two main Winsock headers used depending on which version your application needs. There is winsock.h for Winsock v1.x and winsock2.h for Winsock v2.x and they are mutually exclusive. That is, if you include both header files you will see a lot of compilation errors.  As you may know, windows.h includes a lot of…

2

LSP Installation Problems with WSCInstallProvider64_32

An LSP (or Winsock provider) can be installed into the Winsock catalog through several different function calls. Also, as you might know, on 64-bit Windows there are two different Winsock catalogs – one for 32-bit applications and one for 64-bit native applications. In order for an LSP to be loaded by both native and WOW64…

1

WSAPoll, A new Winsock API to simplify porting poll() applications to Winsock.

Hello, my name is Chad Carlin. I’m a software developer on the Winsock Test Team. Among the many improvements to the Winsock API shipping in Vista is the new WSAPoll function. Its primary purpose is to simplify the porting of a sockets application that currently uses poll() by providing an identical facility in Winsock for…

10

Creating IP Agnostic Applications – Part 2 (Dual Mode Sockets)

In a previous post I wrote about how on Windows Vista and Windows Server “Longhorn,” IPv6 is installed and enabled by default and that when both IPv4 and IPv6 are enabled, the TCP/IP stack prefers to use IPv6 over IPv4.  With the growth of IPv6, applications must now work seamlessly over both protocols (IPv4 & IPv6).  The…

19

Debugging Winsock LSPs

Several people have asked for tips on debugging LSPs, and unfortunately there’s no easy method to do so.  One difficulty with LSPs is that once it’s installed any number of processes can immediately load the faulty LSP and begin to behave badly. This usually isn’t fatal unless one of those processes happens to be WINLOGON.EXE,…

3

Creating IP Agnostic Applications – Part 1

In Windows Vista and Windows Server “Longhorn,” IPv6 is installed and enabled by default.  When both IPv4 and IPv6 are enabled on these OSs, the TCP/IP stack prefers to use IPv6 over IPv4.  For example, APIs such as ConnectByName will attempt to connect first via IPv6.  See this post for a detailed discussion of address sorting….

5

WSAConnectByName() and WSAConnectByList()

G’Day, my name is Brad Williamson, a Software Design Engineer with the Windows Networking Developer Platform (WNDP) group here at Microsoft. I am going to talk about two APIs that were introduced in Windows Vista Beta 2 to simplify the process of connecting to another connection-oriented socket application. By far, one of the most common…

7

The (new) Trouble with select and LSPs…

If you’ve ever had to deal with Winsock LSPs, then you probably know that handling select function calls are rather convoluted – especially with certain apps that pass multiple socket types into select. Some applications (like IE) will pass a UDP/IPv4 and a TCP/IPv4 socket in a single select call. This works fine unless you…

0