How to Turn on Debug Logging of the LDAP Client (Wldap32.dll) (325616)



The information in this article applies to:

  • Microsoft Windows 2000 Professional

This article was previously published under Q325616

SUMMARY

This article describes how to turn on debug logging of the LDAP client (Wldap32.dll).

MORE INFORMATION

To help you to troubleshoot issue, it may be useful to turn on debug logging of the LDAP client. To turn on debug logging of the LDAP client:
  1. Obtain and install the checked (debug) build of the Wldap32.dll file.
  2. Start the program that you want to troubleshoot. Note that it must load or use the Wldap32.dll file.
  3. Attach a debugger to the process that you started in step 2.
  4. Edit the global "LdapDebug" variable by Oring one or more of the following values, and then "go" the program:

    #define DEBUG_TRACE1              0x00000001
    #define DEBUG_TRACE2              0x00000002
    #define DEBUG_REFCNT              0x00000004
    #define DEBUG_HEAP                0x00000008
    
    #define DEBUG_CACHE               0x00000010
    #define DEBUG_SSL                 0x00000020
    #define DEBUG_SPEWSEARCH          0x00000040
    #define DEBUG_SERVERDOWN          0x00000080
    
    #define DEBUG_CONNECT             0x00000100
    #define DEBUG_RECONNECT           0x00000200
    #define DEBUG_RECEIVEDATA         0x00000400
    #define DEBUG_PING                0x00000800
    
    #define DEBUG_EOM                 0x00001000
    #define DEBUG_BER                 0x00002000
    #define DEBUG_OUTMEMORY           0x00004000
    #define DEBUG_CONTROLS            0x00008000
    
    #define DEBUG_HANDLES             0x00010000
    #define DEBUG_CLDAP               0x00020000
    #define DEBUG_FILTER              0x00040000
    #define DEBUG_BIND                0x00080000
    
    #define DEBUG_NETWORK_ERRORS      0x00100000
    #define DEBUG_SCRATCH             0x00200000
    #define DEBUG_PARSE               0x00400000
    #define DEBUG_REFERRALS           0x00800000
    
    #define DEBUG_SEARCH              0x01000000
    #define DEBUG_REQUEST             0x02000000
    #define DEBUG_CONNECTION          0x04000000
    #define DEBUG_INIT_TERM           0x08000000
    
    #define DEBUG_API_ERRORS          0x10000000
    #define DEBUG_STOP_ON_ERRORS      0x20000000 /* If set, stop on internal errors */ 
    #define DEBUG_ERRORS2             0x40000000
    #define DEBUG_ERRORS              0x80000000
    							

    Note that if you turn on DEBUG_HEAP, a large performance reduction occurs.

Modification Type:MinorLast Reviewed:10/13/2004
Keywords:kbenv kbhowto KB325616