怎么样出现这个错误
自由唐衡 2001-05-30 03:53:00 运行
HKEY hKey;
if(RegOpenKeyEx(HKEY_LOCAL_MACHINE,
"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run",
0, KEY_WRITE, &hKey) !=ERROR_SUCCESS)
return;
if(RegSetValueEx(hKey, "startnotepad", 0, REG_SZ, "notepad.exe", 15) !=ERROR_SUCCESS)
{
RegCloseKey(hKey);
return ;
}
RegCloseKey(hKey);
错误如下:
E:\test\Design\DesignDlg.cpp(428) : error C2664: 'RegSetValueExA' : cannot convert parameter 5 from 'char [12]' to 'const unsigned char *' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
Error executing cl.exe.