把这个字符串赋给CString
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\aaaaaa\Parameters" /v ServiceDll /t REG_EXPAND_SZ /d "C:\Windows\system32\aaaaaa.dll" /f这样就错误了
CString str = "reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\aaaaaa\Parameters" /v ServiceDll /t REG_EXPAND_SZ /d "C:\Windows\system32\aaaaaa.dll" /f
";请问如何解决
谢谢了

解决方案 »

  1.   

    CString str = "reg add \"HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\services\\aaaaaa\\Parameters\" \/v ServiceDll \/t REG_EXPAND_SZ \/d \"C:\\Windows\\system32\\aaaaaa.dll\" \/f
      

  2.   

    CString str = "reg add \"HKEY_LOCAL_MACHINE\SYSTEM\\CurrentControlSet\\services\\aaaaaa\\Parameters\" /v ServiceDll /t REG_EXPAND_SZ /d \"C:\\Windows\\system32\\aaaaaa.dll\" /f"
      

  3.   

    CString str(_T("reg add \"HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\services\\aaaaaa\\Parameters\" /v ServiceDll /t REG_EXPAND_SZ /d \"C:\\Windows\\system32\\aaaaaa.dll\" /f"));
      

  4.   

    CString str = "reg add \"HKEY_LOCAL_MACHINE\SYSTEM\\CurrentControlSet\\services\\aaaaaa\\Parameters\" /v ServiceDll /t REG_EXPAND_SZ /d \"C:\\Windows\\system32\\aaaaaa.dll\" /f"
     
    或者Format
      

  5.   

    晕啊,直接在vs的ide界面写,有错误显示,直接就可以改对吧