Debug and Trace Facilities

Windows Sockets 2 application developers need to isolate bugs in 1) the application, 2) the WS2_32.DLL or one of the compatibility "shim" DLLs, or 3) the service provider. Windows Sockets 2 addresses this need through a specially devised version of the WS2_32.DLL and a separate debug/trace DLL. This combination allows all procedure calls across the Windows Sockets 2 API or SPI to be monitored and, to some extent, be controlled.

Developers can use this mechanism to trace procedure calls, procedure returns, parameter values, and return values. Parameter values and return values can be altered on procedure call or procedure return. If desired, a procedure call can be prevented or redirected. With access to this level of information and control, a developer can isolate any problem in the application, WS2_32.DLL, or service provider.

The Windows Sockets 2 SDK includes the debug WS2_32.DLL, a sample debug/trace DLL, and a document containing a detailed description of the components. The sample debug/trace DLL is provided in both source and object form. Developers are free to use the source to develop versions of the debug/trace DLL that meet their specific needs.