请问void _wsplitpath(const wchar_t *path,wchar_t *drive,wchar_t *dir,wchar_t *fname,wchar_t *ext )函数中第一个参数到底是个什么类型?我查遍了msdn,用遍了我所知道的类型,可在release版本下,编译器就是通不过!!
debug版本用CString类型,后面的参数用TCHAR类型可以编译。结果也正确。
我是 UNICODE 程序,请大侠帮忙

解决方案 »

  1.   

    PCWSTR或者是LPCWSTR,一个宽字符的常量字符串,可以用MultiByteToWideChar把一个ANSI的字符串转换成PWSTR或者是LPWSTR,在强制类型转化成PCWSTR
      

  2.   

    有相关的函数处理宽字符的,下面来自MSDN
    GetTextCharset Retrieves a character-set identifier for the font that is currently selected into a specified device context. 
    GetTextCharsetInfo Retrieves information about the character set of the font that is currently selected into a specified device context. 
    IsDBCSLeadByte Determines whether a character is a lead byte. 
    IsDBCSLeadByteEx Determines whether a character is a lead byte. 
    IsTextUnicode Determines whether a buffer is likely to contain a form of Unicode text. 
    MultiByteToWideChar Maps a character string to a wide-character (Unicode) string. 
    TranslateCharsetInfo Translates based on the specified character set, code page, or font signature value. 
    WideCharToMultiByte Maps a wide-character string to a new character string. 
      

  3.   

    是宽字符撒
    可以查wchar_t type
      

  4.   

    可能是你没有在release下设置UNICODE和_UNICODE的宏
      

  5.   

    如果是char*,需要进行转换:
    MultiByteToWideChar,用该函数转为wchar
      

  6.   

    有定义_UNICODE的时候就是typedef wchar_t TCHAR
    建议看WINDOWS核心编程第二章,有详细介绍
      

  7.   

    你加个TEXT格式化一下就可以了,自动帮你转换。