GoodMorning, I've a question about the RegCreateKey in Visual studio in windows 10. I try to create a new key registry. The code is compiled successfully, but no new key is generated. I follow some forum online without any success. Can I ask some help to solve the problems? I write here the code:
int main(){
...
HKEY hKey;
TCHAR RegValue[]=TEXT("myprogram");
BYTE ProgramPath[]="C:\\User\\Desktop\\file.bat"
RegCreateKey(HKEY_LOCAL_MACHINE, TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Run"),&hKey);
RegCloseKey(hKey);
...}
or maybe do someone has already a c++ code to suggest me?
thank really much
Best Regards
Thank you very very much for the answer. I tried to use that function but I have some problems to understand with parameter use. Maybe, if I'm not impolite, can I ask you if you have an example where you use that function?
thank you really much
Best regards
Hi
It seems to me you're mixing unicode and multibyte strings.
Please tell us if you compile for unicode or multibyte
thank you really much...I solved the problem imposing multibyte :)
thank you really much
Best regards