error C2065: ‘_lpa’: undeclared identifier

评价:
0
(0用户)

Dialog.cpp(1351,42): error C2065: ‘_lpa’: undeclared identifier
Dialog.cpp(1351,42): error C2065: ‘_convert’: undeclared identifier
Dialog.cpp(1351,42): error C2065: ‘_acp’: undeclared identifier

==========================================

和 A2T 函数有关。

有人说USES_CONVERSION可以解决。

#ifndef _ATL_EX_CONVERSION_MACROS_ONLY
#ifndef _DEBUG
#define USES_CONVERSION int _convert; (_convert); UINT _acp = ATL::_AtlGetConversionACP() /*CP_THREAD_ACP*/; (_acp); LPCWSTR _lpw; (_lpw); LPCSTR _lpa; (_lpa)
#else
#define USES_CONVERSION int _convert = 0; (_convert); UINT _acp = ATL::_AtlGetConversionACP() /*CP_THREAD_ACP*/; (_acp); LPCWSTR _lpw = NULL; (_lpw); LPCSTR _lpa = NULL; (_lpa)
#endif
#endif // _ATL_EX_CONVERSION_MACROS_ONLY
#ifndef _DEBUG
#define USES_CONVERSION_EX int _convert_ex; (_convert_ex); UINT _acp_ex = ATL::_AtlGetConversionACP(); (_acp_ex); LPCWSTR _lpw_ex; (_lpw_ex); LPCSTR _lpa_ex; (_lpa_ex); USES_ATL_SAFE_ALLOCA
#else
#define USES_CONVERSION_EX int _convert_ex = 0; (_convert_ex); UINT _acp_ex = ATL::_AtlGetConversionACP(); (_acp_ex); LPCWSTR _lpw_ex = NULL; (_lpw_ex); LPCSTR _lpa_ex = NULL; (_lpa_ex); USES_ATL_SAFE_ALLOCA
#endif
——————————————————————-
#define A2W(lpa) (\
((_lpa = lpa) == NULL) ? NULL : (\
_convert = (static_cast<int>(strlen(_lpa))+1),\
(INT_MAX/2<_convert)? NULL :  \
ATLA2WHELPER((LPWSTR) alloca(_convert*sizeof(WCHAR)), _lpa, _convert, _acp)))
#define W2A(lpw) (\
((_lpw = lpw) == NULL) ? NULL : (\
(_convert = (static_cast<int>(wcslen(_lpw))+1), \
(_convert>INT_MAX/2) ? NULL : \
ATLW2AHELPER((LPSTR) alloca(_convert*sizeof(WCHAR)), _lpw, _convert*sizeof(WCHAR), _acp))))
#define A2W_CP(lpa, cp) (\
((_lpa = lpa) == NULL) ? NULL : (\
_convert = (static_cast<int>(strlen(_lpa))+1),\
(INT_MAX/2<_convert)? NULL : \
ATLA2WHELPER((LPWSTR) alloca(_convert*sizeof(WCHAR)), _lpa, _convert, (cp))))
#define W2A_CP(lpw, cp) (\
((_lpw = lpw) == NULL) ? NULL : (\
(_convert = (static_cast<int>(wcslen(_lpw))+1), \
(_convert>INT_MAX/2) ? NULL : \
ATLW2AHELPER((LPSTR) alloca(_convert*sizeof(WCHAR)), _lpw, _convert*sizeof(WCHAR), (cp)))))

atlconv.h

注册并通过认证的用户才可以进行评价!

发表评论