Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

62 lines
1.6 KiB

/*
**------------------------------------------------------------------------------
** Module: Disk Space Cleanup Property Sheets
** File: midebug.cpp
**
** Purpose: Defines the CleanupMgrInfo class for the property tab
** Notes:
** Mod Log: Created by Jason Cobb (2/97)
**
** Copyright (c)1997 Microsoft Corporation, All Rights Reserved
**------------------------------------------------------------------------------
*/
/*
**------------------------------------------------------------------------------
** Project include files
**------------------------------------------------------------------------------
*/
#include "common.h"
#include <stdio.h>
#include <string.h>
#ifdef DEBUG
// Patch this to TRUE to see spew
BOOL g_fSpew = FALSE;
void
DebugPrint(
HRESULT hr,
LPCTSTR lpFormat,
...
)
{
if (!g_fSpew) return;
va_list marker;
TCHAR MessageBuffer[512];
void *pMsgBuf;
va_start(marker, lpFormat);
StringCchVPrintf(MessageBuffer, ARRAYSIZE(MessageBuffer), lpFormat, marker);
va_end(marker);
if (hr != 0)
{
FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
NULL, hr, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR)&pMsgBuf,
0, NULL);
StringCchPrintf(MessageBuffer, ARRAYSIZE(MessageBuffer), TEXT("%s %X (%s)"), MessageBuffer, hr, (LPTSTR)pMsgBuf);
LocalFree(pMsgBuf);
}
OutputDebugString(TEXT("DATACLEN: "));
OutputDebugString(MessageBuffer);
OutputDebugString(TEXT("\r\n"));
}
#endif //DEBUG