Google
 
Web itpro-blogger.blogspot.com
水曜日, 4月 30, 2008

[VC2005]GetGmtTmとGetLocalTmでエラー

▼質問
GetGmtTmとGetLocalTmメソッドで次のエラーが出る。
「Debug Assertion Failed! Program: パスZZZZ.exe File: パス\atltime.inl Line: 999
Expression: _atl_condVal
For information on how your program can cause an assertion failure. see the Visual C++
documentation on asserts.
(Press Retry to debug the application)」

▼回答
インクルードやデファインを次の様にすれば上手く行くよ!
#pragma warning(disable: 4996)
#define _SECURE_ATL 0
#include
#include
#include
#include
#include
#define ATLTIME_INLINE inline
#include
#include
#define ATLCOMTIME_INLINE inline
#include

■参考サイト
A problem with ATL::CTime.GetLocalTm() - MSDN Forums
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=126206&SiteID=1
ワーニングを抑制する方法 - #pragma warning - VC++
http://www.ailight.jp/blog/sha256/archive/2005/05/04/6684.aspx






Comments: コメントを投稿

<< Home

This page is powered by Blogger. Isn't yours?