注册表操作失败
HKEY hKey;
//找到系统的启动项
LPCTSTR lpRun = "Software\\Microsoft\\Windows\\CurrentVersion\\Run";
//打开启动项Key
long lRet = RegOpenKeyEx(HKEY_LOCAL_MACHINE, lpRun, 0, KEY_ALL_ACCESS, &hKey);
if(lRet == ERROR_SUCCESS)
{
//查询
DWORD type=REG_SZ;
DWORD Data=80;
BYTE owner_Get[80];
long ret=::RegQueryValueEx(hKey, "kxesc ",NULL,&type,owner_Get,&Data); //获取playback的键值
ret的值是2
Return value
If the function succeeds, the return value is ERROR_SUCCESS.
If the function fails, the return value is a system error code.
[解决办法]
看看返回值是多少 用getlasterror查一下
[解决办法]
ERROR_FILE_NOT_FOUND
2 (0x2)
The system cannot find the file specified.