diff --git a/CleanUp.Bat b/CleanUp.Bat new file mode 100644 index 0000000..cf03229 --- /dev/null +++ b/CleanUp.Bat @@ -0,0 +1,30 @@ +@Echo Off + +attrib -s -h -r + +Del *.Ncb +Del *.Opt +Del *.Plg +Del *.Aps +Del *.Scc +Del *.suo +Del *.xml +Del *.old +Del *.user +Del *.sdf + +rd IPCH /S /Q + +attrib -s -h -r + +rd "Optimized Debug" /S /Q +rd "Release" /S /Q +rd "Debug" /S /Q +rd "Win32" /S /Q +rd "x64" /S /Q + +RD "Setup\Output" /S /Q + +Del Resources\*.aps + +Cls diff --git a/Dialogs/ConfigDlg.Cpp b/Dialogs/ConfigDlg.Cpp new file mode 100644 index 0000000..7a64660 --- /dev/null +++ b/Dialogs/ConfigDlg.Cpp @@ -0,0 +1,411 @@ +#ifndef _ConfigDlg_CPP +#define _ConfigDlg_CPP +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +#include +#include +#include + +#include "../Resources/Resource.H" + +#include "../../@Libraries//NSWFL/NSWFL.H" +#include "../../@Libraries//CMathParser/CMathParser.H" +#include "../../@Libraries//CStringBuilder/CStringBuilder.H" + +#include "../Source/Entry.H" +#include "../Source/Routines.H" + +#include "../Dialogs/ConfigDlg.H" +#include "../Dialogs/MainDlg.H" +#include "../Dialogs/NetLogoDlg.H" + +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +using namespace NSWFL::Windows; +using namespace NSWFL::File; +using namespace NSWFL::Registry; + +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +//---------------------(Variable Declarations) +HWND hConfigDialog = NULL; + +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +bool PopDiskInformation(HWND hDiskDrive) +{ + int iPos = 65; //Drive A + int iDriveType = 0; + char sDrive[5]; + char sText[1024]; + + while(iPos <= 90) + { + sprintf_s(sDrive, sizeof(sDrive), "%c:\\", iPos); + + if((iDriveType = GetDriveType(sDrive)) != DRIVE_NO_ROOT_DIR) + { + sprintf_s(sText, sizeof(sText), "%s", sDrive); + + if(iDriveType == DRIVE_UNKNOWN) { + strcat_s(sText, sizeof(sText), " (Unknown Media)"); + } + else if(iDriveType == DRIVE_REMOVABLE) { + strcat_s(sText, sizeof(sText), " (Removable Media)"); + } + else if(iDriveType == DRIVE_FIXED) { + strcat_s(sText, sizeof(sText), " (Fixed Disk)"); + } + else if(iDriveType == DRIVE_REMOTE) { + strcat_s(sText, sizeof(sText), " (Network Drive)"); + } + else if(iDriveType == DRIVE_CDROM) { + strcat_s(sText, sizeof(sText), " (CD-ROM Drive)"); + } + else if(iDriveType == DRIVE_RAMDISK) { + strcat_s(sText, sizeof(sText), " (RAM disk)"); + } + + if(iDriveType != DRIVE_UNKNOWN && iDriveType != DRIVE_CDROM) + { + SendMessage(hDiskDrive, (UINT)CB_ADDSTRING, (WPARAM)0, (LPARAM)sText); + } + } + + iPos++; + } + + LRESULT iIndex = 0; + + if((iIndex = SendMessage(hDiskDrive, (UINT)CB_FINDSTRING, (WPARAM)0, (LPARAM)"C:\\")) == CB_ERR) + { + iIndex = 0; + } + + SendMessage(hDiskDrive, (UINT)CB_SETCURSEL, (WPARAM)iIndex, (LPARAM)0); + + SendMessage(hDiskDrive, EM_LIMITTEXT, 255, 0); + + return true; +} + +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +INT_PTR CALLBACK ConfigDialog(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + //-------------------------------------------------------------------------- + + static HWND hDiskDrive = NULL; + static HWND hChunkSize = NULL; + static HWND hIOS = NULL; + static HWND hIterations = NULL; + + //-------------------------------------------------------------------------- + + if(uMsg == WM_INITDIALOG) // Received A Initilize Dialog Message + { + hConfigDialog = hWnd; + + HMENU SystemMenu_hMenu = GetSystemMenu(hWnd, FALSE); + AppendMenu(SystemMenu_hMenu, MF_SEPARATOR, 0, 0); + AppendMenu(SystemMenu_hMenu, MF_STRING, CONFIGMENU_MENU_ABOUT, "About"); + + SendMessage(hWnd, (UINT)WM_SETTEXT, (WPARAM)0, (LPARAM)gsTitleCaption); + SendMessage(hWnd, WM_SETICON, TRUE, (LPARAM) LoadIcon(ghAppInstance, MAKEINTRESOURCE(IDI_MAIN))); + + hDiskDrive = GetDlgItem(hWnd, IDC_DISKDRIVE); + hChunkSize = GetDlgItem(hWnd, IDC_CHUNKSIZE); + hIOS = GetDlgItem(hWnd, IDC_IOS); + hIterations = GetDlgItem(hWnd, IDC_ITERATIONS); + + SetWindowPos( + hDiskDrive, // Handle of window. + NULL, // Placement-order handle. + 0, // Horizontal position. + 0, // Vertical position. + 158, // Width. + 100, // Height. + SWP_NOMOVE|SWP_NOZORDER // Window-positioning flags. + ); + + PopDiskInformation(hDiskDrive); + + SelectComboItem(hDiskDrive, gsDrive, 3); + Set_Text(hChunkSize, gsLastChunkSize); + Set_Text(hIOS, gsLastIOS); + Set_Text(hIterations, gsLastIterations); + + if(gbUseWriteCache) + { + CheckDlgButton(hWnd, IDC_ALLOWCACHING, BST_CHECKED); + } + + CenterWindow(hWnd); + + return TRUE; // Return TRUE to set the keyboard focus, Otherwise return FALSE. + } + + //-------------------------------------------------------------------------- + + if(uMsg == WM_COMMAND) + { + if(wParam == IDC_CMDHELP) //- Ok Button. + { + OpenHelp(hWnd); + return TRUE; + } + + if(wParam == IDC_CMDOK || wParam == IDOK) //- Ok Button. + { + char sText[1024]; + + if(!Get_Text(hDiskDrive, gsDrive, sizeof(gsDrive))) + { + MessageBox(hWnd, "You must select a drive to test.", gsTitleCaption, MB_ICONINFORMATION); + return true; + } + + if(SendMessage(hDiskDrive, (UINT)CB_FINDSTRING, (WPARAM)0, (LPARAM)gsDrive) != CB_ERR) + { + gsDrive[3] = '\0'; + } + + if(gsDrive[1] != ':') + { + gsDrive[1] = ':'; + } + if(gsDrive[2] != '\\') + { + gsDrive[2] = '\\'; + } + + CMathParser mathParser; + CStringBuilder errorText; + + gbUseWriteCache = (IsDlgButtonChecked(hWnd, IDC_ALLOWCACHING) == BST_CHECKED); + + int iRegValueSz = 0; + iRegValueSz = Get_Text(hChunkSize, gsLastChunkSize, sizeof(gsLastChunkSize)); + if(iRegValueSz > 0 || iRegValueSz < sizeof(gsLastChunkSize)) + { + MEMORYSTATUSEX ms; + memset(&ms, 0, sizeof(ms)); + ms.dwLength = sizeof(ms); + GlobalMemoryStatusEx(&ms); + + if(!mathParser.Calculate(gsLastChunkSize, &giBufferSize) == CMathParser::ResultOk) + { + errorText.Append("An error occured parsing the \"Buffer Size\": "); + errorText.Append(mathParser.LastError()->Text); + MessageBox(hWnd, errorText.Buffer, gsTitleCaption, MB_ICONINFORMATION); + return false; + } + + if(giBufferSize < 1) + { + MessageBox(hWnd, "The \"Buffer Size\" must be greater than zero.", gsTitleCaption, MB_ICONINFORMATION); + return true; + } + else if(giBufferSize > (ms.ullTotalPhys / 4)) + { + char sSize[64]; + sprintf_s(sText, "The \"Buffer Size\" cannot exceed 1/4th of physical RAM (%s)", + FileSizeFriendly((ms.ullTotalPhys / 4), sSize, sizeof(sSize))); + MessageBox(hWnd, sText, gsTitleCaption, MB_ICONINFORMATION); + return true; + } + + if(!gbUseWriteCache) + { + int iSectorAligned = SectorAlign(gsDrive, giBufferSize); + if(iSectorAligned <= 0) + { + MessageBox(hWnd, + "Failed to sector align the disk buffer. See your hardware documentation for proper sector sizes or enable disk caching.", + gsTitleCaption, MB_ICONINFORMATION); + return true; + } + + giBufferSize = iSectorAligned; + } + + Set_StringRegistryValue(HKEY_LOCAL_MACHINE, gsRegistryKey, "BufferSize", gsLastChunkSize); + } + else { + MessageBox(hWnd, "You must enter a \"Buffer Size\".", gsTitleCaption, MB_ICONINFORMATION); + return true; + } + + iRegValueSz = Get_Text(hIterations, gsLastIterations, sizeof(gsLastIterations)); + if(iRegValueSz > 0 || iRegValueSz < sizeof(gsLastIterations)) + { + if(!mathParser.Calculate(gsLastIterations, &giRuns) == CMathParser::ResultOk) + { + errorText.Append("An error occured parsing the \"Buffer Size\": "); + errorText.Append(mathParser.LastError()->Text); + MessageBox(hWnd, errorText.Buffer, gsTitleCaption, MB_ICONINFORMATION); + return false; + } + + if(giRuns < 1 || giRuns > 10000) + { + MessageBox(hWnd, "\"Runs\" must be between 1 and 10,000.", gsTitleCaption, MB_ICONINFORMATION); + return true; + } + + Set_StringRegistryValue(HKEY_LOCAL_MACHINE, gsRegistryKey, "Runs", gsLastIterations); + } + else { + MessageBox(hWnd, "You must enter a number of \"Runs\".", gsTitleCaption, MB_ICONINFORMATION); + return true; + } + + iRegValueSz = Get_Text(hIOS, gsLastIOS, sizeof(gsLastIOS)); + if(iRegValueSz > 0 || iRegValueSz < sizeof(gsLastIOS)) + { + if(!mathParser.Calculate(gsLastIOS, &giRounds) == CMathParser::ResultOk) + { + errorText.Append("An error occured parsing the \"Buffer Size\": "); + errorText.Append(mathParser.LastError()->Text); + MessageBox(hWnd, errorText.Buffer, gsTitleCaption, MB_ICONINFORMATION); + return false; + } + + if(giRounds < 1 || giRounds > 10000) + { + MessageBox(hWnd, "The \"Rounds\" must be between 1 and 10,000.", gsTitleCaption, MB_ICONINFORMATION); + return true; + } + + Set_StringRegistryValue(HKEY_LOCAL_MACHINE, gsRegistryKey, "Rounds", gsLastIOS); + } + else { + MessageBox(hWnd, "You must enter a number of \"Rounds\".", gsTitleCaption, MB_ICONINFORMATION); + return true; + } + + char sVolumeNameBuffer[1024]; + DWORD dwFileSystemFlags; + char sFileSystemNameBuffer[1024]; + + if(GetVolumeInformation(gsDrive, + sVolumeNameBuffer, + sizeof(sVolumeNameBuffer), + NULL, + NULL, + &dwFileSystemFlags, + sFileSystemNameBuffer, + sizeof(sFileSystemNameBuffer))) + { + + if(dwFileSystemFlags &FILE_READ_ONLY_VOLUME) + { + MessageBox(hWnd, "The selected volume is read-only.", gsTitleCaption, MB_ICONINFORMATION); + return true; + } + + ULARGE_INTEGER FreeBytesAvailable; + if(GetDiskFreeSpaceEx(gsDrive, &FreeBytesAvailable, NULL, NULL)) + { + unsigned __int64 i64BufferSize = giBufferSize; + unsigned __int64 i64Rounds = giRounds; + + if((i64BufferSize * i64Rounds) >= FreeBytesAvailable.QuadPart) + { + char sSize[64]; + sprintf_s(sText, "The selected volume has insufficient disk space to support the test file: (%s).", + FileSizeFriendly(giBufferSize * giRounds, sSize, sizeof(sSize))); + MessageBox(hWnd, sText, gsTitleCaption, MB_ICONINFORMATION); + return true; + } + } + else { + sprintf_s(sText, "Failed to retrieve free space information for %s.", gsDrive); + MessageBox(hWnd, sText, gsTitleCaption, MB_ICONINFORMATION); + return true; + } + } + else { + sprintf_s(sText, "Failed to retrieve volumne information for %s.", gsDrive); + MessageBox(hWnd, sText, gsTitleCaption, MB_ICONINFORMATION); + return true; + } + + Set_StringRegistryValue(HKEY_LOCAL_MACHINE, gsRegistryKey, "LastDrive", gsDrive); + Set_BOOLRegistryValue(HKEY_LOCAL_MACHINE, gsRegistryKey, "AllowCache", gbUseWriteCache); + + EndDialog(hWnd, 100); + return TRUE; + } + + if(wParam == IDC_CMDCANCEL || wParam == IDCANCEL) //- Cancel Button. + { + EndDialog(hWnd, 0); + DestroyWindow(hWnd); + + hConfigDialog = NULL; + + return TRUE; + } + + return FALSE; + } + + //-------------------------------------------------------------------------- + + if(uMsg == WM_PAINT) + { + HDC ThisHDC; + PAINTSTRUCT ThisPS; + + ThisHDC = BeginPaint(hWnd, &ThisPS); + + //- Any painting should be done here. + + EndPaint(hWnd, &ThisPS); + return TRUE; + } + + //-------------------------------------------------------------------------- + + if(uMsg == WM_SYSCOMMAND) //- Received a system menu message. + { + if(LOWORD(wParam) == CONFIGMENU_MENU_ABOUT) //- About. + { + _AboutDialogInfo ADI; + + ADI.DisplayIcon = LoadIcon(ghAppInstance, MAKEINTRESOURCE(IDI_MAIN)); + ADI.TitleCaption = gsTitleCaption; + ADI.FileVersion = gsFileVersion; + ADI.BuildDate = __DATE__; + ADI.BuildTime = __TIME__; + ADI.CopyRight = gsAppCopyRight; + ADI.OwnerHandle = hWnd; + + NetLogo(&ADI); + return TRUE; + } + + return FALSE; + } + + //-------------------------------------------------------------------------- + + if(uMsg == WM_CLOSE) //- Received close message. + { + EndDialog(hWnd,0); + DestroyWindow(hWnd); + + hConfigDialog = NULL; + + return TRUE; + } + + //-------------------------------------------------------------------------- + + return FALSE; +} + +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +#endif + diff --git a/Dialogs/ConfigDlg.H b/Dialogs/ConfigDlg.H new file mode 100644 index 0000000..8fbb4e1 --- /dev/null +++ b/Dialogs/ConfigDlg.H @@ -0,0 +1,16 @@ +#ifndef _ConfigDLG_H +#define _ConfigDLG_H +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//---------------------(Constant Definitions) +#define CONFIGMENU_MENU_ABOUT 1000 + +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//---------------------(Variable Declarations) +extern HWND hConfigDialog; + +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//---------------------(Function Prototypes) +INT_PTR CALLBACK ConfigDialog(HWND hHwnd, UINT uMsg, WPARAM wParam, LPARAM lParam); + +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +#endif diff --git a/Dialogs/MainDlg.Cpp b/Dialogs/MainDlg.Cpp new file mode 100644 index 0000000..5572835 --- /dev/null +++ b/Dialogs/MainDlg.Cpp @@ -0,0 +1,674 @@ +#ifndef _MainDlg_CPP +#define _MainDlg_CPP +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +#include +#include +#include +#include + +#include "../Resources/Resource.H" + +#include "../../@Libraries//NSWFL/NSWFL.H" +#include "../../@Libraries//CGraph/CGraph.H" +#include "../../@Libraries//CDuration/CDuration.H" + +#include "../Source/Entry.H" +#include "../Source/Routines.H" + +#include "../Dialogs/ConfigDlg.H" +#include "../Dialogs/MainDlg.H" +#include "../Dialogs/NetLogoDlg.H" + +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +using namespace NSWFL::Windows; +using namespace NSWFL::Conversion; +using namespace NSWFL::File; + +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +//---------------------(Variable Declarations) +HWND hMainDialog = NULL; + +HWND hAllowCache = NULL; +HWND hIOS = NULL; +HWND hIterations = NULL; +HWND hChunkSize = NULL; +HWND hBytesPerIteration = NULL; +HWND hTotalDatasetSize = NULL; + +HWND hWriteDiskTime = NULL; +HWND hWriteLast = NULL; +HWND hWriteAvg = NULL; +HWND hWriteMin = NULL; +HWND hWriteMax = NULL; + +HWND hReadDiskTime = NULL; +HWND hReadLast = NULL; +HWND hReadAvg = NULL; +HWND hReadMin = NULL; +HWND hReadMax = NULL; + +HWND hProgress = NULL; +HWND hWriteGraph = NULL; +HWND hReadGraph = NULL; + +CGraph *pWriteGraph; +CGraph *pReadGraph; + +char gsDrive[MAX_PATH]; +int giBufferSize = 0; +int giRuns = 0; +int giRounds = 0; +bool gbUseWriteCache = false; + +HANDLE hThread = NULL; +DWORD dwThreadID = 0; +bool gbCancel = false; + +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +bool GraphTextFormatCallback(CGraph *pGraph, GRAPHSERIES *pSeries, GRAPHTEXTATTRIBUTES *pTextAttributes) +{ + pTextAttributes->BGMode = TRANSPARENT; + pTextAttributes->FGColor = pSeries->LineColor; + pTextAttributes->FontSize = 10; + + char sSize[128]; + char sSpace[20]; + char *sPart = NULL; + + FileSizeFriendly(pSeries->LastValue, 2, sSize, sizeof(sSize)); + + if(pSeries->Index == 0) + { + if(pGraph == pWriteGraph) + { + GRAPHTEXTATTRIBUTES gta; + memcpy_s(>a, sizeof(gta), pTextAttributes, sizeof(GRAPHTEXTATTRIBUTES)); + strcpy_s(gta.Text, sizeof(gta.Text) , "Writes:"); + gta.x = 5; + gta.y = 5; + gta.FGColor = RGB(0, 255, 255); + + pGraph->WriteText(>a); + } + else if(pGraph == pReadGraph) + { + GRAPHTEXTATTRIBUTES gta; + memcpy_s(>a, sizeof(gta), pTextAttributes, sizeof(GRAPHTEXTATTRIBUTES)); + strcpy_s(gta.Text, sizeof(gta.Text) , "Reads:"); + gta.x = 5; + gta.y = 5; + gta.FGColor = RGB(0, 255, 255); + + pGraph->WriteText(>a); + } + + pTextAttributes->x = pGraph->Width(); + pTextAttributes->y = 5; + sPart = " Min"; + } + else if(pSeries->Index == 1) + { + pTextAttributes->x = pGraph->Width(); + pTextAttributes->y = 20; + sPart = " Max"; + } + else if(pSeries->Index == 2) + { + pTextAttributes->x = pGraph->Width() - 150; + pTextAttributes->y = 20; + sPart = " Avg"; + } + else { + pTextAttributes->x = pGraph->Width() - 150; + pTextAttributes->y = 5; + sPart = "Last"; + } + + size_t iLen = strlen(sPart) + strlen(sSize) + 2; + + sSpace[0] = '\0'; + for(size_t i = iLen; i < 16; i++) + { + strcat_s(sSpace, sizeof(sSpace), " "); + } + + sprintf_s(pTextAttributes->Text, sizeof(pTextAttributes->Text), "%s:%s%s", sPart, sSpace, sSize); + + return true; +} + +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +void ResetCounters(void) +{ + pReadGraph->Reset(); + pWriteGraph->Reset(); + + Set_Text(hAllowCache, "n/a"); + Set_Text(hIOS, "n/a"); + Set_Text(hIterations, "n/a"); + Set_Text(hChunkSize, "n/a"); + Set_Text(hBytesPerIteration, "n/a"); + Set_Text(hTotalDatasetSize, "n/a"); + + Set_Text(hWriteDiskTime, "n/a"); + Set_Text(hWriteLast, "n/a"); + Set_Text(hWriteAvg, "n/a"); + Set_Text(hWriteMin, "n/a"); + Set_Text(hWriteMax, "n/a"); + + Set_Text(hReadDiskTime, "n/a"); + Set_Text(hReadLast, "n/a"); + Set_Text(hReadAvg, "n/a"); + Set_Text(hReadMin, "n/a"); + Set_Text(hReadMax, "n/a"); + + SendMessage(hProgress, PBM_SETPOS, 0, (LPARAM) 0); + + pReadGraph->Invalidate(); + pWriteGraph->Invalidate(); +} + +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +bool PerformWriteTests(const char *sDrive, int iBufferSize, int iRuns, int iRounds, bool bUseWriteCache) +{ + ResetCounters(); + + SetThreadAffinityMask(GetCurrentThread(), 0); + + CDuration timer; + + char *sBuf = NULL; + char sFileName[MAX_PATH]; + char sTemp[1024]; + char sTemp2[1024]; + + double dTotalMBPerSecond = 0; + double dMBPerSecond = 0; + double dDuration = 0; + double dTotalDuration = 0; + double dAverageMBPerSecond = 0; + + double dMaxMBPS = -999999999999999; + double dMinMBPS = 999999999999999; + + DWORD dwWritten = 0; + + HANDLE hFile = NULL; + + int iBufSz = 0; + + srand(GetTickCount()); + + //------------------------------------------------------------------------------------------------------------- + + if(bUseWriteCache) + { + strcpy_s(sTemp, sizeof(sTemp), "Yes"); + } + else{ + strcpy_s(sTemp, sizeof(sTemp), "No"); + } + Set_Text(hAllowCache, sTemp); + + FormatInteger(sTemp, sizeof(sTemp), iRounds); + Set_Text(hIOS, sTemp); + + FormatInteger(sTemp, sizeof(sTemp), iRuns); + Set_Text(hIterations, sTemp); + + FileSizeFriendly(iBufferSize, sTemp, sizeof(sTemp)); + Set_Text(hChunkSize, sTemp); + + FileSizeFriendly(((__int64)iBufferSize * ((__int64)iRounds)), sTemp, sizeof(sTemp)); + Set_Text(hBytesPerIteration, sTemp); + + FileSizeFriendly(((__int64)iBufferSize * ((__int64)iRounds) * ((__int64)iRuns)), sTemp, sizeof(sTemp)); + Set_Text(hTotalDatasetSize, sTemp); + + SendMessage(hProgress, PBM_SETRANGE32, 0, (LPARAM) iRuns * 2); + + //------------------------------------------------------------------------------------------------------------- + + //Allocate and fill the random buffer. + sBuf = (char *) gMem.Allocate(sizeof(char), iBufferSize + 1); + for(int i = 0; i < iBufferSize; i++) + { + sBuf[i] = (char) rand(); + } + + sprintf_s(sFileName, sizeof(sFileName), + "%s\\%d-%d-%d-%d.txt", + sDrive, iRuns, iRounds, iBufferSize, GetTickCount()); + CorrectReversePath(sFileName, sizeof(sFileName)); + + DWORD dwWriteFlags = 0; + + if(!gbUseWriteCache) + { + dwWriteFlags = FILE_FLAG_WRITE_THROUGH | FILE_FLAG_NO_BUFFERING; + } + + hFile = CreateFile( + sFileName, + GENERIC_WRITE, + 0, + NULL, + CREATE_ALWAYS, + dwWriteFlags, + NULL + ); + + if(hFile == INVALID_HANDLE_VALUE) + { + sprintf_s(sTemp, sizeof(sTemp), "Failed to create temporary write buffering file on the specified volume.\r\n\"%s\"", sFileName); + MessageBox(hMainDialog, sTemp, gsTitleCaption, MB_ICONERROR); + gMem.Free(sBuf); + return false; + } + + for(int iRun = 0; iRun < iRuns * 2; iRun++) + { + if(iRun == iRuns) + { + dTotalMBPerSecond = 0; + dMBPerSecond = 0; + dDuration = 0; + dTotalDuration = 0; + dAverageMBPerSecond = 0; + + dMaxMBPS = -999999999999999; + dMinMBPS = 999999999999999; + + CloseHandle(hFile); + + DWORD dwReadFlags = 0; + + if(!gbUseWriteCache) + { + dwReadFlags = FILE_FLAG_NO_BUFFERING | FILE_FLAG_WRITE_THROUGH; + } + + hFile = CreateFile( + sFileName, + GENERIC_READ, + 0, + NULL, + OPEN_EXISTING, + dwReadFlags, + NULL + ); + + if(hFile == INVALID_HANDLE_VALUE) + { + sprintf_s(sTemp, sizeof(sTemp), "Failed to create temporary read buffering file on the specified volume. \r\n\"%s\"", sFileName); + MessageBox(hMainDialog, sTemp, gsTitleCaption, MB_ICONERROR); + gMem.Free(sBuf); + return false; + } + } + + FileSeek(hFile, 0, FILE_BEGIN); + + timer.Start(); + for(int iRound = 0; iRound < iRounds; iRound++) + { + if(iRun < iRuns) + { + if(!WriteFile(hFile, sBuf, iBufferSize, &dwWritten, NULL)) + { + MessageBox(hMainDialog, "Failed to [write] the file buffer." + " Access was denied or the buffer is not sector aligned.", gsTitleCaption, MB_ICONERROR); + gbCancel = true; + } + } + else { + if(!ReadFile(hFile, sBuf, iBufferSize, &dwWritten, NULL)) + { + MessageBox(hMainDialog, "Failed to [read] the file buffer." + " Access was denied or the buffer is not sector aligned.", gsTitleCaption, MB_ICONERROR); + gbCancel = true; + } + } + + if(gbCancel) + { + break; + } + } + timer.Stop(); + + dDuration = timer.Calculate() / 1000.0; // Duration of last write operation. + + if(dDuration <= 0) + { + MessageBox(hMainDialog, + "The selected disk completed the write operation to quickly for measurement." + " Try increasing some of the stress values for a more accurate test.", + gsTitleCaption, MB_ICONINFORMATION); + + gbCancel = true; + } + + if(!gbCancel) + { + int iRunAvg = iRun; + + if(iRun >= iRuns) + { + iRunAvg -= iRuns; + } + + dTotalDuration = (dTotalDuration + dDuration); //Total Disk Time. + dMBPerSecond = (((__int64)iBufferSize * (__int64)iRounds) / dDuration); //Last MB/s. + dTotalMBPerSecond += dMBPerSecond / 1024.0; //Sum of all MB/s calculations. Used for averages. + dAverageMBPerSecond = (dTotalMBPerSecond / ((double)(iRunAvg + 1))) * 1024.0; //Average MB/s. + + if(dMBPerSecond > dMaxMBPS) + { + dMaxMBPS = dMBPerSecond; + } + + if(dMBPerSecond < dMinMBPS) + { + dMinMBPS = dMBPerSecond; + } + + double dValues[4]; + dValues[0] = dMinMBPS; + dValues[1] = dMaxMBPS; + dValues[2] = dAverageMBPerSecond; + dValues[3] = dMBPerSecond; + + if(iRun < iRuns) + { + pWriteGraph->Update(dValues); + pWriteGraph->Invalidate(); + + FormatDouble(sTemp, sizeof(sTemp), dTotalDuration, 2); + sprintf_s(sTemp2, sizeof(sTemp2), " %ss", sTemp); + Set_Text(hWriteDiskTime, sTemp2); + + FileSizeFriendly((__int64)dMBPerSecond, sTemp, sizeof(sTemp)); + sprintf_s(sTemp2, sizeof(sTemp2), " %s/s", sTemp); + Set_Text(hWriteLast, sTemp2); + + FileSizeFriendly((__int64)dAverageMBPerSecond, sTemp, sizeof(sTemp)); + sprintf_s(sTemp2, sizeof(sTemp2), " %s/s", sTemp); + Set_Text(hWriteAvg, sTemp2); + + FileSizeFriendly((__int64)dMinMBPS, sTemp, sizeof(sTemp)); + sprintf_s(sTemp2, sizeof(sTemp2), " %s/s", sTemp); + Set_Text(hWriteMin, sTemp2); + + FileSizeFriendly((__int64)dMaxMBPS, sTemp, sizeof(sTemp)); + sprintf_s(sTemp2, sizeof(sTemp2), " %s/s", sTemp); + Set_Text(hWriteMax, sTemp2); + } + else { + pReadGraph->Update(dValues); + pReadGraph->Invalidate(); + + FormatDouble(sTemp, sizeof(sTemp), dTotalDuration, 2); + sprintf_s(sTemp2, sizeof(sTemp2), " %ss", sTemp); + Set_Text(hReadDiskTime, sTemp2); + + FileSizeFriendly((__int64)dMBPerSecond, sTemp, sizeof(sTemp)); + sprintf_s(sTemp2, sizeof(sTemp2), " %s/s", sTemp); + Set_Text(hReadLast, sTemp2); + + FileSizeFriendly((__int64)dAverageMBPerSecond, sTemp, sizeof(sTemp)); + sprintf_s(sTemp2, sizeof(sTemp2), " %s/s", sTemp); + Set_Text(hReadAvg, sTemp2); + + FileSizeFriendly((__int64)dMinMBPS, sTemp, sizeof(sTemp)); + sprintf_s(sTemp2, sizeof(sTemp2), " %s/s", sTemp); + Set_Text(hReadMin, sTemp2); + + FileSizeFriendly((__int64)dMaxMBPS, sTemp, sizeof(sTemp)); + sprintf_s(sTemp2, sizeof(sTemp2), " %s/s", sTemp); + Set_Text(hReadMax, sTemp2); + } + + SendMessage(hProgress, PBM_SETPOS, iRun, (LPARAM) 0); + } + else { + break; + } + } + + SendMessage(hProgress, PBM_SETPOS, iRuns * 2, (LPARAM) 0); + + CloseHandle(hFile); + DeleteFile(sFileName); + + gMem.Free(sBuf); + + if(gbCancel) + { + MessageBox(hMainDialog, "Cancelled.", gsTitleCaption, MB_ICONINFORMATION); + return false; + } + + return true; +} + +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +DWORD WINAPI ThreadProc(LPVOID lpVoid) +{ + char sCaption[1024]; + sprintf_s(sCaption, sizeof(sCaption), "%s (%s)", gsTitleCaption, gsDrive); + SendMessage(hMainDialog, (UINT)WM_SETTEXT, (WPARAM)0, (LPARAM)sCaption); + + Set_Text(GetDlgItem(hMainDialog, ID_CMDMULTI), "Cancel"); + + if(PerformWriteTests(gsDrive, giBufferSize, giRuns, giRounds, gbUseWriteCache)) + { + MessageBox(hMainDialog, "Complete!", gsTitleCaption, MB_ICONINFORMATION); + } + + gbCancel = false; + Set_Text(GetDlgItem(hMainDialog, ID_CMDMULTI), "Run"); + EnableWindow(GetDlgItem(hMainDialog, ID_CMDMULTI), TRUE); + + CloseHandle(hThread); + hThread = NULL; + + return 0; +} + +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +INT_PTR CALLBACK MainDialog(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + static bool bFirstPaint = true; + + //-------------------------------------------------------------------------- + + if(uMsg == WM_INITDIALOG) + { + hMainDialog = hWnd; + + HMENU SystemMenu_hMenu = GetSystemMenu(hWnd, FALSE); + AppendMenu(SystemMenu_hMenu, MF_SEPARATOR, 0, 0); + AppendMenu(SystemMenu_hMenu, MF_STRING, CONFIGMENU_MENU_ABOUT, "About"); + + SendMessage(hWnd, (UINT)WM_SETTEXT, (WPARAM)0, (LPARAM)gsTitleCaption); + SendMessage(hWnd, WM_SETICON, TRUE, (LPARAM) LoadIcon(ghAppInstance, MAKEINTRESOURCE(IDI_MAIN))); + + hAllowCache = GetDlgItem(hWnd, IDC_ALLOWCACHE); + hIOS = GetDlgItem(hWnd, IDC_IOS); + hIterations = GetDlgItem(hWnd, IDC_ITERATIONS); + hChunkSize = GetDlgItem(hWnd, IDC_CHUNKSIZE); + hBytesPerIteration = GetDlgItem(hWnd, IDC_BYTESPERITERATION); + hTotalDatasetSize = GetDlgItem(hWnd, IDC_TOTALDATASETSIZE); + hProgress = GetDlgItem(hWnd, IDC_DSKPROGRESS); + + hWriteGraph = GetDlgItem(hWnd, IDC_GRAPHWRITE); + hWriteDiskTime = GetDlgItem(hWnd, IDC_DISKTIMEWRITE); + hWriteLast = GetDlgItem(hWnd, IDC_LASTWRITE); + hWriteAvg = GetDlgItem(hWnd, IDC_AVGWRITE); + hWriteMin = GetDlgItem(hWnd, IDC_MINWRITE); + hWriteMax = GetDlgItem(hWnd, IDC_MAXWRITE); + + hReadGraph = GetDlgItem(hWnd, IDC_GRAPHREAD); + hReadDiskTime = GetDlgItem(hWnd, IDC_DISKTIMEREAD); + hReadLast = GetDlgItem(hWnd, IDC_LASTREAD); + hReadAvg = GetDlgItem(hWnd, IDC_AVGREAD); + hReadMin = GetDlgItem(hWnd, IDC_MINREAD); + hReadMax = GetDlgItem(hWnd, IDC_MAXREAD); + + pWriteGraph = new CGraph(hWriteGraph, RGB(0, 0, 0), RGB(0, 100, 0), 15, GRAPH_LEFT, true); + pWriteGraph->SpacingTop(50); + + pWriteGraph->AddSeries(RGB(255, 0, 0), 1024.0, GraphTextFormatCallback); + pWriteGraph->AddSeries(RGB(0, 255, 0), 1024.0, GraphTextFormatCallback); + pWriteGraph->AddSeries(RGB(200, 200, 200), 1024.0, GraphTextFormatCallback); + pWriteGraph->AddSeries(RGB(255, 255, 0), 1024.0, GraphTextFormatCallback); + + pReadGraph = new CGraph(hReadGraph, RGB(0, 0, 0), RGB(0, 100, 0), 15, GRAPH_LEFT, true); + pReadGraph->SpacingTop(50); + + pReadGraph->AddSeries(RGB(255, 0, 0), 1024.0, GraphTextFormatCallback); + pReadGraph->AddSeries(RGB(0, 255, 0), 1024.0, GraphTextFormatCallback); + pReadGraph->AddSeries(RGB(200, 200, 200), 1024.0, GraphTextFormatCallback); + pReadGraph->AddSeries(RGB(255, 255, 0), 1024.0, GraphTextFormatCallback); + + ResetCounters(); + + CenterWindow(hWnd); + + return TRUE; // Return TRUE to set the keyboard focus, Otherwise return FALSE. + } + + //-------------------------------------------------------------------------- + + if(uMsg == WM_COMMAND) + { + if(wParam == ID_CMDMULTI) //- Cancel Button. + { + char sCaption[100]; + Get_Text(GetDlgItem(hWnd, ID_CMDMULTI), sCaption, sizeof(sCaption)); + if(_strcmpi(sCaption, "Run") == 0) + { + if(DialogBox(ghAppInstance, MAKEINTRESOURCE(IDD_CONFIG), hWnd, ConfigDialog) == 100) + { + hThread = CreateThread(NULL, 0, ThreadProc, (LPVOID)0, 0, &dwThreadID); + } + return true; + } + else { + if(MessageBox(hMainDialog, "Are you sure you want to cancel the operation?", gsTitleCaption, MB_YESNO|MB_DEFBUTTON2|MB_ICONQUESTION) == IDYES) + { + if(hThread) + { + gbCancel = true; + EnableWindow(GetDlgItem(hMainDialog, ID_CMDMULTI), FALSE); + } + return TRUE; + } + } + } + else if(wParam == IDC_CMDHELP) //- Ok Button. + { + OpenHelp(hWnd); + return TRUE; + } + else if(wParam == IDC_ONTOP) + { + if(IsDlgButtonChecked(hWnd, IDC_ONTOP)) + { + SetWindowPos(hWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); + } + else { + SetWindowPos(hWnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); + } + } + + return FALSE; + } + + //-------------------------------------------------------------------------- + + if(uMsg == WM_PAINT) + { + if(bFirstPaint) + { + bFirstPaint = false; + if(DialogBox(ghAppInstance, MAKEINTRESOURCE(IDD_CONFIG), hWnd, ConfigDialog) == 100) + { + hThread = CreateThread(NULL, 0, ThreadProc, (LPVOID)0, 0, &dwThreadID); + } + } + + HDC ThisHDC; + PAINTSTRUCT ThisPS; + + ThisHDC = BeginPaint(hWnd, &ThisPS); + + //- Any painting should be done here. + + EndPaint(hWnd, &ThisPS); + return TRUE; + } + + //-------------------------------------------------------------------------- + + if(uMsg == WM_SYSCOMMAND) //- Received a system menu message. + { + if(LOWORD(wParam) == CONFIGMENU_MENU_ABOUT) //- About. + { + _AboutDialogInfo ADI; + + ADI.DisplayIcon = LoadIcon(ghAppInstance, MAKEINTRESOURCE(IDI_MAIN)); + ADI.TitleCaption = gsTitleCaption; + ADI.FileVersion = gsFileVersion; + ADI.BuildDate = __DATE__; + ADI.BuildTime = __TIME__; + ADI.CopyRight = gsAppCopyRight; + ADI.OwnerHandle = hWnd; + + NetLogo(&ADI); + return TRUE; + } + + return FALSE; + } + + //-------------------------------------------------------------------------- + + if(uMsg == WM_CLOSE) //- Received close message. + { + if(hThread) + { + MessageBox(hMainDialog, "Cancel the operation before closing.", gsTitleCaption, MB_ICONINFORMATION); + } + else { + delete pWriteGraph; + delete pReadGraph; + + EndDialog(hWnd,0); + DestroyWindow(hWnd); + + hMainDialog = NULL; + return true; + } + + + return TRUE; + } + + //-------------------------------------------------------------------------- + + return FALSE; +} + +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +#endif + diff --git a/Dialogs/MainDlg.H b/Dialogs/MainDlg.H new file mode 100644 index 0000000..c9cb66d --- /dev/null +++ b/Dialogs/MainDlg.H @@ -0,0 +1,45 @@ +#ifndef _MainDlg_H +#define _MainDlg_H +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//---------------------(Constant Definitions) +#define ONEMEGABYTE 1048576.0f + +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//---------------------(Variable Declarations) +extern HWND hMainDialog; + +extern HWND hAllowCache; +extern HWND hRounds; +extern HWND hRuns; +extern HWND hSetSize; +extern HWND hPerSetSize; +extern HWND hTotalSetSize; + +extern HWND hWriteDiskTime; +extern HWND hWriteLast; +extern HWND hWriteAvg; +extern HWND hWriteMin; +extern HWND hWriteMax; + +extern HWND hReadDiskTime; +extern HWND hReadLast; +extern HWND hReadAvg; +extern HWND hReadMin; +extern HWND hReadMax; + +extern char gsDrive[MAX_PATH]; +extern int giBufferSize; +extern int giRuns; +extern int giRounds; +extern bool gbUseWriteCache; + +extern HANDLE hThread; +extern DWORD dwThreadID; + +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//---------------------(Function Prototypes) +INT_PTR CALLBACK MainDialog(HWND hHwnd, UINT uMsg, WPARAM wParam, LPARAM lParam); +DWORD WINAPI ThreadProc(LPVOID lpVoid); + +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +#endif diff --git a/Dialogs/NetLogoDlg.Cpp b/Dialogs/NetLogoDlg.Cpp new file mode 100644 index 0000000..b6c8c3c --- /dev/null +++ b/Dialogs/NetLogoDlg.Cpp @@ -0,0 +1,193 @@ +#ifndef _NETLOGODLG_CPP +#define _NETLOGODLG_CPP +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +#include +#include + +#include "../Source/Entry.H" +#include "../Source/Routines.H" +#include "../Resources/Resource.H" +#include "../../@Libraries//NSWFL/NSWFL.H" + +#include "NetLogoDlg.H" + +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +using namespace NSWFL::Windows; + +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +HWND NetLogoDialog_hWnd = NULL; +HINSTANCE hModuleHandle = NULL; +LPABOUTDLGINFO glpADI; + +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +bool NetLogo(LPABOUTDLGINFO lpADI) +{ + HWND OwnerHandle = NULL; + + glpADI = lpADI; + + if(glpADI->OwnerHandle == NULL) + OwnerHandle = GetActiveWindow(); + else OwnerHandle = glpADI->OwnerHandle; + + hModuleHandle = GetModuleHandle(NULL); + + DialogBox(hModuleHandle, MAKEINTRESOURCE(IDD_NETLOGO), OwnerHandle, (DLGPROC)NetLogoDialog); + return true; +} + +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +HWND NetLogoHandle(void) +{ + return NetLogoDialog_hWnd; +} + +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +bool IsNetLogoActive(void) +{ + return (NetLogoDialog_hWnd != NULL); +} + +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +void EndNetLogo(void) +{ + EndDialog(NetLogoDialog_hWnd, 0); +} + +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +INT_PTR CALLBACK NetLogoDialog(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + //-------------------------------------------------------------------------- + + static HWND AppName_hWnd = NULL; + static HWND AppVersion_hWnd = NULL; + static HWND AppCopyRight_hWnd = NULL; + static HWND DisplayIcon_hWnd = NULL; + static HWND BuildTimeDate_hWnd = NULL; + static HWND NetLink_hWnd = NULL; + + static HCURSOR HandCursor = NULL; + + static DWORD BGColorRef = 0; + + //-------------------------------------------------------------------------- + + if(uMsg == WM_INITDIALOG) // Received A Initilize Dialog Message + { + char sTempText[255]; + + NetLogoDialog_hWnd = hWnd; + + HandCursor = LoadCursor(hModuleHandle, MAKEINTRESOURCE(IDC_HANDCURSOR)); + BGColorRef = GetSysColor(COLOR_3DFACE); + + sprintf_s(sTempText, sizeof(sTempText), "NetworkDLS :: %s", glpADI->TitleCaption); + SendMessage(hWnd, (UINT)WM_SETTEXT, (WPARAM)0, (LPARAM)sTempText); + + AppName_hWnd = GetDlgItem(hWnd, IDC_APPNAME); + AppVersion_hWnd = GetDlgItem(hWnd, IDC_APPVERSION); + BuildTimeDate_hWnd = GetDlgItem(hWnd, IDC_BUILDTIMEDATE); + AppCopyRight_hWnd = GetDlgItem(hWnd, IDC_APPCOPYRIGHT); + DisplayIcon_hWnd = GetDlgItem(hWnd, IDC_ABOUTICON); + NetLink_hWnd = GetDlgItem(hWnd, IDC_NETLINK); + + SendMessage(DisplayIcon_hWnd, (UINT)STM_SETIMAGE, (WPARAM)IMAGE_ICON, (LPARAM)glpADI->DisplayIcon); + + Set_Text(AppName_hWnd, glpADI->TitleCaption); + + Set_Text(AppVersion_hWnd, glpADI->FileVersion); + + sprintf_s(sTempText, sizeof(sTempText), "%s - %s", glpADI->BuildDate, glpADI->BuildTime); + Set_Text(BuildTimeDate_hWnd, sTempText); + + Set_Text(AppCopyRight_hWnd, glpADI->CopyRight); + + CenterOverOwner(hWnd); + + return TRUE; // Return TRUE to set the keyboard focus, Otherwise return FALSE + } + + //-------------------------------------------------------------------------- + + if(IsMouseOverHwnd(NetLink_hWnd)) + { + SetCursor(HandCursor); + + if(uMsg == WM_LBUTTONUP) + { + ShellExecute(0, "Open", "Http://www.NetworkDLS.com/", NULL, NULL, SW_SHOWNORMAL); + } + } + + //-------------------------------------------------------------------------- + + if(uMsg == WM_CTLCOLORSTATIC) + { + if((HANDLE)lParam == NetLink_hWnd) + return Set_Color(RGB(0, 0, 255), BGColorRef, wParam); + + return FALSE; + } + + //-------------------------------------------------------------------------- + + if(uMsg == WM_COMMAND) + { + if(wParam == IDC_OKBUTTON) + { + EndDialog(hWnd, 0); + DestroyWindow(hWnd); + return TRUE; + } + return FALSE; + } + + //-------------------------------------------------------------------------- + + if(uMsg == WM_PAINT) + { + HDC ThisHDC; + PAINTSTRUCT ThisPS; + + ThisHDC = BeginPaint(hWnd, &ThisPS); + + // Any painting should be done here + + EndPaint(hWnd, &ThisPS); + return TRUE; + } + + //-------------------------------------------------------------------------- + + if(uMsg == WM_DESTROY) + { + FreeLibrary(hModuleHandle); + hModuleHandle = NULL; + NetLogoDialog_hWnd = NULL; + return TRUE; + } + + //-------------------------------------------------------------------------- + + if(uMsg == WM_CLOSE) // Received Close Message + { + EndDialog(hWnd,0); + DestroyWindow(hWnd); + return TRUE; + } + + //-------------------------------------------------------------------------- + + return FALSE; +} + +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +#endif diff --git a/Dialogs/NetLogoDlg.H b/Dialogs/NetLogoDlg.H new file mode 100644 index 0000000..475e714 --- /dev/null +++ b/Dialogs/NetLogoDlg.H @@ -0,0 +1,28 @@ +#ifndef _NETLOGODLG_H +#define _NETLOGODLG_H +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +typedef struct _AboutDialogInfo{ + char *BuildDate; + char *BuildTime; + char *CopyRight; + char *FileVersion; + char *TitleCaption; + HICON DisplayIcon; + HWND OwnerHandle; +} ABOUTDLGINFO, *LPABOUTDLGINFO; + +extern LPABOUTDLGINFO glpADI; + +extern HWND NetLogoDialog_hWnd; + +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +INT_PTR CALLBACK NetLogoDialog(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam); +bool IsNetLogoActive(void); +bool NetLogo(LPABOUTDLGINFO lpADI); +HWND NetLogoHandle(void); +void EndNetLogo(void); + +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +#endif diff --git a/DiskMark.sln b/DiskMark.sln new file mode 100644 index 0000000..93cd5f5 --- /dev/null +++ b/DiskMark.sln @@ -0,0 +1,25 @@ +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DiskMark", "DiskMark.vcxproj", "{E1627A40-B36D-4EF3-AD74-4949479BB10B}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {E1627A40-B36D-4EF3-AD74-4949479BB10B}.Debug|Win32.ActiveCfg = Debug|Win32 + {E1627A40-B36D-4EF3-AD74-4949479BB10B}.Debug|Win32.Build.0 = Debug|Win32 + {E1627A40-B36D-4EF3-AD74-4949479BB10B}.Debug|x64.ActiveCfg = Debug|x64 + {E1627A40-B36D-4EF3-AD74-4949479BB10B}.Debug|x64.Build.0 = Debug|x64 + {E1627A40-B36D-4EF3-AD74-4949479BB10B}.Release|Win32.ActiveCfg = Release|Win32 + {E1627A40-B36D-4EF3-AD74-4949479BB10B}.Release|Win32.Build.0 = Release|Win32 + {E1627A40-B36D-4EF3-AD74-4949479BB10B}.Release|x64.ActiveCfg = Release|x64 + {E1627A40-B36D-4EF3-AD74-4949479BB10B}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/DiskMark.vcxproj b/DiskMark.vcxproj new file mode 100644 index 0000000..92a3b75 --- /dev/null +++ b/DiskMark.vcxproj @@ -0,0 +1,399 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {E1627A40-B36D-4EF3-AD74-4949479BB10B} + DiskMark + + + + Application + false + MultiByte + v140 + + + Application + false + MultiByte + v140 + + + Application + false + MultiByte + v140 + + + Application + false + MultiByte + v140 + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + true + true + true + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + true + true + true + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + false + true + true + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + false + true + true + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + $(Platform)\$(Configuration)\DiskMark.tlb + + + + + Disabled + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + $(Platform)\$(Configuration)\DiskMark.pch + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + Level3 + true + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(Platform)\$(Configuration)\DiskMark.exe + true + RequireAdministrator + libc.lib;libcmt.lib;msvcrt.lib;libcd.lib;msvcrtd.lib;%(IgnoreSpecificDefaultLibraries) + true + $(Platform)\$(Configuration)\DiskMark.pdb + Console + false + + + MachineX86 + + + Resources\CommonControls.manifest;%(AdditionalManifestFiles) + + + + + X64 + $(Platform)\$(Configuration)\DiskMark.tlb + + + + + Disabled + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + $(Platform)\$(Configuration)\DiskMark.pch + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + Level3 + true + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(Platform)\$(Configuration)\DiskMark.exe + true + RequireAdministrator + libc.lib;libcmt.lib;msvcrt.lib;libcd.lib;msvcrtd.lib;%(IgnoreSpecificDefaultLibraries) + true + $(Platform)\$(Configuration)\DiskMark.pdb + Console + false + + + MachineX64 + + + Resources\CommonControls.manifest;%(AdditionalManifestFiles) + + + + + $(Platform)\$(Configuration)\DiskMark.tlb + + + + + MaxSpeed + OnlyExplicitInline + false + Speed + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + $(Platform)\$(Configuration)\DiskMark.pch + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + Level3 + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(Platform)\$(Configuration)\DiskMark.exe + true + RequireAdministrator + libc.lib;msvcrt.lib;libcd.lib;libcmtd.lib;msvcrtd.lib;%(IgnoreSpecificDefaultLibraries) + $(Platform)\$(Configuration)\DiskMark.pdb + Windows + true + true + false + + + MachineX86 + + + Resources\CommonControls.manifest;%(AdditionalManifestFiles) + + + + + X64 + $(Platform)\$(Configuration)\DiskMark.tlb + + + + + MaxSpeed + OnlyExplicitInline + false + Speed + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + $(Platform)\$(Configuration)\DiskMark.pch + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + Level3 + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(Platform)\$(Configuration)\DiskMark.exe + true + RequireAdministrator + libc.lib;msvcrt.lib;libcd.lib;libcmtd.lib;msvcrtd.lib;%(IgnoreSpecificDefaultLibraries) + $(Platform)\$(Configuration)\DiskMark.pdb + Windows + true + true + false + + + MachineX64 + + + Resources\CommonControls.manifest;%(AdditionalManifestFiles) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Disabled + %(PreprocessorDefinitions) + EnableFastChecks + Disabled + %(PreprocessorDefinitions) + EnableFastChecks + MaxSpeed + %(PreprocessorDefinitions) + MaxSpeed + %(PreprocessorDefinitions) + + + Disabled + %(PreprocessorDefinitions) + EnableFastChecks + Disabled + %(PreprocessorDefinitions) + EnableFastChecks + MaxSpeed + %(PreprocessorDefinitions) + MaxSpeed + %(PreprocessorDefinitions) + + + + Disabled + %(PreprocessorDefinitions) + EnableFastChecks + Disabled + %(PreprocessorDefinitions) + EnableFastChecks + MaxSpeed + %(PreprocessorDefinitions) + MaxSpeed + %(PreprocessorDefinitions) + + + + + + + %(PreprocessorDefinitions) + Resources;%(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + Resources;%(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + Resources;%(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + Resources;%(AdditionalIncludeDirectories) + + + + + + + + + + + + + \ No newline at end of file diff --git a/DiskMark.vcxproj.filters b/DiskMark.vcxproj.filters new file mode 100644 index 0000000..8b18a08 --- /dev/null +++ b/DiskMark.vcxproj.filters @@ -0,0 +1,233 @@ + + + + + {84eccf86-f05f-44cc-9b1d-df49db50cf1c} + c;cpp;lib + + + {8fc967e8-f8ef-47aa-9a60-f3d518f77bab} + + + {7f371fe5-ef9c-4b38-8d5d-5c8f97a3dc74} + res;rc;ico;bmp + + + {ab237486-bedb-49c5-a776-53fea92e9e39} + + + {da7a1d30-dc21-4d52-8d83-ad2b91c5ba6a} + + + {601c3241-1452-4487-b9d8-e4ff03913698} + + + {7b51aab3-2f3f-49a4-a12f-96b4e4e36acb} + + + {56052766-2cf4-4405-9c2b-6f0baaea7842} + + + {23abc6eb-1760-4787-ab95-a49793025bb9} + + + {8a7d8375-3f7c-46d7-829d-9e889296306d} + + + {ca153356-e753-4680-84f1-94f7bc80cd3a} + + + + + SourceFiles + + + SourceFiles + + + SourceFiles + + + Dialogs + + + Dialogs + + + Dialogs + + + Resources + + + Classes & Libraries\NSWFL + + + Classes & Libraries\NSWFL + + + Classes & Libraries\NSWFL + + + Classes & Libraries\NSWFL + + + Classes & Libraries\NSWFL + + + Classes & Libraries\NSWFL + + + Classes & Libraries\NSWFL + + + Classes & Libraries\NSWFL + + + Classes & Libraries\NSWFL + + + Classes & Libraries\NSWFL + + + Classes & Libraries\NSWFL + + + Classes & Libraries\NSWFL + + + Classes & Libraries\NSWFL + + + Classes & Libraries\NSWFL + + + Classes & Libraries\NSWFL + + + Classes & Libraries\NSWFL + + + Classes & Libraries\CStringBuilder + + + Classes & Libraries\CStringBuilder + + + Classes & Libraries\CMemPool + + + Classes & Libraries\CMathParser + + + Classes & Libraries\CGraph + + + Classes & Libraries\CDuration + + + Classes & Libraries\CCmdLine + + + + + SourceFiles + + + SourceFiles + + + SourceFiles + + + Dialogs + + + Dialogs + + + Dialogs + + + Classes & Libraries\NSWFL + + + Classes & Libraries\NSWFL + + + Classes & Libraries\NSWFL + + + Classes & Libraries\NSWFL + + + Classes & Libraries\NSWFL + + + Classes & Libraries\NSWFL + + + Classes & Libraries\NSWFL + + + Classes & Libraries\NSWFL + + + Classes & Libraries\NSWFL + + + Classes & Libraries\NSWFL + + + Classes & Libraries\NSWFL + + + Classes & Libraries\NSWFL + + + Classes & Libraries\NSWFL + + + Classes & Libraries\NSWFL + + + Classes & Libraries\NSWFL + + + Classes & Libraries\CStringBuilder + + + Classes & Libraries\CMemPool + + + Classes & Libraries\CMathParser + + + Classes & Libraries\CGraph + + + Classes & Libraries\CDuration + + + Classes & Libraries\CCmdLine + + + + + Resources + + + + + Resources + + + Resources + + + + + Classes & Libraries\CMathParser + + + \ No newline at end of file diff --git a/Resources/CommonControls.manifest b/Resources/CommonControls.manifest new file mode 100644 index 0000000..8e80aab --- /dev/null +++ b/Resources/CommonControls.manifest @@ -0,0 +1,14 @@ + + + + + + + + diff --git a/Resources/DiskMark.rc b/Resources/DiskMark.rc new file mode 100644 index 0000000..471fb75 --- /dev/null +++ b/Resources/DiskMark.rc @@ -0,0 +1,277 @@ +// Microsoft Visual C++ generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "afxres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (United States) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_MAIN ICON "MainIcon.ico" + + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_CONFIG DIALOGEX 0, 0, 166, 119 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Dialog" +FONT 8, "MS Sans Serif", 0, 0, 0x0 +BEGIN + COMBOBOX IDC_DISKDRIVE,54,7,105,30,CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT | WS_VSCROLL | WS_TABSTOP + EDITTEXT IDC_CHUNKSIZE,54,22,105,14,ES_AUTOHSCROLL + EDITTEXT IDC_IOS,54,39,105,14,ES_AUTOHSCROLL + EDITTEXT IDC_ITERATIONS,54,56,105,14,ES_AUTOHSCROLL + CONTROL "Allow Intermediate Caching?",IDC_ALLOWCACHING,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,54,74,105,10 + DEFPUSHBUTTON "Start",IDC_CMDOK,120,98,39,14 + PUSHBUTTON "Help",IDC_CMDHELP,7,98,39,14 + LTEXT "Disk Drive",IDC_STATIC,13,9,34,8 + LTEXT "Chunk Size",IDC_STATIC,10,25,37,8 + LTEXT "IOs",IDC_STATIC,35,42,12,8 + LTEXT "Iterations",IDC_STATIC,17,59,30,8 + PUSHBUTTON "Cancel",IDC_CMDCANCEL,77,98,39,14 +END + +IDD_MAIN DIALOGEX 0, 0, 412, 233 +STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Dialog" +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + DEFPUSHBUTTON "Run",ID_CMDMULTI,355,212,50,14 + LTEXT "Bytes per Iteration:",IDC_STATIC,137,30,64,8 + LTEXT "Allow Caching:",IDC_STATIC,14,18,48,8 + LTEXT "IOs per Iteration:",IDC_STATIC,143,18,58,8 + LTEXT "Chunk Size:",IDC_STATIC,24,30,38,8 + LTEXT "Iterations:",IDC_STATIC,301,17,35,8 + LTEXT "xxxxxxxxxxxxxxxxx",IDC_BYTESPERITERATION,204,30,58,8 + LTEXT "xxxxxxxxxxxxxxxxxx",IDC_ALLOWCACHE,64,18,58,8 + LTEXT "xxxxxxxxxxxxxxxxxxxx",IDC_IOS,204,18,58,8 + LTEXT "xxxxxxxxxxxxxxxxx",IDC_CHUNKSIZE,64,30,58,8 + LTEXT "xxxxxxxxxxxxxxxxx",IDC_ITERATIONS,338,17,58,8 + GROUPBOX "Configuration",IDC_STATIC,7,7,398,38 + LTEXT "Max:",IDC_STATIC,14,102,17,8 + LTEXT "Disk Time:",IDC_STATIC,14,62,33,8 + LTEXT "Average:",IDC_STATIC,14,82,31,8 + LTEXT "Last:",IDC_STATIC,14,72,17,8 + LTEXT "n/a",IDC_MAXWRITE,56,102,92,8 + LTEXT "n/a",IDC_DISKTIMEWRITE,56,62,92,8 + LTEXT "n/a",IDC_AVGWRITE,56,82,92,8 + LTEXT "n/a",IDC_LASTWRITE,56,72,92,8 + GROUPBOX "Write Performance",IDC_STATIC,7,50,145,69 + CONTROL "",IDC_DSKPROGRESS,"msctls_progress32",WS_BORDER,7,194,398,14 + CONTROL "",IDC_GRAPHWRITE,"Static",SS_BLACKRECT | SS_SUNKEN,157,54,248,66,WS_EX_CLIENTEDGE + CONTROL "Always on Top?",IDC_ONTOP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,215,66,10 + LTEXT "Min:",IDC_STATIC,14,92,14,8 + LTEXT "n/a",IDC_MINWRITE,56,92,92,8 + PUSHBUTTON "Help",IDC_CMDHELP,298,212,50,14 + CONTROL "",IDC_GRAPHREAD,"Static",SS_BLACKRECT | SS_SUNKEN,157,124,248,66,WS_EX_CLIENTEDGE + LTEXT "Max:",IDC_STATIC,14,172,17,8 + LTEXT "Disk Time:",IDC_STATIC,14,132,33,8 + LTEXT "Average:",IDC_STATIC,14,152,31,8 + LTEXT "Last:",IDC_STATIC,14,142,17,8 + LTEXT "n/a",IDC_MAXREAD,56,172,92,8 + LTEXT "n/a",IDC_DISKTIMEREAD,56,132,92,8 + LTEXT "n/a",IDC_AVGREAD,56,152,92,8 + LTEXT "n/a",IDC_LASTREAD,56,142,92,8 + GROUPBOX "Read Performance",IDC_STATIC,7,121,145,69 + LTEXT "Min:",IDC_STATIC,14,162,14,8 + LTEXT "n/a",IDC_MINREAD,56,162,92,8 + LTEXT "Total Dataset Size:",IDC_STATIC,274,30,62,8 + LTEXT "xxxxxxxxxxxxxxxxx",IDC_TOTALDATASETSIZE,338,30,58,8 +END + +IDD_NETLOGO DIALOGEX 0, 0, 273, 87 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "IDD_NETLOGO" +FONT 8, "MS Sans Serif", 0, 0, 0x0 +BEGIN + ICON "",IDC_ABOUTICON,9,7,21,20 + LTEXT "IDC_APPNAME",IDC_APPNAME,84,7,159,8 + LTEXT "IDC_APPVERSION",IDC_APPVERSION,84,17,159,8 + LTEXT "IDC_APPCOPYRIGHT",IDC_APPCOPYRIGHT,44,53,192,8 + CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,40,63,234,1 + DEFPUSHBUTTON "OK",IDC_OKBUTTON,220,69,50,14 + LTEXT "IDC_BUILDTIMEDATE",IDC_BUILDTIMEDATE,84,27,159,8 + LTEXT "www.NetworkDLS.com",IDC_NETLINK,84,37,159,8 + LTEXT "Web site:",IDC_STATIC,44,37,31,8 + LTEXT "Application:",IDC_STATIC,44,7,38,8 + LTEXT "Version:",IDC_STATIC,44,17,26,8 + LTEXT "Build:",IDC_STATIC,44,27,18,8 +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_CONFIG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 159 + TOPMARGIN, 7 + BOTTOMMARGIN, 112 + END + + IDD_MAIN, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 405 + TOPMARGIN, 7 + BOTTOMMARGIN, 226 + END + + IDD_NETLOGO, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 179 + VERTGUIDE, 248 + TOPMARGIN, 7 + BOTTOMMARGIN, 65 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 1,0,0,8 + PRODUCTVERSION 1,0,0,8 + FILEFLAGSMASK 0x17L +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x0L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "Comments", "Disk Benchmarking Utility" + VALUE "CompanyName", "NetworkDLS" + VALUE "FileDescription", "Disk Benchmarking Utility" + VALUE "FileVersion", "1.0.0.8" + VALUE "InternalName", "DiskMark" + VALUE "LegalCopyright", "Copyright © 2018 NetworkDLS" + VALUE "OriginalFilename", "DiskMark.exe" + VALUE "ProductName", "DiskMark" + VALUE "ProductVersion", "1.0.0.8" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Cursor +// + +IDC_HANDCURSOR CURSOR "handcurs.cur" + + +///////////////////////////////////////////////////////////////////////////// +// +// AFX_DIALOG_LAYOUT +// + +IDD_MAIN AFX_DIALOG_LAYOUT +BEGIN + 0 +END + +IDD_CONFIG AFX_DIALOG_LAYOUT +BEGIN + 0 +END + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDS_TITLECAPTION "DiskMark" + IDS_FILEVERSION "1.0.0.8" + IDS_APPCOPYRIGHT "Copyright © 2018 NetworkDLS. All rights reserved." + IDS_REGISTRYKEY "Software\\NetWorkDLS\\DiskMark" +END + +#endif // English (United States) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/Resources/MainIcon.ico b/Resources/MainIcon.ico new file mode 100644 index 0000000..bd9bccc Binary files /dev/null and b/Resources/MainIcon.ico differ diff --git a/Resources/handcurs.cur b/Resources/handcurs.cur new file mode 100644 index 0000000..2d9f827 Binary files /dev/null and b/Resources/handcurs.cur differ diff --git a/Resources/resource.h b/Resources/resource.h new file mode 100644 index 0000000..870875c --- /dev/null +++ b/Resources/resource.h @@ -0,0 +1,81 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by DiskMark.rc +// +#define IDS_TITLECAPTION 1 +#define IDS_FILEVERSION 2 +#define IDS_APPCOPYRIGHT 3 +#define IDS_REGISTRYKEY 4 +#define IDC_HANDCURSOR 100 +#define IDI_MAINICON 101 +#define IDI_MAIN 101 +#define IDD_CONFIG 102 +#define IDD_MAIN 105 +#define IDD_NETLOGO1 146 +#define IDD_NETLOGO 146 +#define IDC_TEXTBOX 1000 +#define IDC_NETLINK 1000 +#define IDC_OK 1001 +#define IDC_CMDCANCEL 1001 +#define IDC_CANCEL 1002 +#define IDC_STATICTEXT 1003 +#define IDC_CMDOK 1003 +#define IDC_ABOUTICON 1004 +#define IDC_CMDOK2 1004 +#define IDC_CMDHELP 1004 +#define IDC_APPNAME 1005 +#define IDC_ALLOWCACHE 1006 +#define IDC_APPVERSION 1006 +#define IDC_IOS 1007 +#define IDC_APPCOPYRIGHT 1007 +#define IDC_ITERATIONS 1008 +#define IDC_OKBUTTON 1008 +#define IDC_CHUNKSIZE 1009 +#define IDC_BUILDTIMEDATE 1009 +#define IDC_TOTALWORKINGSET 1010 +#define IDC_BYTESPERITERATION 1010 +#define IDC_TOTALDISKTIME 1011 +#define IDC_DISKTIME 1011 +#define IDC_DISKTIMEWRITE 1011 +#define IDC_TOTALMBWRITTEN 1012 +#define IDC_DISKTIMEREAD 1012 +#define IDC_LASTMBPERS 1013 +#define IDC_LAST 1013 +#define IDC_LASTWRITE 1013 +#define IDC_AVERAGEMBPERS 1014 +#define IDC_AVG 1014 +#define IDC_AVGWRITE 1014 +#define IDC_BESTWORSEMBPERS 1015 +#define IDC_MAX 1015 +#define IDC_MAXWRITE 1015 +#define IDC_PROGRESS1 1016 +#define IDC_DSKPROGRESS 1016 +#define IDC_BESTWORSEMBPERS2 1017 +#define IDC_MIN 1017 +#define IDC_MINWRITE 1017 +#define IDC_AVGREAD 1018 +#define IDC_LASTREAD 1019 +#define IDC_MINREAD 1020 +#define IDC_DISKDRIVE 1021 +#define IDC_ALLOWCACHING 1022 +#define IDC_MAXREAD 1022 +#define ID_CMDMULTI 1023 +#define IDC_GRAPH 1024 +#define IDC_WRITEGRAPH 1024 +#define IDC_GRAPHWRITE 1024 +#define IDC_ONTOP 1025 +#define IDC_GRAPH2 1026 +#define IDC_READGRAPH 1026 +#define IDC_GRAPHREAD 1026 +#define IDC_TOTALDATASETSIZE 1028 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 106 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1028 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/Setup/AutoUpdate.xml b/Setup/AutoUpdate.xml new file mode 100644 index 0000000..451732e --- /dev/null +++ b/Setup/AutoUpdate.xml @@ -0,0 +1,5 @@ + + http://www.NetworkDLS.com/Updates + 1.0.0.8 + 59 + diff --git a/Setup/Help File/AppLogo.gif b/Setup/Help File/AppLogo.gif new file mode 100644 index 0000000..8f6645f Binary files /dev/null and b/Setup/Help File/AppLogo.gif differ diff --git a/Setup/Help File/Config.html b/Setup/Help File/Config.html new file mode 100644 index 0000000..be60e77 --- /dev/null +++ b/Setup/Help File/Config.html @@ -0,0 +1,34 @@ + + + Configuration Dialog + + + +

