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.

25 lines
673 B

  1. #include "stdafx.h"
  2. INT g_iDebugOutputLevel = 0;
  3. #ifdef DEBUG_FLAG
  4. void GetOutputDebugFlag(void)
  5. {
  6. DWORD rc, err, size, type;
  7. HKEY hkey;
  8. err = RegOpenKey(HKEY_LOCAL_MACHINE, _T("SOFTWARE\\Microsoft\\InetMgr"), &hkey);
  9. if (err != ERROR_SUCCESS) {return;}
  10. size = sizeof(DWORD);
  11. err = RegQueryValueEx(hkey,_T("OutputDebugFlag"),0,&type,(LPBYTE)&rc,&size);
  12. if (err != ERROR_SUCCESS || type != REG_DWORD) {rc = 0;}
  13. RegCloseKey(hkey);
  14. if (rc < 0xffffffff)
  15. {
  16. g_iDebugOutputLevel = rc;
  17. }
  18. return;
  19. }
  20. #else
  21. void GetOutputDebugFlag(void){}
  22. #endif