1.3.3 dev 10

1.3.3 dev 10

Postby Rudi De Vos » 2021-05-16 20:33

downloads
https://www.uvnc.eu/download/133/UltraV ... _Setup.exe
https://www.uvnc.eu/download/133/UltraV ... _Setup.exe
https://www.uvnc.eu/download/133/UltraVnc_133_dev10.zip

1.3.3 dev 10
*Maxviewers
*multimouse option
*zlib fix
*winpe fix
*Possible crash fix ( minidump analyse)
*Zstd 1.5.0
*cleanup old code
*rdpmode fix
Rudi De Vos
Admin & Developer
Admin & Developer
 
Posts: 6316
Joined: 2004-04-23 10:21

Re: 1.3.3 dev 10

Postby mbb » 2021-05-27 22:23

I'm testing UVNC 1.3.3 dev10 on WinPE x64 10.0.19041.1 (the most current PE release). As others have posted, only GUI apps can be seen remotely, not the all-important command terminal itself. Additionally, when multiple apps are open, an app that is not in the forefront can be seen but not accessed. The same failure to display CMD windows also occurs with TightVNC and has been posted in their forum. The problem does not appear to be on the VNC viewer side, since viewers from TightVNC, RealVNC, and TigerVNC I've tested also have the same issue. REG ADD HKCU\Console /v ForceV2 /t REG_DWORD /d 0 /f (values 0 and 1) do not fix the issues. FYI, your test version of Alt+Tab (009) does not work on the viewer side. Spawning another CMD window in WinPE also does not show on the viewer side.

Having a fully functional VNC is critical to my operations, and because the new Microsoft driver model for ethernet and RAID drivers requires the newer PE versions, I cannot use older PE versions to solve the VNC problem. As others have noted, PE x64 builds through 10.0.17134.1 work correctly.

Are there specific settings I need to change in the Ultravnc.ini file? If so, please post the working settings or required configuration changes. Thanks.
mbb
 
Posts: 3
Joined: 2021-05-27 21:07

Re: 1.3.3 dev 10

Postby Rudi De Vos » 2021-05-28 17:32

Retested winpe v 10.0.19041.1
ultravnc.ini only has the passwords, no other settings
No REG ADD HKCU\Console change
winvnc 1.3.3 dev 10 64bit

How do i test
I manual do
wpeUtil disablefirewall
winvnc.exe
Then i make a viewer connection.
If "\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinPE" exist we consider the OS as Winpe.

The following does the same as winvnc shoudl do.
Detect winpe and make running cmd visable

https://www.uvnc.eu/download/133/winpeTest.zip

Image
Rudi De Vos
Admin & Developer
Admin & Developer
 
Posts: 6316
Joined: 2004-04-23 10:21

Re: 1.3.3 dev 10

Postby mbb » 2021-06-01 16:32

Thanks for your information, Rudy!

I tested again with the manual steps you use:
* UltraVNC.ini includes only the passwords
* Confirm WinPE version is 10.0.19041.1 in HKLM\SOFTWARE\Microsoft\Windows NT\Currentversion\WinPE
* No REG ADD HKCU\Console change
* wpeutil disablefirewall
* winvnc

CMD windows does not show in viewer; however, when I additionally run your winpetest.exe, then the CMD window becomes visible. Winpetest.exe also fixes the same issue for TightVNC server, so tell me what changes are being made to WinPE to fix the issue?

Thanks again for your prompt attention.
mbb
 
Posts: 3
Joined: 2021-05-27 21:07

Re: 1.3.3 dev 10

Postby Rudi De Vos » 2021-06-01 18:16

Yes, this fix it for all vnc versions, it just disable some graphics setting for the cmd while still using V2 console.
It isn't a winPE change, winvnc monitor the cmd's and change that graphical setting for it.

I only don't understand why it does't work on your winpe when ultravnc run this code direct.

