Reading REG_RESOURCE_LIST from Registry RRS feed

  • Question

  • Hi,

    im trying to read "HARDWARE\\RESOURCEMAP\\System Resources\\Physical Memory\\.Translated", but I only get 4 Byte. I use the following Code.

    #include <windows.h>
    #include <stdio.h>
    #include <string.h>

    int main(void)
        HKEY hKey;
        HKEY hKey2;
        DWORD dwType;
        DWORD dwSize=100;
        DWORD strRamSize;
        printf("%d\n",RegOpenKeyEx(hKey,"HARDW ARE\\RESOURCEMAP\\System Resources\\Physical Memory",0,KEY_READ,&hKey2));
        printf("%d\n",RegQueryValueEx(hKey2,".Translated",NULL,& dwType,(LPSTR)&strRamSize,&dwSize));
        printf ("\n%02x",strRamSize);
        return 0;

    Hope you can help me

    Wednesday, September 7, 2005 11:18 PM

All replies