+ +

Configuration Dialog

+


+ +

+The configuration dialog allows you to set the parameters of the disk benchmarking process.

+ +

+
+ +Disk Drive:
+Allows you to select the disk drive to benchmark. You can also type in a path, such as to a network share to more-or-less benchmark the speed of the connection.

+ +Chunk Size:
+The chunk size allows you to specify how much data will be written to the test file at one time.

+ +IOs:
+The IOs specifies how many times the chunk size will be written to the test file. Example: If you select a 64 KB chunk size and 1024 IOs the resulting test file will be 64 MB, meaning that the test will be comprised of writing a 64 MB file, 64K at a time in 1,024 loops. The resulting file will also be used for the read test.

+ +Iterations:
+The iterations allows you to set how many times the benchmark will be run. Each iterations will allow DiskMark to average the performance of each IO, so a higher value (25 - 200 iterations) provides more accurate results.

+ +Allow Intermediate Caching:
+When this option is selected, DiskMark will allow windows to use any available caches and to perform lazy writes. Selecting this option WILL increase performance but should remain unchecked when you want to check the speed of the drive alone.

+ + + diff --git a/Setup/Help File/Contact.Html b/Setup/Help File/Contact.Html new file mode 100644 index 0000000..6a2d097 --- /dev/null +++ b/Setup/Help File/Contact.Html @@ -0,0 +1,21 @@ + + + Making Contact + + + +

