Debug Tracing Winsock 2 SPI Functions

Winsock 2 can trace API and SPI calls invoked from Ws2_32.dll. This is extremely useful during the development phase of a transport or name space service provider. In the MSDN platform SDK, two examples, Dt_dll and Dt_dll2, are designed to trace SPI calls as they are processed on a system. The beauty of these examples is that you can modify them to trace whichever API and SPI calls you're interested in.

To use this debugging feature, you must first obtain the checked build of Winsock 2's Ws2_32.dll for your target platform. This can be found in the MSDN platform SDK under Mssdk\Bin\Debug\Winsock. Once you have the checked build, you can either copy it over the system's Ws2_32.dll under %SystemRoot%\System32 or place it in the working directory of your Winsock application. Placing the checked build in your working directory is the best choice because you won't have to modify your system for debugging purposes. After the checked build is installed, you must compile and build one of the MSDN Dt_dll samples. After compilation, you will receive a support DLL named Dt_dll.dll. You should then copy Dt_dll.dll to the working directory of your Winsock application. Once everything is in place, you can begin tracing the Winsock 2 API and SPI functions that are indirectly called from your application.



Network Programming for Microsoft Windows
Linux Server Hacks, Volume Two: Tips & Tools for Connecting, Monitoring, and Troubleshooting
ISBN: 735615799
EAN: 2147483647
Year: 1998
Pages: 159

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net