几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   DirectDWG (http://www.dimcax.com/hust/forumdisplay.php?f=89)
-   -   【转帖】vs 2005 Generates Warning 4996 When Compiling Exhostappserv (http://www.dimcax.com/hust/showthread.php?t=19046)

yang686526 2009-05-07 06:38 PM

【转帖】vs 2005 Generates Warning 4996 When Compiling Exhostappserv
 
vs 2005 generates warning #4996 when compiling exhostappserv
vs 2005 generates warning #4996 when compiling exhostappservices.cpp
we have included and made slight modifications to exhostappservices.cpp in our application. we just updated to dwgdirect v. 2.1.0. when exhostappservices.cpp is compiled, the vs 2005 compiler generates warning 4996 when calling odsprintf() in exhostappservices::meterprogress(). this is occuring because odsprintf() is a typedef for _snwprintf(). _snwprintf() has been deprecated in the microsoft vs 8 crt. see the link below for possible remedies. it would be nice if odsprintf referred to the secure version of _snprintf().
_snwprintf and _snwprintf_s have different signatures, so odsprintf cannot refer to _snwprintf_s - it would break code portability.
actually, there shouldn't be 4996 warning, because _crt_secure_no_deprecate is defined in dd headers (odplatformsettings.h,38), but vc compiler seem to forget it sometimes.
vladimir


所有的时间均为北京时间。 现在的时间是 02:18 AM.