Are you sure you are not connecting to another version ?
Else just copy the dev10 version as winvnc2.exe, use taskmgr to kill winvnc and start winvnc2.
(I use FT to copy the new version with another name so i don't need to rebuild winpe each time.)

When winvnc detect port 5900 is used, it start winvnc on port 5901.
Rudi De Vos
Admin & Developer
Admin & Developer
 
Posts: 6316
Joined: 2004-04-23 10:21

Re: 1.3.3 dev 10

Postby mbb » 2021-06-02 20:17

Thanks for the feedback. I used your winpetest.exe to workaround the issue, and I'm very grateful for your help.
mbb
 
Posts: 3
Joined: 2021-05-27 21:07

Re: 1.3.3 dev 10

Postby mj123 » 2021-06-09 15:49

Hi Rudi - thanks for your work on this. I was able to get cmd windows to display using the winpetest.exe, however it does not work for Powershell windows. Do you think Powershell can be added ?
mj123
 
Posts: 3
Joined: 2021-05-05 23:08

Re: 1.3.3 dev 10

Postby mj123 » 2021-06-09 16:19

Actually running the winpetest.exe + setting this reg key allows me to view cmd and Powershell windows.
REG ADD HKCU\Console /v ForceV2 /t REG_DWORD /d 1 /f
mj123
 
Posts: 3
Joined: 2021-05-05 23:08

Re: 1.3.3 dev 10

Postby Ronny » 2021-06-17 14:13

We are using 19041 WinPE as well and have had the before mentioned issues. I have implemented the 1.3.3 dev 10 version into our WinPE and have also implemented the HKCU\Console registry key.

Good things first, it works ok for us with just the both measures. As a side node maybe, one connection at a time behaves ok, if a second connection to the same host is established vnc is really slow and freezes. This can be healed by both sessions disconnecting and just one of them reconnecting. On our 1809 WinPE we have been establishing two or even more connections without any issue.

Furthermore there is still something not behaving as it should be. We load a PowerShell generated form on startup which allows us to define a computer name. It has 4 different pull down menus the name can be created from. The form itself is shown ok, however whenever a pull down menu is entered nothing is displayed of that pull down. When you know which area you have to click the right entry is selected, so the pull down is there but it is just not displaying. Is this also something that has to do with the overall 19041 issue or is this a more "finetuning" related topic.

Rudi, great work and thank you for being there for the community.
Ronny
 
Posts: 1
Joined: 2021-06-17 14:03

Re: 1.3.3 dev 10

Postby eddieroadcap » 2021-06-22 15:26

Rudi,
Would you provide more detail about what WinPETest.exe changes? Would you mind sharing the source code for that utility, please?
eddieroadcap
 
Posts: 1
Joined: 2021-06-22 15:06

Re: 1.3.3 dev 10

Postby Thomas Levering » 2021-06-29 09:21

On some PC´s with 4k and 2k Monitor, One 100% other 200% scaled. The Picture is very bad.

I compiled the viewer with
<dpiAware>true/PM</dpiAware>
-> PROCESS_PER_MONITOR_DPI_AWARE


if this option make problems (Manifest) , this can be set at runtime per window too
https://docs.microsoft.com/en-us/window ... iawareness
Thomas Levering
40
40
 
Posts: 66
Joined: 2015-01-23 06:45

Re: 1.3.3 dev 10

Postby Thomas Levering » 2021-07-01 06:20

I checked the exe and see, the PER_MONITOR_DPI_AWARE was not compiled in exe
The only difference was a newer Windows SDK

libzstd in Github Code is on 10.0.19041.0, all other on 8.1
10.0.19041.0 was not in my VisualStudio, changed all to 10.0.18362.0

But now the Computer with the problem had an Windows Update to 21H1
and Now all versions of Ultravanc dev10 are working OK

The exe with SDK 10.0.18362.0 is working on Windows7 too

64bit viewer only compiled with different SDK (OneDrive)
https://1drv.ms/u/s!AkdsiVHAVCeBhjFMuxmAGxOAqLdT?e=y0KP77
Thomas Levering
40
40
 
Posts: 66
Joined: 2015-01-23 06:45

Re: 1.3.3 dev 10

Postby Thomas Levering » 2021-07-06 05:11



I add one Test Exe with DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2
(Windows 10, version 1703 and later)
No other Codes Changes.
The ClientConnection Window, is everytime 100% Scaled.
The GUI is Auto Scaled
Thomas Levering
40
40
 
Posts: 66
Joined: 2015-01-23 06:45

Re: 1.3.3 dev 10

Postby Thomas Levering » 2021-07-19 12:28

has nobody tried this yet?

only testing if Rudi Buid this?


vncviewer.cpp
Code: Select all

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR szCmdLine, int iCmdShow)
{

   HMODULE hUser32 = LoadLibrary(_T("user32.dll"));
   HMODULE shcoreDLL = LoadLibrary("SHCORE.DLL");
   /* For Vista, Win7 and Win8 */
   typedef BOOL(*SetProcessDPIAwareFunc)();
   SetProcessDPIAwareFunc setDPIAware = NULL;

   /* Win8.1 and later */
   typedef enum _Process_DPI_Awareness {
      Process_DPI_Unaware = 0,
      Process_System_DPI_Aware = 1,
      Process_Per_Monitor_DPI_Aware = 2
   } Process_DPI_Awareness;
   typedef HRESULT(*SetProcessDpiAwarenessFunc) (Process_DPI_Awareness);
   SetProcessDpiAwarenessFunc setDPIpiAwareness = NULL;

   /*Windows 10, version 1703 and later*/
   typedef HRESULT(*SetProcessDpiAwarenessContextFunc) (DPI_AWARENESS_CONTEXT);
   SetProcessDpiAwarenessContextFunc setDPIpiAwarenessContext = NULL;

   if (hUser32)
      setDPIAware = (SetProcessDPIAwareFunc)GetProcAddress(hUser32, "SetProcessDPIAware");
   setDPIpiAwarenessContext = (SetProcessDpiAwarenessContextFunc)GetProcAddress(hUser32, "SetProcessDpiAwarenessContext");
   if (shcoreDLL) {
      setDPIpiAwareness = (SetProcessDpiAwarenessFunc)GetProcAddress(shcoreDLL, "SetProcessDpiAwareness");
   }

   if (setDPIpiAwarenessContext) {
      setDPIpiAwarenessContext(DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2);
   }
   //   else if (setDPIpiAwareness) {
   //      setDPIpiAwareness(Process_Per_Monitor_DPI_Aware);
   //   }
   else if (setDPIAware)
      setDPIAware();

   if (hUser32)
      FreeLibrary(hUser32);
   if (shcoreDLL)
      FreeLibrary(shcoreDLL);

#ifdef CRASHRPT

Thomas Levering
40
40
 
Posts: 66
Joined: 2015-01-23 06:45

Re: 1.3.3 dev 10

Postby Thomas Levering » 2021-07-20 11:54

I add here a 64bit viewer exe and source zip with changed Files.
https://1drv.ms/f/s!AkdsiVHAVCeBhjFMuxmAGxOAqLdT

1.
Enabled dpi aware per monitor v2 -> If you have a 4k Monitor and a FullHD @ 200% and 100%

2.
sizeMultimon
void ClientConnection::SizeWindow
Auto Set Only if need

3.
if Save Pos is Enabled: (Bug)
On Reconnect, Change Parameter, etc. Leave Window on Last Position

4.
toDo
case WM_DPICHANGED:
see /* */ in code

the scaling to 200% can be better. Simple make from 1 pixel 4 pixel would be better then now
Thomas Levering
40
40
 
Posts: 66
Joined: 2015-01-23 06:45

Re: 1.3.3 dev 10

Postby OldNESJunkie » 2021-07-21 12:53

Thomas,

I will try your viewer out today. Been meaning to test it, but things have been hectic lately. I will let you know how it goes. We have a lot of edge cases here at the office the normal viewer has issues with, hopefully your version resolves some of those.
EDIT: The link in your last post isn't working for me....
User avatar
OldNESJunkie
8
8
 
Posts: 30
Joined: 2017-05-22 21:40
Location: Music City USA

Re: 1.3.3 dev 10

Postby Thomas Levering » 2021-07-21 16:12

The Links are the same. OneDrive Folder with all Files.
2nd Link Cut after ?
OneDrive GeoLock? I‘m from Germany
Thomas Levering
40
40
 
Posts: 66
Joined: 2015-01-23 06:45

Re: 1.3.3 dev 10

Postby Rudi De Vos » 2021-07-21 17:43

open link in new tab, could also do the trick
Rudi De Vos
Admin & Developer
Admin & Developer
 
Posts: 6316
Joined: 2004-04-23 10:21

Re: 1.3.3 dev 10

Postby Skyfighter » 2021-07-24 18:01

Had a look at "vncviewer 10.0.19041.0 SDK DPI per Monitor2 SavePosPatch.exe":
Guess I can't test the DPI-Awareness changes (only single-Monitor with 4k resolution and 150% scaling), but the SavePos=1 changes fixed the following two bugs (of v1.3.3-dev10/2021-05-16):

1) [with SavePos=1 & SaveSize=1] start viewer session, move viewer window, switch from window to fullscreen: if you switch back to window it will be placed to it's initial position of the session-start. -> Bug: window position is not saved pre switching to fullscreen- or not correctly restored post switching back to window-mode.
2) [with SavePos=1 & SaveSize=0] start viewer session, move viewer window, switch from window to fullscreen: if you switch back to window it will be placed to it's initial position of the session-start, window has scroll bars (horizontal and vertical) and does not show the complete remote screen anymore -> Bug: window position is not saved pre switching to fullscreen- or not correctly restored post switching back to window-mode. Window size changes on switch from fullscreen- to window-mode (-> scroll bars are shown). // Sidenote: scrollbars only appear if you move the window before switching to full screen!