+ +

Making Contact

+


+ +

NetworkDLS is open to a broad spectrum of questions, If you have any +questions about NetworkDLS, its products, or any of its services please feel +free to e-mail: Info@NetworkDLS.Com.

+ +

Please include you name in the e-mail so we can address you respectfully.

+ +

Allow atleast 24 - 72 hours for a response.

+ + + diff --git a/Setup/Help File/Copyrights.Html b/Setup/Help File/Copyrights.Html new file mode 100644 index 0000000..c7b4789 --- /dev/null +++ b/Setup/Help File/Copyrights.Html @@ -0,0 +1,35 @@ + + + Copy rights + + + +

+ +

NetworkDLS Copyright Notice

+


+ +

All trademarks mentioned herein belong to their respective owners.

+ +

The contents of NetworkDLS are copyrighted by NetworkDLS. NetworkDLS +forbids you to distribute NetworkDLS software products, accompanying utilities, +and any documentation, etc… Unless otherwise noted.

+ +

If you are interested in using material published by NetworkDLS contact +NetworkDLS at Info@NetworkDLS.Com for information or permission licensing.

+ +

Individual documents published by NetworkDLS may contain other proprietary +notices and copyright information specific to that individual document. +Except as expressly provided, nothing contained herein shall be construed +as conferring any license or right under any copyright or other property +right of NetworkDLS or any third party.

