Made CurrentProfile work even if there was already another instance of DisplayMagician working. Added another the ability to have command line commands that will bypass the SingleInstance mode. Used only for commands that are useful for powershell, and that don't change anything.
There is a caveat with that, that the one that is running first is the one that will generate the console output. This isn't what everyone would want unfortunately, as it may not be caught from a catch/powershell file. The 'DisplayMagician CurrentProfile' command will work perfectly if there are no other DisplayMagician's running, but because we have moved to a SIngleInstance model if there is already another DisplayMagician instance running, the instance started by the batch file will close and the batch file/powershell file won't get an answer :(.
Nothing I can do about that I'm afraid.
There were some issues with memory deallocation where AllocateHGlobal memory was being freed incorrectly with FreeCoTaskMem. This was causing issues with subsequent memory allocations.
The Advanced Target Info object returned by the NVIDIA driver points to memory outside the allocated memory. I need to figure out how the NVIDIA code allocates the memory, so I can account for it on return.
I have been attempting to force Windows to refresh the notification tray using various Win32 API methods by sending messages to those notification tray windows to get them to refresh, but I haven't been able to get the right combination of setings. I am now leaving it for the next littlw while to concentrate on other issues.
Trying to get rid of any left over applications that DIsplayMagician had to kill the process of, so that the system tray is nice and tidy. Having some issues doing so.
There was a bug in the way that NVIDIA screen layouts were calculated. This error was due to a misunderstanding from me on how additional screens were listed within a mosaic config. Turns out additional screens are still recorded in the mosaic config, only just as 1x1 display grids. The screen finding logic now takes this into account.
Let's see if this works. It will skip grabbing the color data and the HDR data on monitors that don't support it. That includes the following connections types: VGA, COMPONENT, SVIDEO, DVI, COMPOSITE. Any other connection types will attempt to get HDR and Colour settings, so that we'll automatically support whatever new technology arrives in the future. Should help fix the last part of #76.
Finally managed to get taskbar positioning working perfectly. Also managed to add a 'Profile Tools' button which will allow the user to easily move the windows taskbar around the screen to different places. Please note that Windwows 11 taskbar only works at the top of the screen, or at the bottom. The taskbar will move to the left or right, but only the start button is shown :(. So I've disabled selecting left or right in Windows 11.