and introduced a minor one:
3) [with SavePos=1 & SaveSize=0/1] start viewer session, move viewer window to bottem right of the screen, switch from window to fullscreen, minimize the fullscreen viewer, restore fullscreen viewer, switch from fullscreen to window: viewer window is now positioned in the top left of the monitor. -> Bug: window position should not be saved/stored if fullscreen-viewer gets minimized!? (not sure if that happens and if is the reason for the lost/forgotten window-position)
Perhaps this could be solved, too?
Skyfighter
40
40
 
Posts: 120
Joined: 2014-12-31 22:10

Re: 1.3.3 dev 10

Postby Skyfighter » 2021-07-24 18:53

Addendum: Bug (1) is (only) fixed if the switch between window- and fullscreen-mode is initiated using double-click on the title-bar ... it is NOT fixed if "maximize" button (title bar: second button from the right) or shortcut CTRL+ALT+F12 is used.
Skyfighter
40
40
 
Posts: 120
Joined: 2014-12-31 22:10

Re: 1.3.3 dev 10

Postby Skyfighter » 2021-07-24 20:54

I had a closer look at the three options to toggle between window- and fullscreen-mode:
a) double-click title bar
b) maximize-button (title bar: 2nd button from the right)
c) shortcut CTRL+ALT+F12

