1

Topic: Winlogon-desktop screenshot in Server 2012R2

It is necessary for me to do a Winlogon-desktop screenshot. On the form the timer (1 ) is allocated. Its output agent: the Code: procedure TForm18.Timer1Timer (Sender: TObject); var bmp: TBitmap; DCDesk: HDC; FileName: String; begin bmp: = TBitmap. Create; bmp. Height: = Screen. Height; bmp. Width: = Screen. Width; DCDesk: = GetWindowDC (GetDesktopWindow); BitBlt (bmp. Canvas. Handle, 0, 0, Screen. Width, Screen. Height, DCDesk, 0, 0, SRCCOPY); FileName: = ' Screenshot _ ' + FormatDateTime (' mm-dd-yyyy-hhnnss', Now ()); if not DirectoryExists (ExtractFilePath (Application. ExeName) + ' Screenshots') then CreateDir (ExtractFilePath (Application. ExeName) + ' Screenshots'); bmp. SaveToFile (Format (ExtractFilePath (Application. ExeName) + ' Screenshots\%s.bmp ', [FileName])); ReleaseDC (GetDesktopWindow, DCDesk); bmp. Free; end; Start  is produced under user SYSTEM. In other Windows versions all screens turn out normal, and here in Server 2012R2 if to block a computer (at this time screens normal) and to push on button "to Replace the user" on the lock screen, all  screens turn out empty (completely white filling). Who can prompts in what side to dig?

2

Re: Winlogon-desktop screenshot in Server 2012R2

Hello, xteam777, you wrote: X> it is necessary For me to do a Winlogon-desktop screenshot. X> in other Windows versions all screens turn out normal, and here in Server 2012R2 if to block a computer (at this time screens normal) and to push on button "to Replace the user" on the lock screen, all  screens turn out empty (completely white filling). Who can prompts in what side to dig? 1. Where check of errors? For example, what GetWindowDC returned not NULL? 2. And you are assured, what you exe is launched in the necessary session and on the necessary desktop? Sessions and desktops after all can switch during change of the user... 3. On Win8 + and Server2012 + it is better instead of GDI to use Desktop Duplication API. Both performance will be better, and support of 3D-appendices, and possibility to remove screens with winlogon/etc (in the presence of the rights, certainly).

3

Re: Winlogon-desktop screenshot in Server 2012R2

Hello, xteam777, you wrote: X> Start  is produced under user SYSTEM. How you launch  under user SYSTEM??? Any service probably launches it... X> In other Windows versions all screens turn out normal, and here in Server 2012R2 if to block a computer (at this time screens normal) and to push on button "to Replace the user" on the lock screen, all  screens turn out empty (completely white filling). Who can prompts in what side to dig? Most likely  it is launched on other desktop, not on winlogon