Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Delphi 0.52 KB | None | 0 0
  1. if ( RegOpenKey(HKEY_CURRENT_USER, L"Software\\SAMP", &keyHandler) == ERROR_SUCCESS )
  2.     {
  3.         dwType = REG_SZ;
  4.         if ( RegQueryValueEx(keyHandler, L"gta_sa_exe", 0, &dwType, (BYTE*)buffer, &dwBufferSize) == ERROR_SUCCESS )
  5.         {
  6.             cout << "Your GTA San Andreas is located at:" << endl;
  7.             cout << buffer << endl;
  8.             system("pause");
  9.         }
  10.         else
  11.         {
  12.             cout << "Could not send a query to the registry!" << endl;
  13.             system("pause");
  14.         }
  15.     }
  16.     else
  17.     {
  18.         cout << "Unable to open the registry!" << endl;
  19.         system("pause");
  20.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement