_T的意思

来源:互联网 发布:电话销售数据在哪里买 编辑:程序博客网 时间:2024/04/20 14:10

_T:如果编译时指定生成UNICODE版本,则将字符串转换成UNICODE;如果编译是没有指定UNICODE,则就是一般的窄字符。 

比如:

 CString str;
str.FormatMessage(
_T("Checks the security descriptor on a named object./n")
_T("/n")
_T("Usage: %1 [-?] [-at|-no_at] [-file|-regkey|-service|-kernel|-printer] [objectname]*/n")
_T("  -?        Display this help message/n")
_T("  -at       Examine the process access token (default)/n")
_T("  -no_at    Don't examine the process access token/n")
_T("  -file     objectname is the name of a file to examine (default)/n")
_T("  -regkey   objectname is the name of a registry key to examine/n")
_T("  -service  objectname is the name of a service to examine/n")
_T("  -kernel   objectname is the name of a kernel object to examine/n")
_T("            these can be semaphores, events, mutexes, waitable timers, and file mappings/n")
_T("  -printer  objectname is the name of a printer to examine/n")
_T("  objectname defaults to ////.//A:/n")
_T("Example: %1 C://boot.ini/n")
_T("/n")
_T("Note: ////.//A: is not the same as A:/n")
_T("Checking ////.//A: checks access to the floppy drive,/n")
_T("Checking A: checks access to the root directory"),
path);