信息量太少.
s是在dll里,还是app里?
app是否包含其他的dll?

解决方案 »

  1.   

    在app里。
    其实我描述的是个简化的错误。
    程序一个是ado数据库程序。没有多余的DLL。
      

  2.   

    干吗要用 _T转换呢,直接赋值就行了。CString s;
    s = "离开家";
      

  3.   

    编译选项选择多字节编译,内置支持字符选择char类型(非wchar_t),试一试
      

  4.   

    Modifying CString Contents Directly
    In most situations, you should use CString member functions to modify the contents of a CString object or to convert the CString to a C-style character string.However, there are certain situations, such as working with operating-system functions that require a character buffer, where it is advantageous to directly modify the CString contents.The GetBuffer and ReleaseBuffer member functions allow you to gain access to the internal character buffer of a CString object and modify it directly. The following steps show how to use these functions for this purpose: Call GetBuffer for a CString object and specify the length of the buffer you require.Use the pointer returned by GetBuffer to write characters directly into the CString object.Call ReleaseBuffer for the CString object to update all the internal CString state information, such as the length of the string. After modifying a CString object's contents directly, you must call ReleaseBuffer before calling any other CString member functions.
    看看这个对你有帮助吗?
      

  5.   

    换个地方试试,不要放在app里面