Windows NT 4.0 source code leak
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

93 lines
1.1 KiB

4 years ago
  1. /*++
  2. Copyright (c) 1992 Microsoft Corporation
  3. Module Name:
  4. conn.c
  5. Abstract:
  6. Implements the conn command.
  7. Author:
  8. Keith Moore (keithmo) 19-Apr-1995
  9. Environment:
  10. User Mode.
  11. Revision History:
  12. --*/
  13. #include "afdkdp.h"
  14. #pragma hdrstop
  15. //
  16. // Public functions.
  17. //
  18. DECLARE_API( conn )
  19. /*++
  20. Routine Description:
  21. Dumps the AFD_CONNECTION structure at the specified address.
  22. Arguments:
  23. None.
  24. Return Value:
  25. None.
  26. --*/
  27. {
  28. DWORD address = 0;
  29. ULONG result;
  30. AFD_CONNECTION connection;
  31. //
  32. // Snag the address from the command line.
  33. //
  34. sscanf( args, "%lx", &address );
  35. if( address == 0 ) {
  36. dprintf( "use: conn address\n" );
  37. return;
  38. }
  39. if( !ReadMemory(
  40. address,
  41. &connection,
  42. sizeof(connection),
  43. &result
  44. ) ) {
  45. dprintf(
  46. "conn: cannot read AFD_CONNECTION @ %08lx\n",
  47. address
  48. );
  49. return;
  50. }
  51. DumpAfdConnection(
  52. &connection,
  53. address
  54. );
  55. } // conn