+ +

Note that any product, process, or technology in this document may be +the subject of other Intellectual property rights reserved by NetworkDLS +and may not be licensed here under.

+ +
+Click here to view the latest NetworkDLS Copyright Notice + + + diff --git a/Setup/Help File/EULA.Html b/Setup/Help File/EULA.Html new file mode 100644 index 0000000..5f478a2 --- /dev/null +++ b/Setup/Help File/EULA.Html @@ -0,0 +1,56 @@ + + + EULA + + + +

+ +

NetworkDLS Software EULA

+


+ +

(End User License Agreement)

+ +

By installing or using NetworkDLS software products you:

+
    +
  1. Acknowledge that distribution, renting, sublicensing all or any portion of + NetworkDLS software products, NetworkDLS software registration keys, + accompanying utilities, or any documentation is expressively prohibited.
  2. +
  3. Agree not to reverse engineer, decompile, disassemble, or attempt to + change or otherwise modify any part NetworkDLS software products.
  4. +
  5. Acknowledge that some software by NetworkDLS uses strong + encryption methods that some countries place use restrictions. Verify that + you are allowed to use these applications before doing so.
  6. +
  7. Acknowledge that though some software by NetworkDLS uses strong encryption + methods, NetworkDLS DOES NOT guarantee the safety or privacy of ones data to + any extent.
  8. +
  9. Acknowledge that NetworkDLS shall not be liable for any special, indirect, + incidental, or consequential damages, including without limitation, lost + revenues or lost profits, which may result from the use of NetworkDLS + software products.
  10. +
  11. Acknowledge that NetworkDLS shall not be liable for any special, indirect, + incidental, or consequential misuse of NetworkDLS software products.
  12. +
  13. Agree to use your best efforts to prevent NetworkDLS software products + from unauthorized disclosure or use.
  14. +
  15. Acknowledge that this agreement is effective until terminated. You may + terminate it at any time by destroying the NetworkDLS software products, + including all computer programs and documentation, and erasing any copies + residing on computer equipment. This agreement also will terminate if you do + not comply with any terms or conditions of this agreement. Upon such + termination you agree to destroy the software product and erase all copies + residing on computer equipment.
  16. +
  17. Acknowledge that these materials are provided "as is" without + warranty of any kind, either express or implied, including but not limited + to, the implied warranties of merchantability, fitness for a particular + purpose, or non-infringement.
  18. +
  19. Acknowledge that this information is subject to change without notice, + does not represent a commitment on the part of NetworkDLS in the future and + that NetworkDLS assumes no responsibility for errors or omissions in these + materials.
  20. +
