Code: Select all
DllCall("LoadLibrary", "Str", "dxva2.dll", "Ptr") ;Get handle to primary monitor hMon := DllCall("MonitorFromPoint" , "Int64", 0 ; point x0 y0 on screen , "UInt", 1) ; tells the function to return the primary monitor handle if something went wrong ;Get number of physical monitors DllCall("dxva2.dll\GetNumberOfPhysicalMonitorsFromHMONITOR" , "Ptr", hMon ; the handle that we got previously , "UIntP", nMons ; the var into which the number of monitors will be put , "UInt") ;Get handles of physical monitors associated with the primary monitor handle VarSetCapacity(hPhysMons, ( A_PtrSize + 256) * nMons, 0) ; create var to contain array of PHYSICAL_MONITOR structures which will contain handles to physical monitors DllCall("dxva2.dll\GetPhysicalMonitorsFromHMONITOR" , "Ptr", hMon ; the handle that we got previously , "UInt", nMons ; the number of monitors that we got previously , "Ptr", &hPhysMons ; the address of the var we created to hold the array of PHYSICAL_MONITOR structures , "UInt") ;Get the monitor description of the first monitor, which is stored at a byte offset of A_PtrSize monDescription := NumGet(hPhysMons, A_PtrSize )
https://docs.microsoft.com/en-us/window ... al_monitor
How would I go about decoding each character from that array?
Thanks in advance if you can help!