[求助] MFC中写如注册表启动问题?
HKEY hKey;CString cst ="c:\1.txt" ;
RegCreateKey(HKEY_LOCAL_MACHINE,"software\\microsoft\\windows\\currentversion\\run",&hKey);
RegSetValue(hKey,NULL,REG_SZ,"c:\1.txt",strlen("c:\1.txt"));
RegSetValueEx(hKey,"cro",0,REG_EXPAND_SZ,(CONST BYTE*)&cst,strlen("c:\1.txt"));
RegCloseKey(hKey);
里面用到
RegSetValue
RegSetValueEx
这2函数都没能写入启动.
请高手帮我分析下.