Skip to content

vscpp/PrintScreenLogger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

========================By vscpp start===============================

The code is from Microsoft MU project.

How to build (Sample)

  1. Download UDK2018 code
  2. Copy PrintScreenLogger to ShellPkg/Application/PrintScreenLogger
  3. DSC Nt32Pkg.dsc change [Components] ShellPkg/Application/PrintScreenLogger/PrintScreenLogger.inf
  4. Run build command: edksetup.bat --nt32 build -m ShellPkg\Application\PrintScreenLogger\PrintScreenLogger.inf -a X64 -t VS2017 -b RELEASE
  5. Find the EFI driver PrintScreenLogger.efi in Build\NT32X64\RELEASE_VS2017\X64

How to run

  1. Boot to UEFI Shell environment
  2. Run: load PrintScreenLogger.efi
  3. Refer to "PrintScreenLogger operation"

========================By vscpp end===============================

PrintScreenLogger

About

PrintScreenLogger is a DXE_DRIVER you can include in your platform to obtain Screen Captures during the preboot environment by pressing the Ctrl-PrtScn key combination. This action will creates a 24bbp (Bits Per Pixel) .BMP file of the screen's contents and write it to a enabled USB drive.

Supported Architectures

This package is not architecturally dependent. This package is dependent upon the Gop pixel format, and only supports these two pixel formats:

  1. PixelRedGreenBlueReserved8BitPerColor
  2. PixelBlueGreenRedReserved8BitPerColor

PrintScreenLogger operation

During initialization, the Print Screen Loggger registers for notification of the Ctrl-PrtScn key combination is pressed.

When a Print Screen callback occurs:

  1. Looks for a mounted USB drive that contains a file in the root directory called PrintScreenEnable.txt. This limits PrintScreenLogger to only write to enabled USB devices.
  2. Looks for the next available filename in the form PrtScreen####.bmp, starting with 0000.
  3. Creates the new PrtScreen####.bmp file.
  4. Call GraphicsOutput->Blt to obtain the complete screen.
  5. Converts the BLT buffer to a 24bbp BMP structure.
  6. Writes the BMP structure to the new PrtScreen####.bmp file.

Including in your platform

Sample DSC change

[Components.<arch>]
...
...
MsGraphicsPkg/PrintScreenFileLogger/PrintScreenFileLogger.inf

Sample FDF change

[FV.<a DXE firmware volume>]
...
...
INF MsGraphicsPkg/PrintScreenFileLogger/PrintScreenFileLogger.inf

Copyright

Copyright (c) 2018, Microsoft Corporation

All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

About

Obtain UEFI Screen Captures

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages