562{
572 SHORT CurrentDiskLine;
573 SHORT CurrentPartLine;
577
578 Width = ListUi->Right - ListUi->Left - 1;
579 Height = ListUi->Bottom - ListUi->Top - 2;
580
581
582 CurrentDiskLine = 0;
583 CurrentPartLine = 0;
584 LastLine = 0;
585
589 {
591
592 LastLine += 2;
593 if (CurrentPartLineFound ==
FALSE)
594 {
595 CurrentPartLine += 2;
596 }
597
600 Entry2 = Entry2->
Flink)
601 {
603 if (PartEntry == ListUi->CurrentPartition)
604 {
605 CurrentPartLineFound =
TRUE;
606 }
607
608 if (CurrentPartLineFound ==
FALSE)
609 {
610 CurrentPartLine++;
611 }
612
613 LastLine++;
614 }
615
616 if (CurrentPartLineFound ==
FALSE)
617 {
620 Entry2 = Entry2->
Flink)
621 {
623 if (PartEntry == ListUi->CurrentPartition)
624 {
625 CurrentPartLineFound =
TRUE;
626 }
627
628 if (CurrentPartLineFound ==
FALSE)
629 {
630 CurrentPartLine++;
631 }
632
633 LastLine++;
634 }
635 }
636
637 if (DiskEntry == ListUi->CurrentDisk)
638 {
639 CurrentDiskLineFound =
TRUE;
640 }
641
643 {
644 if (CurrentDiskLineFound ==
FALSE)
645 {
646 CurrentPartLine++;
647 CurrentDiskLine = CurrentPartLine;
648 }
649
650 LastLine++;
651 }
652 else
653 {
654 LastLine--;
655 }
656 }
657
658
659 if (CurrentPartLine < ListUi->
Offset)
660 {
661 ListUi->Offset = CurrentPartLine;
662 }
663 else if (CurrentPartLine - ListUi->Offset >
Height)
664 {
665 ListUi->Offset = CurrentPartLine -
Height;
666 }
667
668 if (CurrentDiskLine < ListUi->
Offset && CurrentPartLine - CurrentDiskLine <
Height)
669 {
670 ListUi->Offset = CurrentDiskLine;
671 }
672
673
674 coPos.
X = ListUi->Left;
675 coPos.
Y = ListUi->Top;
678 1,
679 coPos,
680 &Written);
681
682
683 coPos.
X = ListUi->Left + 1;
684 coPos.
Y = ListUi->Top;
685 if (ListUi->Offset == 0)
686 {
690 coPos,
691 &Written);
692 }
693 else
694 {
698 coPos,
699 &Written);
700 {
701 CHAR szBuff[] =
"(.)";
703 coPos.
X = ListUi->Right - 5;
705 szBuff,
706 3,
707 coPos,
708 &Written);
709 }
710 coPos.
X = ListUi->Right - 2;
713 2,
714 coPos,
715 &Written);
716 }
717
718
719 coPos.
X = ListUi->Right;
720 coPos.
Y = ListUi->Top;
723 1,
724 coPos,
725 &Written);
726
727
728 for (
i = ListUi->Top + 1; i < ListUi->
Bottom;
i++)
729 {
730 coPos.
X = ListUi->Left;
734 1,
735 coPos,
736 &Written);
737
738 coPos.
X = ListUi->Right;
741 1,
742 coPos,
743 &Written);
744 }
745
746
747 coPos.
X = ListUi->Left;
748 coPos.
Y = ListUi->Bottom;
751 1,
752 coPos,
753 &Written);
754
755
756 coPos.
X = ListUi->Left + 1;
757 coPos.
Y = ListUi->Bottom;
758 if (LastLine - ListUi->Offset <=
Height)
759 {
763 coPos,
764 &Written);
765 }
766 else
767 {
771 coPos,
772 &Written);
773 {
774 CHAR szBuff[] =
"(.)";
776 coPos.
X = ListUi->Right - 5;
778 szBuff,
779 3,
780 coPos,
781 &Written);
782 }
783 coPos.
X = ListUi->Right - 2;
786 2,
787 coPos,
788 &Written);
789 }
790
791
792 coPos.
X = ListUi->Right;
793 coPos.
Y = ListUi->Bottom;
796 1,
797 coPos,
798 &Written);
799
800
801 ListUi->Line = -ListUi->Offset;
802
806 {
808
809
811 }
812}
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