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.

65 lines
907 B

  1. /*
  2. * LCReg.cpp
  3. *
  4. * Author: BreenH
  5. *
  6. * Registry constants and functions for the licensing core.
  7. */
  8. /*
  9. * Includes
  10. */
  11. #include "precomp.h"
  12. #include "lcreg.h"
  13. /*
  14. * Constants
  15. */
  16. #define LCREG_BASEKEY L"System\\CurrentControlSet\\Control\\Terminal Server\\Licensing Core"
  17. /*
  18. * Globals
  19. */
  20. HKEY g_hBaseKey;
  21. /*
  22. * Function Implementations
  23. */
  24. HKEY
  25. GetBaseKey(
  26. )
  27. {
  28. return(g_hBaseKey);
  29. }
  30. NTSTATUS
  31. RegistryInitialize(
  32. )
  33. {
  34. DWORD dwStatus;
  35. NTSTATUS Status = STATUS_UNSUCCESSFUL;
  36. dwStatus = RegCreateKeyEx(
  37. HKEY_LOCAL_MACHINE,
  38. LCREG_BASEKEY,
  39. 0,
  40. NULL,
  41. REG_OPTION_NON_VOLATILE,
  42. KEY_ALL_ACCESS,
  43. NULL,
  44. &g_hBaseKey,
  45. NULL
  46. );
  47. if (dwStatus == ERROR_SUCCESS)
  48. {
  49. Status = STATUS_SUCCESS;
  50. }
  51. return(Status);
  52. }