Source code of Windows XP (NT5)
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.

66 lines
1.5 KiB

  1. /*++
  2. Copyright (c) 1989 Microsoft Corporation
  3. Module Name:
  4. process.c
  5. Abstract:
  6. This module implements debug support for ws2ifsl.sys driver.
  7. Author:
  8. Vadim Eydelman (VadimE) Dec-1996
  9. Revision History:
  10. --*/
  11. #include "precomp.h"
  12. #if DBG
  13. ULONG DbgLevel=DBG_FAILURES;
  14. VOID
  15. ReadDbgInfo (
  16. IN PUNICODE_STRING RegistryPath
  17. ) {
  18. PWSTR RegistryPathBuffer;
  19. PWSTR Parameters = L"Parameters";
  20. RTL_QUERY_REGISTRY_TABLE paramTable[3]; // table size = nr of params + 2
  21. RegistryPathBuffer = (PWSTR)ExAllocatePool(NonPagedPool,
  22. RegistryPath->Length + sizeof(WCHAR));
  23. if (RegistryPathBuffer == NULL) {
  24. return;
  25. }
  26. RtlCopyMemory (RegistryPathBuffer, RegistryPath->Buffer, RegistryPath->Length);
  27. *(PWCHAR)(((PUCHAR)RegistryPathBuffer)+RegistryPath->Length) = (WCHAR)'\0';
  28. RtlZeroMemory(&paramTable[0], sizeof(paramTable));
  29. paramTable[0].QueryRoutine = NULL;
  30. paramTable[0].Flags = RTL_QUERY_REGISTRY_SUBKEY;
  31. paramTable[0].Name = Parameters;
  32. paramTable[1].Flags = RTL_QUERY_REGISTRY_DIRECT;
  33. paramTable[1].Name = L"DbgLevel";
  34. paramTable[1].EntryContext = &DbgLevel;
  35. paramTable[1].DefaultType = REG_DWORD;
  36. paramTable[1].DefaultData = &DbgLevel;
  37. paramTable[1].DefaultLength = sizeof(ULONG);
  38. RtlQueryRegistryValues(
  39. RTL_REGISTRY_ABSOLUTE,
  40. RegistryPathBuffer,
  41. paramTable,
  42. NULL,
  43. NULL);
  44. ExFreePool(RegistryPathBuffer);
  45. }
  46. #endif