Código:
string subclave="Hello";
string valor="Anyone";
LPCTSTR _subclave = TEXT("");
LPCTSTR _valor = TEXT("");
long crear = RegSetValueEx(key, _subclave, 0, REG_SZ, (LPBYTE) _valor, strlen(_valor) * sizeof(char));
Pero me daba los siguientes errores:

Entonces hice los cambias que me pedia:
Código:
string hola="hola";
std::wstring stemp = std::wstring(hola.begin(), hola.end());
LPCWSTR subclave = stemp.c_str();
const char * valor = "hola";
long crear = RegSetValueEx(key, subclave, 0, REG_SZ, (LPBYTE) valor, strlen(valor) * sizeof(char));
Pero me escribe la regla en chino y no se como solucionarlo
