/*++
Copyright (c) 1999 Microsoft Corporation
Module Name:
perfmon5.c
Abstract:
Program to adapt the command line Perfmon from NT4 and prior
to the MMC & NT5 compatible format
Author:
Bob Watson (bobw) 11 may 99
Revision History:
--*/
#define _OUTPUT_HTML 1
//#define _DBG_MSG_PRINT 1
#define _USE_MMC 1
#define MAXSTR 1024
#define MAX_ARG_STR 2048
#include "perfmon5.h"
#include "strsafe.h"
#define MemAlloc(s) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, s)
#define MemReAlloc(h,s) HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, h, s)
#define MemFree(h) if (h != NULL) { HeapFree(GetProcessHeap(), 0, h); }
#define MemSize(h) ((h != NULL) ? HeapSize(GetPRocessHeap(), 0, h) : 0)
// static & global variables
#ifdef _USE_MMC
LPCWSTR szMmcExeCmd = (LPCWSTR) L"%windir%\\system32\\mmc.exe";
LPCWSTR szMmcExeArg = (LPCWSTR) L" %windir%\\system32\\perfmon.msc /s";
#else
LPCWSTR szMmcExeCmd = (LPCWSTR) L"%windir%\\explorer.exe";
LPCWSTR szMmcExeArg = (LPCWSTR) L" ";
#endif
LPCWSTR szMmcExeSetsArg = (LPCWSTR) L"/SYSMON%ws_SETTINGS \"%ws\"";
LPCWSTR szMmcExeSetsLogOpt = (LPCWSTR) L"LOG";
LPCWSTR szEmpty = (LPCWSTR)L"";
//HTML Formatting definitions
// these are not localized
LPCWSTR szHtmlHeader = (LPCWSTR) L"\
\r\n\
\r\n\
\r\n\
\r\n\
\r\n";
LPCWSTR szObjectHeader = (LPCWSTR) L"\