Test-procedure: start viewer session, move viewer window, switch from window- to fullscreen-mode with a) or b) or c)...use the same option (a/b/c) to switch back to window-mode.
Test-binary: vncviewer 10.0.19041.0 SDK DPI per Monitor2 SavePosPatch.exe (which - in my option, as written previously - behaves better than v1.3.3-dev10/2021-05-16)
Outcome:
SavePos=0 SaveSize=0:
double-click title bar -> lost position/window is placed top left on the screen
maximize-button (title bar, 2nd from the right) -> restores window position = GOOD
CTRL+ALT+F12 -> window is cut off & lost position/window is restored on initial position
SavePos=1 SaveSize=0:
double-click title bar -> restores window position = GOOD
maximize-button (title bar, 2nd from the right) -> lost position/window is restored on initial position
CTRL+ALT+F12 -> window is cut off & lost position/window is restored on initial position
SavePos=1 SaveSize=1:
double-click title bar -> restores window position = GOOD
maximize-button (title bar, 2nd from the right) -> lost position/window is restored on initial position
CTRL+ALT+F12 -> window is cut off & lost position/window is restored on initial position

window is cut off = window is suddenly smaller than it should be (content/remote-screen is cut off at the bottom and right-side: in my case 22 pixel on x-axis, 56 pixel on y-axis are missing -> the taskbar of remote screen is not visible anymore) and the window can't be resized (there are no scrollbars, but they would not be needed if the window was the right size)

