title: How to fix my C++ program if it shows different registry value from real value?
body: <p>I have written a C++ program in Code::Blocks which reads REG_NONE type value from registry.</p>
  
  <p>Here are my codes:</p>
  
  <pre><code>#define KEY_WOW64_64KEY 0x0100
  #include "string"
  #include "windows.h"
  using namespace std;
  
  int main()
  {
      HKEY hKey;
      long longErrorCode;
      string strErrorCaption = "Hata";
      string strErrorMessage;
      string strSubKey = "Software\\DownloadManager\\Scheduler";
  
      longErrorCode = RegOpenKeyEx(HKEY_CURRENT_USER, strSubKey.c_str(), 0, KEY_ALL_ACCESS | KEY_WOW64_64KEY, &amp;hKey);
  
      if (longErrorCode != ERROR_SUCCESS)
      {
          strErrorMessage = "Anahtar açılamadı.";
  
          MessageBox(NULL, strErrorMessage.c_str(), strErrorCaption.c_str(), MB_OK | MB_ICONERROR);
  
          return 0;
      }
  
      else
      {
          DWORD dwSize = MAX_PATH;
          DWORD dwValueContent;
          DWORD dwValueType = REG_NONE;
          string strValueName = "startDay";
  
          longErrorCode = RegQueryValueEx(hKey, strValueName.c_str(), 0, &amp;dwValueType, (LPBYTE)&amp;dwValueContent, &amp;dwSize);
  
          if (longErrorCode != ERROR_SUCCESS)
          {
              RegCloseKey(hKey);
  
              strErrorMessage = "Değer açılamadı.";
  
              MessageBox(NULL, strErrorMessage.c_str(), strErrorCaption.c_str(), MB_OK | MB_ICONERROR);
  
              return 0;
          }
  
          else
          {
              string strValueContent = to_string(dwValueContent);
  
              RegCloseKey(hKey);
  
              strErrorCaption = "Başarılı!";
  
              MessageBox(NULL, strValueContent.c_str(), strErrorCaption.c_str(), MB_OK | MB_ICONINFORMATION);
  
              return 0;
          }
      }
  }
  </code></pre>
  
  <p>The real value of the registry key which I tried to read is <strong>"f5 68 4b 5c"</strong>.</p>
  
  <p>But the problem is I got <strong>"1548445941"</strong>. I also tried stringstream; but it didn't work.</p>
  
  <p>So, what should I do in order to fix this issue?</p>