+ +
+Click here to view the latest NetworkDLS EULA + + + diff --git a/Setup/Help File/Help.chm b/Setup/Help File/Help.chm new file mode 100644 index 0000000..9bda3b9 Binary files /dev/null and b/Setup/Help File/Help.chm differ diff --git a/Setup/Help File/Help.hhp b/Setup/Help File/Help.hhp new file mode 100644 index 0000000..e82e556 --- /dev/null +++ b/Setup/Help File/Help.hhp @@ -0,0 +1,16 @@ +[OPTIONS] +Auto Index=Yes +Compatibility=1.1 or later +Compiled file=Help.chm +Contents file=Table of Contents.hhc +Default topic=Welcome.Html +Display compile progress=Yes +Enhanced decompilation=Yes +Full-text search=Yes +Index file=Index.hhk +Language=0x409 English (United States) +Title=DiskMark + + +[INFOTYPES] + diff --git a/Setup/Help File/Index.hhk b/Setup/Help File/Index.hhk new file mode 100644 index 0000000..c0ba08a --- /dev/null +++ b/Setup/Help File/Index.hhk @@ -0,0 +1,9 @@ + + + + + + +
    +
+ diff --git a/Setup/Help File/Known Bugs.Html b/Setup/Help File/Known Bugs.Html new file mode 100644 index 0000000..80e67de --- /dev/null +++ b/Setup/Help File/Known Bugs.Html @@ -0,0 +1,22 @@ + + + Known Bugs + + + +