I'm afraid that's not as easy as one might imagine - I would definitely save the current state before trying to improve it further!? :shock:
Skyfighter
40
40
 
Posts: 120
Joined: 2014-12-31 22:10

Re: 1.3.3 dev 10

Postby Thomas Levering » 2021-07-26 15:39

@Skyfighter

files changed, same Link

change/remove some code

Test Test Test all options
Thomas Levering
40
40
 
Posts: 66
Joined: 2015-01-23 06:45

Re: 1.3.3 dev 10

Postby Skyfighter » 2021-07-26 18:56

@Thomas Levering
:o
Yes, sir, will test & report ASAP (sorry, next weekend at the latest - work is eating my time :evil: )
Skyfighter
40
40
 
Posts: 120
Joined: 2014-12-31 22:10

Re: 1.3.3 dev 10

Postby Thomas Levering » 2021-07-27 06:36

Update Files
One Code Line wrong

and
FullScreenTitleBar.cpp (caption to big)
Code: Select all
   case WM_DPICHANGED:
   {
      TitleBarThis->Font = CreateFont(-MulDiv(12, HIWORD(wParam), 96), 0, 0, 0, 0, FALSE, 0, 0, 0, 0, 0, 0, 0, "Arial");
      //toDo Repaint
   }


Old
-MulDiv(10, 96, 72) at100%
-MulDiv(10, 192, 72) at200%

New
-MulDiv(12, dpi, 96)


to do:
calculation of border, (after dpi change)
if first Monitor is 4K/200% and other 2k/100%
on the other Monitor the Window is to big (a little black strip)
Thomas Levering
40
40
 
Posts: 66
Joined: 2015-01-23 06:45

Re: 1.3.3 dev 10

Postby Skyfighter » 2021-07-27 17:15

Cool, thats a big improvement! 8) Thank you very much Thomas!

Test-binary: vncviewer.exe/2021-07-27 08:12:16
Outcome:
SavePos=0 SaveSize=0:
double-click title bar -> restores window position = GOOD
maximize-button -> lost position/window is placed in the middle of the screen
CTRL+ALT+F12 -> lost position/window is placed in the middle of the screen
SavePos=1 SaveSize=0:
double-click title bar -> restores window position = GOOD
maximize-button -> lost position/window is restored on initial position
CTRL+ALT+F12 -> lost position/window is restored on initial position
SavePos=1 SaveSize=1:
double-click title bar -> restores window position = GOOD
maximize-button -> lost position/window is restored on initial position
CTRL+ALT+F12 -> lost position/window is restored on initial position

If you mix the options: "double-click title bar" to enter fullscreen-mode and then use maximize-button or CTRL+ALT+F12 to switch back to window-mode: window-position is correctly restored! -> maximize-button & CTRL+ALT+F12 are missing a small piece of code?
In other words, switching to fullscreen-mode using
double-click title bar -> window position is saved/remembered
maximize-button & CTRL+ALT+F12 -> window position is NOT saved/remembered

And a directly related problem: If you are in fullscreen-mode and use the minimize-button (title bar, 3rd from the right) the window-position (of the fullscreen-viewer) should NOT be saved/NOT overwrite the last saved window position of the viewer (but that happens). ((Here you have the above mentioned missing code at the wrong place?))
Skyfighter
40
40
 
Posts: 120
Joined: 2014-12-31 22:10

Re: 1.3.3 dev 10

Postby Thomas Levering » 2021-07-29 09:20

Updated

AdjustWindowRectEx change to AdjustWindowRectExForDpi (if Windows10)

void ClientConnection::saveScreenPosition()
sometimes save, after the window is maximized

