584{
594 SHORT CurrentDiskLine;
595 SHORT CurrentPartLine;
599
600 Width = ListUi->Right - ListUi->Left - 1;
601 Height = ListUi->Bottom - ListUi->Top - 2;
602
603
604 CurrentDiskLine = 0;
605 CurrentPartLine = 0;
606 LastLine = 0;
607
611 {
613
614 LastLine += 2;
615 if (CurrentPartLineFound ==
FALSE)
616 {
617 CurrentPartLine += 2;
618 }
619
622 Entry2 = Entry2->
Flink)
623 {
625 if (PartEntry == ListUi->CurrentPartition)
626 {
627 CurrentPartLineFound =
TRUE;
628 }
629
630 if (CurrentPartLineFound ==
FALSE)
631 {
632 CurrentPartLine++;
633 }
634
635 LastLine++;
636 }
637
638 if (CurrentPartLineFound ==
FALSE)
639 {
642 Entry2 = Entry2->
Flink)
643 {
645 if (PartEntry == ListUi->CurrentPartition)
646 {
647 CurrentPartLineFound =
TRUE;
648 }
649
650 if (CurrentPartLineFound ==
FALSE)
651 {
652 CurrentPartLine++;
653 }
654
655 LastLine++;
656 }
657 }
658
659 if (DiskEntry == ListUi->CurrentDisk)
660 {
661 CurrentDiskLineFound =
TRUE;
662 }
663
665 {
666 if (CurrentDiskLineFound ==
FALSE)
667 {
668 CurrentPartLine++;
669 CurrentDiskLine = CurrentPartLine;
670 }
671
672 LastLine++;
673 }
674 else
675 {
676 LastLine--;
677 }
678 }
679
680
681 if (CurrentPartLine < ListUi->
Offset)
682 {
683 ListUi->Offset = CurrentPartLine;
684 }
685 else if (CurrentPartLine - ListUi->Offset >
Height)
686 {
687 ListUi->Offset = CurrentPartLine -
Height;
688 }
689
690 if (CurrentDiskLine < ListUi->
Offset && CurrentPartLine - CurrentDiskLine <
Height)
691 {
692 ListUi->Offset = CurrentDiskLine;
693 }
694
695
696 coPos.
X = ListUi->Left;
697 coPos.
Y = ListUi->Top;
700 1,
701 coPos,
702 &Written);
703
704
705 coPos.
X = ListUi->Left + 1;
706 coPos.
Y = ListUi->Top;
707 if (ListUi->Offset == 0)
708 {
712 coPos,
713 &Written);
714 }
715 else
716 {
720 coPos,
721 &Written);
722 {
723 CHAR szBuff[] =
"(.)";
725 coPos.
X = ListUi->Right - 5;
727 szBuff,
728 3,
729 coPos,
730 &Written);
731 }
732 coPos.
X = ListUi->Right - 2;
735 2,
736 coPos,
737 &Written);
738 }
739
740
741 coPos.
X = ListUi->Right;
742 coPos.
Y = ListUi->Top;
745 1,
746 coPos,
747 &Written);
748
749
750 for (
i = ListUi->Top + 1; i < ListUi->
Bottom;
i++)
751 {
752 coPos.
X = ListUi->Left;
756 1,
757 coPos,
758 &Written);
759
760 coPos.
X = ListUi->Right;
763 1,
764 coPos,
765 &Written);
766 }
767
768
769 coPos.
X = ListUi->Left;
770 coPos.
Y = ListUi->Bottom;
773 1,
774 coPos,
775 &Written);
776
777
778 coPos.
X = ListUi->Left + 1;
779 coPos.
Y = ListUi->Bottom;
780 if (LastLine - ListUi->Offset <=
Height)
781 {
785 coPos,
786 &Written);
787 }
788 else
789 {
793 coPos,
794 &Written);
795 {
796 CHAR szBuff[] =
"(.)";
798 coPos.
X = ListUi->Right - 5;
800 szBuff,
801 3,
802 coPos,
803 &Written);
804 }
805 coPos.
X = ListUi->Right - 2;
808 2,
809 coPos,
810 &Written);
811 }
812
813
814 coPos.
X = ListUi->Right;
815 coPos.
Y = ListUi->Bottom;
818 1,
819 coPos,
820 &Written);
821
822
823 ListUi->Line = -ListUi->Offset;
824
828 {
830
831
833 }
834}
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)
static LPHIST_ENTRY Bottom
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
_In_ ULONG _In_ ULONG Offset
static VOID PrintDiskData(IN PPARTLIST_UI ListUi, IN PDISKENTRY DiskEntry)
base of all file and directory entries
LIST_ENTRY LogicalPartListHead
LIST_ENTRY PrimaryPartListHead
struct _LIST_ENTRY * Flink
#define CONTAINING_RECORD(address, type, field)
_In_ HFONT _Out_ PUINT _Out_ PUINT Width
_In_ HFONT _Out_ PUINT Height
CHAR CharUpperRightCorner
CHAR CharLowerRightCorner
_Must_inspect_result_ _In_ WDFCMRESLIST List