In dxgkrnl.sys Module :
NTSTATUS DpiSystemDisplayWrite (
_In_ PDPI_RECT_DESC pSrcInfo, // Source rectangle description (contains pixel data, dimensions, format)
_Out_ PDPI_DST_INFO pDstInfo, // Destination position (X, Y coordinates on screen)
_In_ UINT8 Flags // Control flags (usually 0)
); // Function for drawing a rectangle on the screen
In ntoskrnl.exe Module :
VOID BgpFwAcquireLock (
VOID
); // Function for obtaining the IRQL spin lock of the Bcp/Bgp control object
NTSTATUS BcpDisplayCriticalString (
_In_ PNTUNICODE_STRING String, // Pointer to the wide string to be displayed
_In_ ULONG TextSize, // Text size
_Inout_ ULONG64 Reserved, // Reserved parameter
_In_ ULONG DisplayType // Display type (usually 2)
); // Function for displaying a string
NTSTATUS BgpTxtDisplayCharacter(
_Inout_ ULONG_PTR* Context, // Pointer to BgpTxtDisplayCharacter_struct
_In_ WCHAR DisplayChar, // Wide character to render (skip if < 0x20)
_In_ BOOLEAN Flags, // Control flags (usually FALSE)
_Out_ ULONG* pAdvanceWidth, // Returns advance width in pixels
_Out_ ULONG* pHeight, // Returns character height in pixels (for line spacing)
); // Function to display a single wide character
In ntoskrnl.exe Module :
NTSTATUS InbvAcquireDisplayOwnership (
VOID
); // Function to acquire exclusive ownership of the screen
In ntoskrnl.exe Module :
typedef struct {
UINT32 Height; // Rectangle height
UINT32 Width; // Rectangle width
UINT32 Flags; // Flags (usually 5)
UINT32 Stride; // Pitch (bytes per row), usually Width * 4
UINT32* PixelData; // Pointer to pixel rectangle data in non-paged memory (ARGB format)
} DPI_RECT_DESC, *PDPI_RECT_DESC;
typedef struct {
UINT32 DstX; // Start X coordinate for rendering
UINT32 DstY; // Start Y coordinate for rendering
} DPI_DST_INFO, *PDPI_DST_INFO;
typedef struct {
USHORT Length;
USHORT MaximumLength;
ULONG Padding; // Exists solely to enforce 16-byte alignment of the structure
PWSTR Buffer;
} NTUNICODE_STRING, *PNTUNICODE_STRING; // Identical to the UNICODE_STRING structure, with added padding to enforce alignment
typedef struct {
ULONG Unknown; // Unknown structure member
ULONG Y; // Screen height in pixels
ULONG X; // Screen width in pixels
} BgInternal_struct, *PBgInternal_struct;
typedef struct {
ULONG X; // Start X coordinate for rendering
ULONG Y; // Start Y coordinate for rendering
// ...
} BcpCursor_struct, *PBcpCursor_struct;
typedef struct {
// ...
ULONG TextColor; // +0x28
ULONG BackColor; // +0x2C
} BgpTxtDisplayCharacter_struct, *PBgpTxtDisplayCharacter_struct;