I thought I knew this but I don't.

Currently I use RegCreateKeyEx to create a key, and then I call RegSetValueEx.

Now what happens is that I create another key (folder in the regedit GUI), and I set the default value for that key (folder).

But how do I add a simple string value (not a sub folder) to that key?

Very roughly I do

RegCreateKeyEx (hKey,
                0,    // ulOptions, must be 0
                NULL, // address of class string
                REG_OPTION_NON_VOLATILE, // special options flag
                KEY_ALL_ACCESS,        // desired security access
                NULL, // address of key security structure
                &hSubKey,          // address of buffer for opened 
                &ActionDone) ;


RegSetValueEx (hSubKey,
               0,  // reserved
               (const BYTE*)pszData,  // address of value data

...hope its clear....

Owen F. Ransen
Easy to use graphics effects: