I have set the default value of my subkey like this:
RegWriteString(REGKEY_HKLM, "Software\\VA201XQ2C", "", DefaultWorkDir);
Then I read it with this call:
RegReadString (REGKEY_HKLM, "Software\\VA201XQ2C", "", WorkDir, MAX_PATHNAME_LEN, NULL);
The problem I have, is the function always returns me an empty string, while I can see that the value is really set to want I want with regedit.