+ +

Known Bugs

+


+ +

DiskMark would not of been released if there were any "known" bugs.

+ +

Windows 95 kernel does not have sufficient threading support to run +DiskMark, therefore DiskMark WILL NOT run on a windows 95 platform.

+ +

If you have found error in DiskMark please see +Reporting Bugs +under the "Contact" section in this help file.

+ + + diff --git a/Setup/Help File/PreLicense.html b/Setup/Help File/PreLicense.html new file mode 100644 index 0000000..9eb274a --- /dev/null +++ b/Setup/Help File/PreLicense.html @@ -0,0 +1,70 @@ + + + Pre-release EULA + + + +

+ +

NetworkDLS Pre-release EULA

+


+ +

+ INTRODUCTION
+

+ By using the software made available in the pre-release section of a NetworkDLS Web Site you agree to participate in NetworkDLS's pre-release program and become a Tester undertaking to comply with the following terms and conditions: +
+

+

+ TEST AND REPORT
+

+ Tester agrees to report to NetworkDLS any flaws, errors, bugs or other problems with the Product. Such reports are made by sending an email to Beta@NetworkDLS.Com Tester understands that prompt and accurate reports are of great value to NetworkDLS, and promises best efforts to provide such reports. +
+

+

+ CONFIDENTIAL INFORMATION
+

+ Tester acknowledges that as a participant in NetworkDLS's pre-release program, Tester will be given confidential trade secret information. Specifically, Tester agrees that the characteristics, performance, and potential shipment date of the Product, the Product itself (including all software and any documentation) and this Agreement are all confidential information and constitute trade secrets of NetworkDLS. (This information is referred to as "Confidential Information".) Tester acknowledges that disclosure of Confidential Information could cause serious harm to NetworkDLS and, as an essential term and condition of participating in the test, agrees not to disclose Confidential Information to any person or organization until the earlier of (a) the date on which NetworkDLS first makes this information publicly available, or (b) the date on which NetworkDLS ships the Product to the general public, or (c) twelve months after the date of this Agreement ("Non-Disclosure Period"). During the Non-Disclosure Period, Tester agrees not to disseminate, publish, or otherwise communicate any review, account, description or other information concerning the Product, except directly to NetworkDLS or with the express prior written consent of NetworkDLS. Tester agrees not to decompile or reverse engineer the Program at any time during or after the pre-release test. If Tester is a company, Tester agrees to take all reasonable steps to see that its employees, officers, and agents guard against and prevent disclosure of Confidential Information and to act in accordance with the confidentiality provisions of this Agreement. Tester further agrees that information will be available to its employees, officers and agents strictly on a "need-to-know" basis. +
+

+

+ OWNERSHIP OF THE PRODUCT
+

+ Tester acknowledges that the Product, its copyright, its trademark, and any other intellectual property rights in the Product is owned by NetworkDLS. Tester acquires no ownership of the Product from this Agreement and no right to use the Product beyond the terms of the pre-release agreement. Tester acquires no right to copy the Product, prepare derivative works or participate in development, manufacturing, marketing, and maintenance of the Product. +
+

+

+ TESTER MAY NOT COPY THE PRODUCT; LIMITED LICENSE
+

+ Tester may not provide any copy of the product to any other person. Tester may not modify the Product in any way. Tester may install the Product on one hard disk for testing at Tester's sole risk. Tester has a limited license to use the Product solely for the purpose of the pre-release program. +
+

+

+ RISKS FROM THE PRODUCT
+

+ Tester understands that the Product may have errors and may produce unexpected results. Tester agrees that any use of the pre-release version of the Product, whether as part of this pre-release test or otherwise, will be entirely at Tester's own risk. Tester agrees to backup data and take other appropriate measures to protect programs and data. Tester agrees not to allow any third party to use the Product on Tester's hardware or otherwise and to indemnify and hold NetworkDLS harmless from any damages or claims arising from use by any third party. +
+

+

+

+ THE PRODUCT AND ANY SUPPORT FROM NetworkDLS ARE PROVIDED "AS IS" AND WITHOUT WARRANTY, EXPRESS OR IMPLIED. NetworkDLS SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL NetworkDLS BE LIABLE FOR ANY DAMAGES, INCLUDING BUT NOT LIMITED TO ANY LOST PROFITS, LOST SAVINGS OR ANY INCIDENTAL OR CONSEQUENTIAL DAMAGES, WHETHER RESULTING FROM IMPAIRED OR LOST DATA, SOFTWARE OR COMPUTER FAILURE OR ANY OTHER CAUSE, EVEN IF NetworkDLS IS ADVISED OF THE POSSIBILITY OF SUCH DAMAGES, OR FOR ANY OTHER CLAIM BY TESTER OR FOR ANY THIRD-PARTY CLAIM. +
+

+

+ NO OBLIGATION ON BEHALF OF NetworkDLS ON ACCOUNT OF INFORMATION PROVIDED BY TESTER
+

