Do you mean to refer a single value? Now it looks like you're trying to get a key value from a whole node. Should the path be something like:
#define REGDB_SYS_ENV "SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment\\OS"
or whatever key you're trying to use.