在函数调用体内;加入
USES_CONVERSION;例如:
void func( LPSTR lpsz )
{
   USES_CONVERSION;
   ...
   LPWSTR x = A2W(lpsz)
   // Do something with x
   ...
}

解决方案 »

  1.   

    error C2065: 'USES_CONVERSION' : undeclared identifier
    谢谢
      

  2.   

    确保在stdafx.h中包含:#include <atlbase.h>
    #include <atlcom.h>
      

  3.   

    谢谢你的帮助,还有个方法:multibytetowidechar(...),
    你说以我现在的水平还要多久才能成为合格的程序员呢?
      

  4.   

    我在stdafx.h中包含了以上两个头文件,可是却报错(在atlcom.h中),其中一个错误是:error C2065: '_Module' : undeclared identifier.为什么?
      

  5.   

    sorry!
    只包含它就可以了:
    #include <atlbase.h>