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.

29 lines
696 B

  1. #include "stdafx.h"
  2. #include "common.h"
  3. #include "iisdebug.h"
  4. #ifdef _DEBUG
  5. #undef THIS_FILE
  6. static char BASED_CODE THIS_FILE[] = __FILE__;
  7. #endif
  8. #define new DEBUG_NEW
  9. INT g_iDebugOutputLevel = 0;
  10. void GetOutputDebugFlag(void)
  11. {
  12. DWORD rc, err, size, type;
  13. HKEY hkey;
  14. err = RegOpenKey(HKEY_LOCAL_MACHINE, _T("SOFTWARE\\Microsoft\\InetMgr"), &hkey);
  15. if (err != ERROR_SUCCESS) {return;}
  16. size = sizeof(DWORD);
  17. err = RegQueryValueEx(hkey,_T("OutputDebugFlag"),0,&type,(LPBYTE)&rc,&size);
  18. if (err != ERROR_SUCCESS || type != REG_DWORD) {rc = 0;}
  19. RegCloseKey(hkey);
  20. if (rc < 0xffffffff)
  21. {
  22. g_iDebugOutputLevel = rc;
  23. }
  24. return;
  25. }