Leaked source code of windows server 2003
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.

114 lines
4.5 KiB

  1. DIRECTPLAY� 8 LOGGING UTILITY (DP8LOG.EXE)
  2. Like many parts of DirectX, the debug version of DirectPlay 8 sends
  3. debugging messages meant to aid you in development to a debug program.
  4. DirectPlay is also able to send this debugging information to a region
  5. of shared memory. The purpose of the dp8log.exe utility is to read and
  6. display the contents of that region of memory. This allows you to obtain
  7. the debug information on machines that do not have a debugger and also
  8. gives you a convenient way to save the debugging information to a file
  9. by redirecting the output from dp8log.exe to a file.
  10. To display the contents of shared memory simply run dp8log.exe from the
  11. command prompt. The contents of the shared memory will be output to the
  12. standard output device (the screen). If you want to save the debug
  13. output to a file, simply redirect standard output to a file. For example,
  14. the command:
  15. dp8log > debug.txt
  16. Will save the debug output in a file called debug.txt in the current
  17. directory.
  18. Note that the shared memory region only exists while a DirectPlay 8
  19. application is running and has loaded one or more of the DirectPlay 8
  20. dlls. When all DirectPlay applications exit or unload the DirectPlay 8
  21. dlls, the shared memory region is deallocated. This means that you can
  22. only get output from dp8log.exe while one or more of the DirectPlay 8
  23. dlls are loaded (i.e. the application using DirectPlay 8 is running).
  24. Also note that all DirectPlay 8 applications share the same area of
  25. shared memory. This means that the debug output will contain output
  26. from all processes using DirectPlay 8.
  27. You can change the behavior of the DirectPlay 8 debug output by adding
  28. entries to win.ini in the windows directory.
  29. DirectPlay 8 looks for the [DirectPlay8] section in win.ini, and it
  30. recognizes the following attributes:
  31. debug=x
  32. log=x
  33. debug.<component>=x
  34. log.<component>=x
  35. verbose=x
  36. These attributes are described below:
  37. debug - determines how much information is sent to the debug log, 0 is
  38. the least amount (critical errors only), 9 is the most (practically
  39. everything that DirectPlay does). Note that setting "debug" to a high
  40. level takes a fair amount of CPU time and will lower the performance
  41. of your application.
  42. DirectPlay is subdivided into a number of components. It is possible to
  43. control the debug level of individual components. The following
  44. compoenents are available:
  45. core - session layer protocol (e.g. player and group management)
  46. addr - DirectPlay addressing (i.e. IDirectPlay8Address)
  47. lobby - lobby client and lobbied application
  48. protocol - transport protocol (i.e. retries, acks, etc.)
  49. voice - DirectPlay Voice
  50. dpnsvr - the enumeration server/redirector (dpnsvr.exe)
  51. wsock - winsock (IP/IPX) service provider
  52. modem - serial and modem service provider
  53. shared - shared untility functions in DirectPlay
  54. The "debug" setting sets the default debug level. You can override this
  55. with specific component levels, e.g.
  56. debug=1 ; sets the default level to 1
  57. debug.voice=5 ; set voice related debug level to 5
  58. debug.wsock=0 ; set the winsock service provider debug level to 0
  59. The "log" attribute determines where the debug information is sent.
  60. The following values are valid:
  61. log=0 ; send no debug information
  62. log=1 ; send debug info to debug console (i.e vc++ debug window)
  63. log=2 ; send debug info to shared memory
  64. log=3 ; send debug info to both console and shared memory
  65. As with the "debug" attribute, you can specify components for the
  66. log attribute. For example:
  67. log=1 ; default to sending debug information to the debug console
  68. log.voice=3 ; send voice debug information to console and memory
  69. log.wsock=0 ; send winsock service provider debug information to nowhere
  70. The "verbose" attribute determines how much information is contained
  71. in each debug message. There are two verbosity levels, "0" and "1".
  72. "0" is the default. Example:
  73. verbose=1 ; sent the verbosity level to 1
  74. Experiment with the different verbosity levels and decide which one
  75. serves your purposes best.
  76. Here is a complete example win.ini section:
  77. [DirectPlay8]
  78. debug=1 ; set the default debug level to 1
  79. debug.core=5 ; set the core debug level to 5
  80. log=1 ; default to sending debug output to console only
  81. log.core=3 ; send the core debug output to both console and memory
  82. verbose=1 ; use verbosity level 1
  83. If no [DirectPlay8] section is found in win.ini, DirectPlay defaults
  84. to the following settings:
  85. [DirectPlay8]
  86. log=1
  87. debug=0
  88. Therefore you will always see critical errors in the debug console.