home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / netds / winsock / nwlink / testlib / dperror.c < prev    next >
C/C++ Source or Header  |  1997-10-05  |  1KB  |  36 lines

  1. /****************************************************************************\
  2. *  dperror.c -- sample program demonstrating NWLink.
  3. *
  4. *       Microsoft Developer Support
  5. *       Copyright (c) 1992-1997 Microsoft Corporation
  6. *
  7. *  Demonstrates basic sockets programming with the Windows Sockets API
  8. *  using the NWLink transport.
  9. ****************************************************************************/
  10. #include <stdio.h>
  11. #include <windows.h>
  12. #include "externs.h"
  13.  
  14. /****************************************************************************
  15. *
  16. *    FUNCTION:  dos_net_perror( LPSTR p )
  17. *
  18. *    PURPOSE:   This will printf an error message to stdout showing the 
  19. *               last error for the calling process.  This should be 
  20. *               called IMMEDIATELY after a call has returned an error 
  21. *               condition.
  22. *               
  23. *    ARGUMENTS:    LPSTR    => user string to print first
  24. *
  25. *     RETURNS:   nothing
  26. *
  27. *\***************************************************************************/
  28. void dos_net_perror(LPSTR p)
  29. {
  30.     printf(dos_net_strerror(p));
  31.     printf("\n");
  32.  
  33.     return;
  34. }
  35.