30 if (
Bar->StepCount == 0)
33 Bar->Progress = ((100 *
Bar->CurrentStep + (
Bar->StepCount / 2)) /
Bar->StepCount);
36 if (
Bar->ProgressFormatText &&
37 (AlwaysUpdate || (
Bar->Progress != OldProgress)) )
40 Bar->ProgressFormatText,
Bar->Progress);
57 coPos.
Y =
Bar->Top + 1;
65 coPos.
X =
Bar->Left + 1;
66 coPos.
Y =
Bar->Top + 1;
69 Bar->Right -
Bar->Left - 1,
75 coPos.
Y =
Bar->Top + 1;
103 coPos.
Y =
Bar->Bottom;
111 coPos.
X =
Bar->Left + 1;
112 coPos.
Y =
Bar->Bottom;
115 Bar->Right -
Bar->Left - 1,
120 coPos.
X =
Bar->Right;
121 coPos.
Y =
Bar->Bottom;
140 coPos.
Y =
Bar->Top + 1;
148 coPos.
X =
Bar->Left + 1;
149 coPos.
Y =
Bar->Top + 1;
152 Bar->Right -
Bar->Left - 1,
157 coPos.
X =
Bar->Right;
158 coPos.
Y =
Bar->Top + 1;
176 coPos.
X =
Bar->Right;
186 coPos.
Y =
Bar->Bottom;
194 coPos.
X =
Bar->Left + 1;
195 coPos.
Y =
Bar->Bottom;
198 Bar->Right -
Bar->Left - 1,
203 coPos.
X =
Bar->Right;
204 coPos.
Y =
Bar->Bottom;
227 BarBorder.
Right += 5;
236 if (
Bar->DescriptionText)
240 if (
Bar->UpdateProgressProc &&
253 coPos.
X =
Bar->Left + 1;
254 for (coPos.
Y =
Bar->Top + 2; coPos.
Y <=
Bar->Bottom - 1; coPos.
Y++)
298 Bar->TextTop = TextTop;
299 Bar->TextRight = TextRight;
303 Bar->DoubleEdge = DoubleEdge;
304 Bar->ProgressColour = ProgressColour;
305 Bar->DescriptionText = DescriptionText;
306 Bar->ProgressFormatText = ProgressFormatText;
308 Bar->UpdateProgressProc = UpdateProgressProc;
351 Bar->CurrentStep = 0;
352 Bar->StepCount = StepCount;
377 if (Step >
Bar->StepCount)
380 Bar->CurrentStep = Step;
383 if (
Bar->UpdateProgressProc &&
396 NewPos = (((
Bar->Width - 2) * 2 *
Bar->CurrentStep + (
Bar->StepCount / 2)) /
Bar->StepCount);
399 if (
Bar->Pos != NewPos)
403 for (coPos.
Y =
Bar->Top + 2; coPos.
Y <=
Bar->Bottom - 1; coPos.
Y++)
405 coPos.
X =
Bar->Left + 1;
411 coPos.
X +=
Bar->Pos / 2;
423 if (coPos.
X <=
Bar->Right - 1)
427 Bar->Right - coPos.
X,
ACPI_SIZE strlen(const char *String)
BOOL WINAPI WriteConsoleOutputCharacterA(HANDLE hConsoleOutput, IN LPCSTR lpCharacter, IN DWORD nLength, IN COORD dwWriteCoord, OUT LPDWORD lpNumberOfCharsWritten)
BOOL WINAPI FillConsoleOutputCharacterA(IN HANDLE hConsoleOutput, IN CHAR cCharacter, IN DWORD nLength, IN COORD dwWriteCoord, OUT LPDWORD lpNumberOfCharsWritten)
BOOL WINAPI FillConsoleOutputAttribute(IN HANDLE hConsoleOutput, IN WORD wAttribute, IN DWORD nLength, IN COORD dwWriteCoord, OUT LPDWORD lpNumberOfAttrsWritten)
VOID ProgressSetStep(IN PPROGRESSBAR Bar, IN ULONG Step)
static BOOLEAN NTAPI UpdateProgressPercentage(IN PPROGRESSBAR Bar, IN BOOLEAN AlwaysUpdate, OUT PSTR Buffer, IN SIZE_T cchBufferSize)
static VOID DrawThickBorder(IN PPROGRESSBAR Bar)
VOID ProgressNextStep(IN PPROGRESSBAR Bar)
PPROGRESSBAR CreateProgressBarEx(IN SHORT Left, IN SHORT Top, IN SHORT Right, IN SHORT Bottom, IN SHORT TextTop, IN SHORT TextRight, IN BOOLEAN DoubleEdge, IN SHORT ProgressColour, IN ULONG StepCount, IN PCSTR DescriptionText OPTIONAL, IN PCSTR ProgressFormatText OPTIONAL, IN PUPDATE_PROGRESS UpdateProgressProc OPTIONAL)
VOID ProgressSetStepCount(IN PPROGRESSBAR Bar, IN ULONG StepCount)
static VOID DrawBorder(IN PPROGRESSBAR Bar)
static VOID DrawProgressBar(IN PPROGRESSBAR Bar)
PPROGRESSBAR CreateProgressBar(IN SHORT Left, IN SHORT Top, IN SHORT Right, IN SHORT Bottom, IN SHORT TextTop, IN SHORT TextRight, IN BOOLEAN DoubleEdge, IN PCSTR DescriptionText OPTIONAL)
VOID DestroyProgressBar(IN OUT PPROGRESSBAR Bar)
struct _PROGRESSBAR * PPROGRESSBAR
BOOLEAN(NTAPI * PUPDATE_PROGRESS)(IN struct _PROGRESSBAR *Bar, IN BOOLEAN AlwaysUpdate, OUT PSTR Buffer, IN SIZE_T cchBufferSize)
static LPHIST_ENTRY Bottom
PVOID NTAPI RtlAllocateHeap(IN PVOID HeapHandle, IN ULONG Flags, IN SIZE_T Size)
BOOLEAN NTAPI RtlFreeHeap(IN PVOID HeapHandle, IN ULONG Flags, IN PVOID HeapBase)
char TextBuffer[BUFFERLEN]
VOID CONSOLE_SetTextXY(IN SHORT x, IN SHORT y, IN LPCSTR Text)
#define FOREGROUND_YELLOW
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
NTSTRSAFEVAPI RtlStringCchPrintfA(_Out_writes_(cchDest) _Always_(_Post_z_) NTSTRSAFE_PSTR pszDest, _In_ size_t cchDest, _In_ _Printf_format_string_ NTSTRSAFE_PCSTR pszFormat,...)
PULONG MinorVersion OPTIONAL
CHAR CharDoubleLowerRightCorner
CHAR CharDoubleUpperRightCorner
CHAR CharUpperRightCorner
CHAR CharDoubleLowerLeftCorner
CHAR CharDoubleUpperLeftCorner
CHAR CharDoubleHorizontalLine
CHAR CharLowerRightCorner
CHAR CharDoubleVerticalLine