When im try to write a RegEdit Key, he only writes only the first 4 Charaters of the file path.
HKEY hKey;
RegOpenKeyEx(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Run", 0, KEY_SET_VALUE, &hKey);
RegSetValueEx(hKey, "Test", 0, REG_SZ, (BYTE*)file, sizeof(file));
RegCloseKey(hKey);