XerxesTheMighty
Programmer
How can I read a value in the registry?
I've tried RegQueryValue and -Ex, SHGetValue, SHQueryValue, etc. All of these I looked up on MSDN and found that I'm using them right, but the compiler doesn't like it. For instance on SHGetValue, it tells me to put in the 4th slot the type of value to get (I.E. REG_SZ). But when I compile it, the error tells me something like const int to unsigned long--but according to MSDN, that isn't right. Anyway, I finally get RegQueryValue to work and compile and it doesn't store any thing to the string I assigned it. I made sure the path exists in the registry. So the question still stands:
How can I read a value from the registry and store it to a string?
--------------
"Ask a question and your a fool for three minutes, don't ask it and your a fool for a lifetime." -Chinese Proverb
Xerxes Dynatos
I've tried RegQueryValue and -Ex, SHGetValue, SHQueryValue, etc. All of these I looked up on MSDN and found that I'm using them right, but the compiler doesn't like it. For instance on SHGetValue, it tells me to put in the 4th slot the type of value to get (I.E. REG_SZ). But when I compile it, the error tells me something like const int to unsigned long--but according to MSDN, that isn't right. Anyway, I finally get RegQueryValue to work and compile and it doesn't store any thing to the string I assigned it. I made sure the path exists in the registry. So the question still stands:
How can I read a value from the registry and store it to a string?
--------------
"Ask a question and your a fool for three minutes, don't ask it and your a fool for a lifetime." -Chinese Proverb
Xerxes Dynatos