later i see not all ok with CTRL+ALT+F12 (Restore not on Last Position)

to do FullScreenTitleBar painting font after change dpi
after FullScreen->Window->FullScreen the Font is OK

@Rudi can we make a Signed Dev?
Thomas Levering
40
40
 
Posts: 66
Joined: 2015-01-23 06:45

Re: 1.3.3 dev 10

Postby Skyfighter » 2021-07-29 17:25

Thanks Thomas, further improvement: Double-click and maximize-button work, only CTRL+ALT+F12 does not restore window on Last Position.

Test-binary: vncviewer.exe/2021-07-29 10:58:57
Outcome:
SavePos=0 SaveSize=0:
double-click title bar -> restores window position = GOOD
maximize-button -> restores window position = GOOD
CTRL+ALT+F12 -> lost position/window is placed in the middle of the screen
SavePos=1 SaveSize=0:
double-click title bar -> restores window position = GOOD
maximize-button -> restores window position = GOOD
CTRL+ALT+F12 -> lost position/window is restored on initial position
SavePos=1 SaveSize=1:
double-click title bar -> restores window position = GOOD
maximize-button -> restores window position = GOOD
CTRL+ALT+F12 -> lost position/window is restored on initial position

If you are in fullscreen-mode and use the minimize-button (title bar, 3rd from the right) the window-position (of the fullscreen-viewer) should NOT be saved/NOT overwrite the last saved window position of the viewer. (Currently: If you bring back the minimized fullscreen-viewer and switch to window mode the last window position is lost = window will be positioned top left on the screen.)
Skyfighter
40
40
 
Posts: 120
Joined: 2014-12-31 22:10

Re: 1.3.3 dev 10

Postby Rudi De Vos » 2021-07-29 17:55

When you provide the latest cpp and h files i will (manual) merge it and run the builder.

found code has been added to git
https://github.com/ultravnc/UltraVNC/tree/development
Rudi De Vos
Admin & Developer
Admin & Developer
 
Posts: 6316
Joined: 2004-04-23 10:21

Re: 1.3.3 dev 10

Postby Thomas Levering » 2021-07-30 07:24

ClientConnection.cpp add restoreScreenPosition
Code: Select all
               case ID_CONN_ABOUT:
                  _this->ShowConnInfo();
                  return 0;

               case ID_FULLSCREEN: // CTRL+ALT+F12
                  _this->SetFullScreenMode(!_this->InFullScreenMode());
                  if (!_this->InFullScreenMode())
                    _this->restoreScreenPosition();
                  return 0;

               case ID_VIEWONLYTOGGLE:


ClientConnectionFullScreen.cpp remove unused from copy/paste
Code: Select all
void ClientConnection::saveScreenPosition()
{
//   if (!m_opts.m_SavePos)
   GetWindowRect(m_hwndMain, &mainRect);

   // if doubleclick Title don´t save     
   HMONITOR hMonitor = ::MonitorFromWindow(m_hwndMain, MONITOR_DEFAULTTONEAREST);
   MONITORINFO mi;
   mi.cbSize = sizeof(MONITORINFO);
   GetMonitorInfo(hMonitor, &mi);
   
   saveScreenPositionOK = (mainRect.left > mi.rcMonitor.left);
   //saveScreenPositionOK = (mainRect.left > 0) && (mainRect.top > 0);
}




other small problem:
Window On Monitor1 with dpi 200%
Move with mouse to Monitor2 with dpi 100% to Top for Maximize, then restore
The Saved/Restored Position is with dpi factor
Thomas Levering
40
40
 
Posts: 66
Joined: 2015-01-23 06:45

Re: 1.3.3 dev 10

Postby Thomas Levering » 2021-07-30 13:24

Update Files

move window to screen with other dpi:
NoFlicker -> SizeWindow if Window is 100% on other monitor
Autosize is working
Thomas Levering
40
40
 
Posts: 66
Joined: 2015-01-23 06:45

Next

Return to 1.3.x

Who is online

Users browsing this forum: No registered users and 2 guests