+ NetworkDLS agrees that any information that Tester indicates in writing to be confidential or proprietary to Tester or others, will be treated as confidential information by NetworkDLS, is licensed to NetworkDLS for purposes of, and will only be used for, testing of the NetworkDLS product and not be disclosed to any third party. Tester agrees that the contents of all oral and written reports to NetworkDLS relating to performance of the Product, and any other information, ideas, concepts, and know-how provided by Tester (including corrections to problems in the Product and documentation) become the property of NetworkDLS and may be used by NetworkDLS for all business purposes, without any accounting or any payment to Tester. Under no circumstances will NetworkDLS become liable for any payment to Tester for any information that Tester provides, whether concerning the Product or otherwise, no matter how such information is used or exploited by NetworkDLS or anyone else. +
+

+

+ GENERAL PROVISIONS
+

+ This Agreement does not authorize Tester to use NetworkDLS's names or trademarks or the fact of the pre-release test for any publicity or marketing or other activities. Neither Tester nor NetworkDLS has any obligation to purchase anything under this Agreement. No agency, partnership, joint venture, or other joint relationship is created by this Agreement. +
+

+ +
+Click here to view the latest NetworkDLS pre-release EULA + + + diff --git a/Setup/Help File/Privacy Policy.html b/Setup/Help File/Privacy Policy.html new file mode 100644 index 0000000..f2d2319 --- /dev/null +++ b/Setup/Help File/Privacy Policy.html @@ -0,0 +1,46 @@ + + + Privacy Policy + + + +

+ +

NetworkDLS Privacy Policy

+


+ +NetworkDLS shares your concerns about privacy on the Internet.
+In order to better protect your privacy, NetworkDLS has provided this notice explaining its online information practices and the choices you can make about the way your information is collected and used on the Site. Furthermore, this Privacy Policy, being part of the Terms, works in conjunction with the Terms and Conditions of Use, but does not modify or supercede it. +

