Key Values not getting printed when im trying to access windows system registry in c -


I am trying to print the values ​​of keys in the Window System Registry, the code mentioned below. Showing only a blank screen, I think calculating and printing of every important value of the datatype in the registry. Any help would be appreciated!

  #include & lt; Windows.h & gt; # Include & lt; Stdio.h & gt; # Include & lt; Tchar.h & gt; # Include & lt; Conio.h & gt; #define MAX_KEY_LENGTH 255 # defined MAX_VALUE_NAME 16383 zero QueryKey (HKEY hKey) {TCHAR achKey [MAX_KEY_LENGTH]; // Buffer DWORD cbName for sub-name; // Name String TCHAR achClass [MAX_PATH] = TEXT (""); // buffer DWORD for class name cchClassName = MAX_PATH; // Square string DWORD cSubKeys = 0 size; // Number of subkeys DWORD cbMaxSubKey; // Longest subkey size DWORD cchMaxClass; // longest class string DWORD cValues; // Important DWORD number of values ​​for cchMaxValue; // Longest Value Name DWORD cbMaxValueData; // Longest Value Data DWORD cbSecurityDescriptor; // Security descriptor size FILETIME ftLastWriteTime; // last write DWORD I, RetCode; TCARAR AH value [MAX_VALUE_NAME]; DWORD cchValue = MAX_VALUE_NAME; RetCode = RegQueryInfoKey (hKey, // key handle achClass, buffer for // class name; & amp; cchClassName, // class string size zero, // reserve & amp; csubKeys, number of subkeys & amp; cbMaxSubKey, / / Longest subkey size & cchMaxClass, // longest class string & cValues, // the number of values ​​for this key & amp; cchMaxValue, // the longest value value & amp; cbMaxValueData, // longest value data & amp; cbSecurityDescriptor, // security descriptor & amp; ftLastWriteTime); // Write the last key // tell the key values ​​if (cValues) {printf ("\ n Number of numbers:% d \ n", cValues); For (i = 0, retcode = ERROR_SUCCESS; i  


Comments

Popular posts from this blog

winforms - C# Form - Property Change -

javascript - amcharts makechart not working -

java - Algorithm negotiation fail SSH in Jenkins -