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.
|
|
/*
**------------------------------------------------------------------------------ ** Module: Disk Cleanup Applet ** File: dmgrinfo.c ** ** 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, LPCSTR lpFormat, ... ) { if (!g_fSpew) return;
va_list marker; CHAR MessageBuffer[512]; void *pMsgBuf = NULL; va_start(marker, lpFormat); StringCchVPrintfA(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); StringCchPrintfA(MessageBuffer, ARRAYSIZE(MessageBuffer), "%s %X (%s)", MessageBuffer, hr, (LPTSTR)pMsgBuf); } OutputDebugStringA("CLEANMGR: "); OutputDebugStringA(MessageBuffer); OutputDebugStringA("\r\n");
#ifdef MESSAGEBOX
MessageBoxA(NULL, MessageBuffer, "CLEANMGR DEBUG MESSAGE", MB_OK); #endif
LocalFree(pMsgBuf); }
#endif //DEBUG
|