+NetworkDLS's Collection and Use of Your Information
+In the course of using the Site, NetworkDLS may ask you for your name, e-mail address, postal address, telephone number, fax number as well as other relevant information. NetworkDLS also may collect certain non-personally identifiable information when you visit many of our web pages such as the type of browser you are using (e.g., Netscape, Internet Explorer), the type of operating system you are using, (e.g., Windows '98 or Mac OS), the domain name of your Internet service provider (e.g., America Online, Earthlink), aggregate data about the number of visits to the Site and/or aggregate data about the pages visited. +

+How NetworkDLS Uses the Information
+NetworkDLS uses the non-personally identifiable information ("Aggregate Data") to improve the design and content of the Site and to enable NetworkDLS to personalize your Internet experience. NetworkDLS may use the Aggregate Data to analyze Site usage as well as create services and/or products to fit your needs. Also, NetworkDLS shares this Aggregate Data with NetworkDLS's related entities, advertisers, partners and/or other third party vendors. NetworkDLS shall own such Aggregate Data and maintain copies of such as part of its records. +

+Except as otherwise indicated, NetworkDLS uses the personally identifiable information ("Personal Information") you provide about yourself: (a) to respond to any of your inquiries or questions about our products and/or services; (b) for internal marketing purposes; (c) to provide you additional and updated information, materials and other advertisements regarding NetworkDLS's products and/or services; (d) to offer you other materials and/or information that NetworkDLS believes may be of interest to you; (e) to cooperate with government officials or parties in litigation under process of law, or as otherwise required by law; (f) to protect the security or integrity of the Site; (g) to protect against a threat of safety or destruction of property; and/or (h) to protect against legal liability. In all cases, however, NetworkDLS's agents, employees and contractors who have access to Personal Information are required to protect this information in a manner that is consistent with this Privacy Policy. Furthermore, NetworkDLS encourages all its business partners to adopt and adhere to standards of protection consistent with this Privacy Policy. NetworkDLS will not use the Personal Information, except as set forth herein, without your permission; provided, however, NetworkDLS shall own all such Personal Information and maintain copies of such as part of its records. If you do not wish to receive any such information or to allow NetworkDLS the right to use your personally identifiable information as described, please contact NetworkDLS in the manner identified in the "Opt-Out" section below. The Aggregate Data and Personal Information may be transferred, distributed or sold as part of NetworkDLS or its assets. +

+Opt-Out
+You may choose not to receive such information and/or to allow NetworkDLS to use your information in the manner described above by simply notifying NetworkDLS directly by using the Contact Page. Upon receipt and processing of an "opt out" request, NetworkDLS will, within its commercially reasonable amount of time, remove your information from any future marketing communications. +

+Security; No Liability
+NetworkDLS has implemented security measures to help protect against the risk of loss, misuse and alteration of any information under NetworkDLS's control. Nevertheless, such security measures may not prevent all loss, misuse or alteration of information on the Site, and NetworkDLS is not responsible for any damages or liabilities relating to any such security failures. You understand that data and communications, including e-mail and other electronic communications, may be accessed by unauthorized third parties when communicated over the Internet. Furthermore, the Site contains links to other web sites. NetworkDLS is not responsible for nor can NetworkDLS ensure the privacy practices or content of such other sites. +

+IP Addresses and Cookies
+Like other web sites, NetworkDLS uses your IP address to help diagnose problems with NetworkDLS's servers, to administer the Site and for security purposes. +

+"Cookies" are pieces of data sent from a Web server through a Web browser, which writes a file on your local PC. This file enables a Web server to identify users that visit a site hosted by that server. NetworkDLS may use Cookies in order to identify you to our site so that NetworkDLS can provide more customized information and services to you. In addition, our site may contain advertisements that may contain Cookies. In general, if you choose, you can disable the use of Cookies by reviewing your browser's preferences and options. If you disable the use of Cookies, it will make some portions of our site inoperable. +

+Modification of Privacy Policy
+NetworkDLS may change this Privacy Policy at any time, consistent with the terms set forth in the Terms and Conditions of Use, by posting the changed or amended Privacy Policy on the Site. Your continued viewing of or use of this Site following the posting of any changes to this Privacy Policy will signify your assent to any such changes or amendments. +

+How to Contact NetworkDLS for Any Reason
+You may contact NetworkDLS with questions or comments regarding this Privacy Policy, updating any personally identifiable information or anything else related to NetworkDLS and/or this Site by using the Contact Page +

+ + +
+Click here to view the latest NetworkDLS privacy policy + + + diff --git a/Setup/Help File/Progress.html b/Setup/Help File/Progress.html new file mode 100644 index 0000000..3ab24ae --- /dev/null +++ b/Setup/Help File/Progress.html @@ -0,0 +1,31 @@ + + + Progress Dialog + + + +

+ +

Progress Dialog

+


+ +

+The progress dialog summarizes the configuration you have selected and displays the progress and resulting disk performance information.

+ +

+
+ +Disk Time (seconds):
+The total time DiskMark as spent performing disk actions over the entire duration of the test.

+ +Last:
+The megabytes per second rating of the last benchmark iteration.

+ +Average:
+The average megabytes per seconds over the entire duration of the test.

+ +Min/Max (MB/s):
+The "min" and "max" are the two extremes which have been encountered over the entire duration of the test.

+ + + diff --git a/Setup/Help File/Reporting Bugs.Html b/Setup/Help File/Reporting Bugs.Html new file mode 100644 index 0000000..fd8b138 --- /dev/null +++ b/Setup/Help File/Reporting Bugs.Html @@ -0,0 +1,31 @@ + + + Reporting Bugs + + + +

+ +

Reporting Bugs

+


+ +

DiskMark has been tested on Windows 98, Me, NT 4.0, & W2k.

+ +

In the past releases of DiskMark few bugs have been reported but all +found have been fixed. If DiskMark crashes and gives you an error, The +error message should be followed by an error code (Error: xx). Please send +the error code, a detailed description of what you were doing when the +error occurred, what operating system you are using to: Tech@NetworkDLS.Com. +

+ +

Also, if you notice an error or a system malfunction that seems to be +originating from DiskMark please send a detailed description of the problem +and why you think its originating from DiskMark to: Info@NetworkDLS.Com. +

+ +

Please include you name in the e-mail so we can address you respectfully.

+ +

Allow atleast 24 - 72 hours for a response.

+ + + diff --git a/Setup/Help File/Requesting Features.Html b/Setup/Help File/Requesting Features.Html new file mode 100644 index 0000000..9d143f4 --- /dev/null +++ b/Setup/Help File/Requesting Features.Html @@ -0,0 +1,27 @@ + + + Requesting Features + + + +

+ +

Requesting Features

+


+ +

+If you have any suggestions that you feel could aid NetworkDLS or if +there are some missing features that you would like to see implemented +into future versions of programs published by NetworkDLS feel free to send +your ideas to Tech@NetworkDLS.Com. +
+Your ideas will be greatly considered and could be added to the NetworkDLS +task list in the future. Thank You. +

+ +

Please include you name in the e-mail so we can address you respectfully.

+ +

Allow atleast 24 - 72 hours for a response.

+ + + diff --git a/Setup/Help File/Require.html b/Setup/Help File/Require.html new file mode 100644 index 0000000..214c80b --- /dev/null +++ b/Setup/Help File/Require.html @@ -0,0 +1,52 @@ + + + Requirements + + + +

+ +

Requirements

+


+ +

Minimum/Recommended Specs.

+ +

Windows 95 kernel does not have sufficient threading support to run +DiskMark, therefore DiskMark WILL NOT run on a windows 95 platform.

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ResourceMinimumRecommended
Processor66 MHz800+ MHz
RAM2 MB16+ MB
Harddrive2 MB24+ MB
+ + + diff --git a/Setup/Help File/Sending Comments.Html b/Setup/Help File/Sending Comments.Html new file mode 100644 index 0000000..b182838 --- /dev/null +++ b/Setup/Help File/Sending Comments.Html @@ -0,0 +1,21 @@ + + + Sending Comments + + + +

+ +

Sending Comments

+


+ +

If you have any comments about NetworkDLS, its products, or any of its services please +please feel free to send them to Info@NetworkDLS.Com. +The support of our users is greatly appreciated.

+ +

Please include you name in the e-mail so we can address you respectfully.

+ +

Allow atleast 24 - 72 hours for a response.

+ + + diff --git a/Setup/Help File/Standards.txt b/Setup/Help File/Standards.txt new file mode 100644 index 0000000..dd94bc3 --- /dev/null +++ b/Setup/Help File/Standards.txt @@ -0,0 +1,4 @@ +AppLogo.jpg + Font Name : Garamond + Font Size : 24 + Font Color : 000000 diff --git a/Setup/Help File/Table of Contents.hhc b/Setup/Help File/Table of Contents.hhc new file mode 100644 index 0000000..94ad738 --- /dev/null +++ b/Setup/Help File/Table of Contents.hhc @@ -0,0 +1,90 @@ + + + + + + +
    +
  • + + +
      +
    • + + + +
    • + + + +
    +
  • + + +
      +
    • + + + +
    • + + + +
    +
  • + + +
      +
    • + + + +
    • + + + +
    • + + + +
    • + + + +
    +
  • + + +
      +
    • + + + +
    • + + + +
    +
  • + + +
      +
    • + + + +
    • + + + +
    • + + + +
    • + + + +
    +
+ diff --git a/Setup/Help File/Version Revisions.Html b/Setup/Help File/Version Revisions.Html new file mode 100644 index 0000000..0a887ee --- /dev/null +++ b/Setup/Help File/Version Revisions.Html @@ -0,0 +1,20 @@ + + + Version Revisions + + + +

+ +

Version Revisions

+


+ +
    +
  • DiskMark (1.0.0.0)
  • +
      +
    • (1) Initial Beta Release.
    • +
    +
+ + + diff --git a/Setup/Help File/Welcome.Html b/Setup/Help File/Welcome.Html new file mode 100644 index 0000000..7a38b06 --- /dev/null +++ b/Setup/Help File/Welcome.Html @@ -0,0 +1,28 @@ + + + Welcome to DiskMark + + + +

+ +

Welcome to DiskMark

+


+ + +

Welcome to the help file for DiskMark. Here you should find the answer +to any problem or question that could arise.

+ +

+Besure to read and fully understand the NetworkDLS +Software License and +Copyright Notice. +

+ +

+If you have a question or a problem that is not addressed herein visit +the contact page in this help file. +

+ + + diff --git a/Setup/Help File/What is.Html b/Setup/Help File/What is.Html new file mode 100644 index 0000000..762c8b0 --- /dev/null +++ b/Setup/Help File/What is.Html @@ -0,0 +1,18 @@ + + + What is DiskMark + + + +

+ +

What is DiskMark?

+


+ +

+DiskMark is a small utility that allows you to benchmark your disks and hard drives performance. +It allows you to specify many advanced options to determine how your drives perform best and to determine the typical operating performance. +

+ + + diff --git a/Setup/Setup32.Iss b/Setup/Setup32.Iss new file mode 100644 index 0000000..d04de67 --- /dev/null +++ b/Setup/Setup32.Iss @@ -0,0 +1,42 @@ +[Setup] +;-- Main Setup Information + AppName = DiskMark + AppVerName = DiskMark 1.0.0.8 + AppCopyright = Copyright © 1995-2018 NetworkDLS. + DefaultDirName = {pf}\NetworkDLS\DiskMark + DefaultGroupName = NetworkDLS\DiskMark + UninstallDisplayIcon = {app}\DiskMark.Exe + PrivilegesRequired = PowerUser + Uninstallable = Yes + AppMutex = DiskMark + WizardImageFile = /../../@Resources/Setup/LgSetup.bmp + WizardSmallImageFile = /../../@Resources/Setup/SmSetup.bmp + Compression = ZIP/9 + ChangesAssociations = Yes + OutputBaseFilename = DiskMark32 + MinVersion = 0.0,5.0 + +;-- Windows 2000 & XP (Support Dialog) + AppPublisher = NetworkDLS + AppPublisherURL = http://www.NetworkDLS.com/ + AppUpdatesURL = http://www.NetworkDLS.com/ + AppVersion = 1.0.0.8 + +[Files] + Source: "..\..\@AutoUpdate\Win32\Release\AutoUpdate.Exe"; DestDir: "{app}"; Flags: RestartReplace; + Source: "AutoUpdate.xml"; DestDir: "{app}"; Flags: IgnoreVersion; + Source: "..\Win32\Release\DiskMark.Exe"; DestDir: "{app}"; Flags: IgnoreVersion; + Source: "Help File\Help.Chm"; DestDir: "{app}"; Flags: IgnoreVersion; + +[Icons] + Name: "{group}\DiskMark"; Filename: "{app}\DiskMark.Exe"; + +[Registry] + Root: HKLM; Subkey: "Software\NetworkDLS\DiskMark"; ValueType: string; ValueName: "ChunkSize"; ValueData:"1024 * 64"; + Root: HKLM; Subkey: "Software\NetworkDLS\DiskMark"; ValueType: string; ValueName: "IOS"; ValueData:"128"; + Root: HKLM; Subkey: "Software\NetworkDLS\DiskMark"; ValueType: string; ValueName: "Iterations"; ValueData:"320"; + Root: HKLM; Subkey: "Software\NetworkDLS\DiskMark"; ValueType: DWORD; ValueName: "AllowCache"; ValueData:"0"; + +[Run] + Filename: "{app}\DiskMark.Exe"; Description: "Launch DiskMark now?"; Flags: PostInstall NoWait shellexec; + diff --git a/Setup/Setup64.Iss b/Setup/Setup64.Iss new file mode 100644 index 0000000..f425505 --- /dev/null +++ b/Setup/Setup64.Iss @@ -0,0 +1,44 @@ +[Setup] +;-- Main Setup Information + AppName = DiskMark + AppVerName = DiskMark 1.0.0.8 + AppCopyright = Copyright © 1995-2018 NetworkDLS. + DefaultDirName = {pf}\NetworkDLS\DiskMark + DefaultGroupName = NetworkDLS\DiskMark + UninstallDisplayIcon = {app}\DiskMark.Exe + PrivilegesRequired = PowerUser + Uninstallable = Yes + AppMutex = DiskMark + WizardImageFile = /../../@Resources/Setup/LgSetup.bmp + WizardSmallImageFile = /../../@Resources/Setup/SmSetup.bmp + Compression = ZIP/9 + ChangesAssociations = Yes + OutputBaseFilename = DiskMark64 + MinVersion = 0.0,5.0 + ArchitecturesInstallIn64BitMode = x64 + ArchitecturesAllowed = x64 + +;-- Windows 2000 & XP (Support Dialog) + AppPublisher = NetworkDLS + AppPublisherURL = http://www.NetworkDLS.com/ + AppUpdatesURL = http://www.NetworkDLS.com/ + AppVersion = 1.0.0.8 + +[Files] + Source: "..\..\@AutoUpdate\x64\Release\AutoUpdate.Exe"; DestDir: "{app}"; Flags: RestartReplace; + Source: "AutoUpdate.xml"; DestDir: "{app}"; Flags: IgnoreVersion; + Source: "..\x64\Release\DiskMark.Exe"; DestDir: "{app}"; Flags: IgnoreVersion; + Source: "Help File\Help.Chm"; DestDir: "{app}"; Flags: IgnoreVersion; + +[Icons] + Name: "{group}\DiskMark"; Filename: "{app}\DiskMark.Exe"; + +[Registry] + Root: HKLM; Subkey: "Software\NetworkDLS\DiskMark"; ValueType: string; ValueName: "ChunkSize"; ValueData:"1024 * 64"; + Root: HKLM; Subkey: "Software\NetworkDLS\DiskMark"; ValueType: string; ValueName: "IOS"; ValueData:"128"; + Root: HKLM; Subkey: "Software\NetworkDLS\DiskMark"; ValueType: string; ValueName: "Iterations"; ValueData:"320"; + Root: HKLM; Subkey: "Software\NetworkDLS\DiskMark"; ValueType: DWORD; ValueName: "AllowCache"; ValueData:"0"; + +[Run] + Filename: "{app}\DiskMark.Exe"; Description: "Launch DiskMark now?"; Flags: PostInstall NoWait shellexec; + diff --git a/Source/Entry.Cpp b/Source/Entry.Cpp new file mode 100644 index 0000000..a3c0d5a --- /dev/null +++ b/Source/Entry.Cpp @@ -0,0 +1,70 @@ +#ifndef _ENTRY_CPP +#define _ENTRY_CPP +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +#define _CRT_SECURE_NO_WARNINGS + +#include +#include +#include + +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +#include "../Resources/Resource.H" + +#include "../../@Libraries//NSWFL/NSWFL.H" + +#include "Entry.H" +#include "Init.H" +#include "Routines.H" + +#include "../Dialogs/ConfigDlg.H" +#include "../Dialogs/MainDlg.H" + +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +HINSTANCE ghAppInstance = NULL; + +char gsAppCopyRight[64]; +char gsFileVersion[32]; +char gsTitleCaption[64]; +char gsRegistryKey[255]; + +char gsLastChunkSize[1024]; +char gsLastIOS[1024]; +char gsLastIterations[1024]; + +CMemPool gMem; //The global memory object. + +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef _DEBUG +int main(int argc, char *argv[]) +#else +int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevious, LPSTR sCmdLine, int iCmdShow) +#endif +{ + #ifdef _DEBUG + ghAppInstance = GetModuleHandle(NULL); + #else + ghAppInstance = hInstance; + #endif + + if(!InitializeApp()) + { + return 1; + } + + DialogBox(ghAppInstance, MAKEINTRESOURCE(IDD_MAIN), NULL, MainDialog); + + if(!UninitializeApp()) + { + return 1; + } + + return 0; +} + +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +#endif + diff --git a/Source/Entry.H b/Source/Entry.H new file mode 100644 index 0000000..d7d73c1 --- /dev/null +++ b/Source/Entry.H @@ -0,0 +1,24 @@ +#ifndef _ENTRY_H +#define _ENTRY_H +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +#include "../../@Libraries//CMempool/CMemPool.H" + +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +extern HINSTANCE ghAppInstance; + +extern char gsAppCopyRight[64]; +extern char gsFileVersion[32]; +extern char gsTitleCaption[64]; +extern char gsRegistryKey[255]; + +extern char gsLastChunkSize[1024]; +extern char gsLastIOS[1024]; +extern char gsLastIterations[1024]; + +extern CMemPool gMem; + +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +#endif + diff --git a/Source/Init.Cpp b/Source/Init.Cpp new file mode 100644 index 0000000..936deca --- /dev/null +++ b/Source/Init.Cpp @@ -0,0 +1,82 @@ +#ifndef _INIT_CPP +#define _INIT_CPP +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +#include +#include +#include +#include +#include + +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +#include "../Resources/Resource.H" + +#include "../../@Libraries/NSWFL/NSWFL.H" + +#include "Init.H" +#include "Entry.H" +#include "Routines.H" + +#include "../Dialogs/MainDlg.H" + +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +using namespace NSWFL::Registry; + +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +bool InitializeApp(void) +{ + if(!gMem.Initialize()) + { + return false; + } + + LoadString(ghAppInstance, IDS_APPCOPYRIGHT, gsAppCopyRight, sizeof(gsAppCopyRight)); + LoadString(ghAppInstance, IDS_FILEVERSION, gsFileVersion, sizeof(gsFileVersion)); + LoadString(ghAppInstance, IDS_TITLECAPTION, gsTitleCaption, sizeof(gsTitleCaption)); + LoadString(ghAppInstance, IDS_REGISTRYKEY, gsRegistryKey, sizeof(gsRegistryKey)); + + DWORD dwsRegValueSz = 0; + + dwsRegValueSz = sizeof(gsDrive); + if(!Get_StringRegistryValue(HKEY_LOCAL_MACHINE, gsRegistryKey, "LastDrive", gsDrive, dwsRegValueSz)) + { + strcpy_s(gsDrive, sizeof(gsDrive), ""); + } + + dwsRegValueSz = sizeof(gsLastChunkSize); + if(!Get_StringRegistryValue(HKEY_LOCAL_MACHINE, gsRegistryKey, "ChunkSize", gsLastChunkSize, dwsRegValueSz)) + { + strcpy_s(gsLastChunkSize, sizeof(gsLastChunkSize), "1024 * 64"); + } + + dwsRegValueSz = sizeof(gsLastIOS); + if(!Get_StringRegistryValue(HKEY_LOCAL_MACHINE, gsRegistryKey, "IOS", gsLastIOS, dwsRegValueSz)) + { + strcpy_s(gsLastIOS, sizeof(gsLastIOS), "128"); + } + + dwsRegValueSz = sizeof(gsLastIterations); + if(!Get_StringRegistryValue(HKEY_LOCAL_MACHINE, gsRegistryKey, "Iterations", gsLastIterations, dwsRegValueSz)) + { + strcpy_s(gsLastIterations, sizeof(gsLastIterations), "320"); + } + + gbUseWriteCache = Get_BOOLRegistryValue(HKEY_LOCAL_MACHINE, gsRegistryKey, "AllowCache"); + + return true; +} + +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +bool UninitializeApp(void) +{ + gMem.Destroy(); + return true; +} + +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +#endif + diff --git a/Source/Init.H b/Source/Init.H new file mode 100644 index 0000000..e771251 --- /dev/null +++ b/Source/Init.H @@ -0,0 +1,10 @@ +#ifndef _INIT_H +#define _INIT_H +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +bool InitializeApp(void); +bool UninitializeApp(void); + +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +#endif + diff --git a/Source/Routines.Cpp b/Source/Routines.Cpp new file mode 100644 index 0000000..0b0b46d --- /dev/null +++ b/Source/Routines.Cpp @@ -0,0 +1,106 @@ +#ifndef _ROUTINES_CPP +#define _ROUTINES_CPP +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +#include +#include +#include +#include +#include + +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +#include "../Resources/Resource.H" +#include "../../@Libraries//NSWFL/NSWFL.H" + +#include "Init.H" +#include "Entry.H" +#include "Routines.H" + +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +using namespace NSWFL::File; + +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +void OpenHelp(HWND hWnd) +{ + char sFileName[MAX_PATH]; + char sPath[MAX_PATH]; + char sDrive[MAX_PATH]; + char sDir[MAX_PATH]; + + if(GetModuleFileName(ghAppInstance, sFileName, sizeof(sFileName))) + { + _splitpath_s(sFileName, sDrive, sizeof(sDrive), sDir, sizeof(sDir), NULL, 0, NULL, 0); + _makepath_s(sFileName, sizeof(sFileName), sDrive, sDir, "help", ".chm"); + _makepath_s(sPath, sizeof(sPath), sDrive, sDir, NULL, NULL); + + if(ShellExecute(hWnd, "OPEN", sFileName, NULL, sPath, SW_SHOWDEFAULT) <= (HINSTANCE)32) + { + MessageBox(hWnd, "Cannot locate the Help File.", gsTitleCaption, MB_ICONERROR); + } + } +} + +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +int SectorAlign(const char *sDrive, int iBufferSize) +{ + char sFileName[MAX_PATH]; + + sprintf_s(sFileName, sizeof(sFileName), + "%s\\%d-%d.txt", + sDrive, iBufferSize, GetTickCount()); + CorrectReversePath(sFileName, sizeof(sFileName)); + + HANDLE hFile = CreateFile( + sFileName, + GENERIC_WRITE, + 0, + NULL, + CREATE_ALWAYS, + FILE_FLAG_WRITE_THROUGH | FILE_FLAG_NO_BUFFERING, + NULL + ); + + if((iBufferSize % 512) != 1) + { + if(iBufferSize > 512) + { + iBufferSize -= iBufferSize % 512; + } + else { + iBufferSize = 512; + } + } + + DWORD dwBytesWritten = 0; + DWORD dwBytesToWrite = iBufferSize; + + char *sBuffer = (char *) calloc(iBufferSize + 1025, 1); + + for(DWORD iTries = 0; iTries < 1024; iTries++) + { + if(WriteFile(hFile, sBuffer, dwBytesToWrite, &dwBytesWritten, NULL)) + { + if(dwBytesWritten == dwBytesToWrite) + { + CloseHandle(hFile); + DeleteFile(sFileName); + free(sBuffer); + return (int)dwBytesToWrite; + } + } + + dwBytesToWrite++; + } + + CloseHandle(hFile); + DeleteFile(sFileName); + free(sBuffer); + return -1; +} + +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +#endif diff --git a/Source/Routines.H b/Source/Routines.H new file mode 100644 index 0000000..fd95875 --- /dev/null +++ b/Source/Routines.H @@ -0,0 +1,10 @@ +#ifndef _ROUTINES_H +#define _ROUTINES_H +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +void OpenHelp(HWND hWnd); +int SectorAlign(const char *sDrive, int iBufferSize); + +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +#endif +