vc6에서 strcpy_s 에러 해결

vc6(Visual Studio C++ 6.0)


//=========================================================
#if _MSC_VER < 1200 //vc6이하에서만 strcpy_s 관련 에러를 없애기 위해
#ifdef _UNICODE
//#define strcpy_s(dest, size, src)    strcpy(dest, src)// ->StringCchCopyA


#include <Strsafe.h>
#define strcpy_s    StringCchCopyA    //StringCchCopy
#define    sprintf_s        StringCchPrintfA //StringCchPrintf

#endif

#define    _tcscpy_s    StringCchCopy
#endif
//=========================================================


반응형
Posted by codens