#include <iostream> //Basic (cin, cout) #include <string> //Basic (string.length(), etc..) #include <clocale> #include <windows.h> #include <stdio.h> using namespace std; void clear(); int i1, i2; DWORD dwQuotaAllowed, dwQuotaUsed; GetSystemRegistryQuota(dwQuotaAllowed, i1); GetSystemRegistryQuota(dwQuotaUsed, i2); int main(int argc, char * argv[]) { /* printf( "Quota allowed: %uK, Quota used: %uK\n", dwQuotaAllowed/1024, dwQuotaUsed / 1024 ); */ cout << "Locale Drive: " << setlocale(LC_ALL,NULL) << endl << endl; cout << "Total Allowable Registry Size: " << i1 << endl; cout << "Current Registry Size: " << i2 << endl; string sXit; int iXit = 1; char z; bool x = false; sXit.clear(); do { sXit.clear(); cout << "Exit? (y/n): "; getline(cin, sXit); if ((sXit == "") || (sXit == " ")) { iXit = 1; //Default Exit = "y" if blank space or Enter key x = false; break; } z = sXit.at(0); switch (z) //User can answer yes or no ("y" or "n") { case 'y': iXit = 1; x = false; break; case 'n': iXit = 0; x = false; break; default: x = true; } } while(x); return 0; }
main
GetSystemRegistryQuota()
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)