windows-nt/Source/XPSP1/NT/shell/osshell/shcompui/debug.h
2020-09-26 16:20:57 +08:00

60 lines
1.5 KiB
C
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#ifndef __SHCOMPUI_DEBUG_H
#define __SHCOMPUI_DEBUG_H
///////////////////////////////////////////////////////////////////////////////
//
// Microsoft Windows
// Copyright (C) Microsoft Corporation, 1995.
//
// FILE: DEBUG.H
//
// DESCRIPTION:
//
// Header for debug support in SHCOMPUI.DLL.
//
//
// REVISIONS:
//
// Date Description Programmer
// ---------- --------------------------------------------------- ----------
// 09/15/95 Initial creation. brianau
//
///////////////////////////////////////////////////////////////////////////////
#ifdef ASSERT
# undef ASSERT
#endif
#if defined(DEBUG) || defined(DBG)
#include <windows.h>
#include <tchar.h>
void WINAPI AssertFailed(LPCTSTR szFile, int line);
#ifdef UNICODE
#define ASSERT(f) \
{ \
if (!(f)) { \
TCHAR szFile[MAX_PATH]; \
MultiByteToWideChar(CP_ACP,0,__FILE__,-1,szFile,MAX_PATH); \
AssertFailed(szFile, __LINE__); \
} \
}
#else
#define ASSERT(f) \
{ \
if (!(f)) \
AssertFailed((LPCTSTR)__FILE__, __LINE__); \
}
#endif
#else
#define ASSERT(f) (NULL) // No action.
#endif
void DbgOut(LPCTSTR fmt, ...);
#endif