_ATL_SECURE_NO_WARNINGS 

Suppresses compiler warnings for the use of deprecated ATL functions.


#define _ATL_SECURE_NO_WARNINGS

This code sample would cause a compiler warning if _ATL_SECURE_NO_WARNINGS were not defined.

// ATL_SECURE_NO_WARNINGS.cpp
#define _ATL_SECURE_NO_WARNINGS
#include<atlbase.h>
#include<atlsimpstr.h>

int main() {
   IAtlStringMgr *pMgr = NULL;

   CSimpleString str( "xxxxxxxxxxxxxxxxxxx", 20, pMgr );

   char* pszSrc= NULL;
   pszSrc= new char(12);
   str.CopyChars(str.GetBuffer(), pszSrc, 12);
}

Community Additions

ADD
Show: