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.

40 lines
1.1 KiB

  1. // TrialEnd.cpp : Implementation of CTrialEnd
  2. #include "stdafx.h"
  3. #include "trialoc.h"
  4. #include "TrialEnd.h"
  5. static const TCHAR cszKeyIcwRmind[] = TEXT("Software\\Microsoft\\Internet Connection Wizard\\IcwRmind");
  6. static const TCHAR cszTrialConverted[] = TEXT("TrialConverted");
  7. /////////////////////////////////////////////////////////////////////////////
  8. // CTrialEnd
  9. HRESULT CTrialEnd::OnDraw(ATL_DRAWINFO& di)
  10. {
  11. return S_OK;
  12. }
  13. STDMETHODIMP CTrialEnd::CleanupTrialReminder(BOOL * pbRetVal)
  14. {
  15. HKEY hkey;
  16. DWORD dwValue = 1;
  17. if ( RegOpenKeyEx(HKEY_LOCAL_MACHINE,
  18. cszKeyIcwRmind,
  19. 0,
  20. KEY_ALL_ACCESS,
  21. &hkey) == ERROR_SUCCESS)
  22. {
  23. RegSetValueEx(hkey,
  24. cszTrialConverted,
  25. 0,
  26. REG_DWORD,
  27. (LPBYTE) &dwValue,
  28. sizeof(DWORD));
  29. RegCloseKey(hkey);
  30. }
  31. return S_OK;
  32. }