﻿id	summary	reporter	owner	description	type	status	milestone	component	version	severity	resolution	keywords	cc
2347	_WinAPI_GetMonitorInfo() returns incorrect data.	Valik		"The following line of _WinAPI_GetMonitorInfo() is incorrect:
{{{
If Not _WinAPI_MoveMemory(DllStructGetPtr($Result[$i]), DllStructGetPtr($tMIEX, $i + 1), 16) Then
}}}
DllStructGetPtr() is 1-indexed, not 0, so the code as originally written returns garbage. Actually it causes rcMonitor to return cbSize and the first 3 elements of rcMonitor and it causes rcWork to return rcMonitor.  None of which is correct.

The fix is simple enough:
{{{
If Not _WinAPI_MoveMemory(DllStructGetPtr($Result[$i]), DllStructGetPtr($tMIEX, $i + 2), 16) Then
}}}

Better yet rewrite that part of the code to be less ""clever"" and more sane.  Remember folks, clean and working code is better than clever broken code."	Bug	closed	Future Release	Standard UDFs	3.3.9.4	None	Fixed		
