Let's make it a real function and call it reg_set_str(): ``` LONG reg_set_str( HKEY key, const char *subkey, const char *value ) { return RegSetValueExA( key, subkey, 0, REG_SZ, (const BYTE *)value, strlen(value) + 1 ); } ```
This way we get type checking on the value parameter and allow use with variable strings as well.