LPCTSTR,LPCSTR是什么类型的数据结构呀?ex:LPCTSTR lpszhostaddress

解决方案 »

  1.   

    字符串啊~~~LP-长指针
    C-Const
    T-Unicode/ANSI兼容
    STR-字符串
      

  2.   

    LPCSTR  指向一个以"NULL"结束的WINDOWS字符串常量的指针
    LPCTSTR  指向一个以"NULL"结束的Unicode或Windows字符串常量的指针
      

  3.   

    LPCSTR   A 32-bit pointer to a constant character string.LPSTR   A 32-bit pointer to a character string.LPCTSTR   A 32-bit pointer to a constant character string that is portable for Unicode and DBCS.LPTSTR   A 32-bit pointer to a character string that is portable for Unicode and DBCS.
      

  4.   

    呵呵,其实说白了^_^LPCSTR 就是  静态char *       静态8位Windows字符(ANSI)无终结字符串指针
     
    LPCTSTR 就是  静态wchar_t *   如果UNICODE已定义则为LPCWSTR,否则为LPCTSTR