scooter1
asked on
Registry
What's wrong with this:
CString newpass = "Hello";
char var2[20];
strcpy(var2, (LPCSTR)newpass); // copies the string
HKEY MyKey;
DWORD dwcbData = sizeof(var2);
RegOpenKeyEx(HKEY_LOCAL_MA CHINE,"Sof tware\\Win M",0,KEY_A LL_ACCESS, &MyKey);
RegSetValueEx(MyKey, "WinM", 0, REG_SZ, (LPBYTE)&var2, dwcbData);
RegSaveKey(MyKey, "WinM", NULL);
RegCloseKey(MyKey);
CString newpass = "Hello";
char var2[20];
strcpy(var2, (LPCSTR)newpass); // copies the string
HKEY MyKey;
DWORD dwcbData = sizeof(var2);
RegOpenKeyEx(HKEY_LOCAL_MA
RegSetValueEx(MyKey, "WinM", 0, REG_SZ, (LPBYTE)&var2, dwcbData);
RegSaveKey(MyKey, "WinM", NULL);
RegCloseKey(MyKey);
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER