mirror of
https://github.com/Ylianst/MeshAgent
synced 2025-12-13 06:43:42 +00:00
Fixed error handler when GetDpiForMonitor() doesn't exist
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -88,18 +88,17 @@ function monitorinfo()
|
|||||||
this._user32.CreateMethod('EnumDisplayMonitors');
|
this._user32.CreateMethod('EnumDisplayMonitors');
|
||||||
this._kernel32 = this._gm.CreateNativeProxy('kernel32.dll');
|
this._kernel32 = this._gm.CreateNativeProxy('kernel32.dll');
|
||||||
this._kernel32.CreateMethod('GetLastError');
|
this._kernel32.CreateMethod('GetLastError');
|
||||||
this._shcore = this._gm.CreateNativeProxy('SHCore.dll');
|
|
||||||
if (this._shcore != null)
|
try
|
||||||
{
|
{
|
||||||
try
|
this._shcore = this._gm.CreateNativeProxy('SHCore.dll');
|
||||||
{
|
this._shcore.CreateMethod('GetDpiForMonitor');
|
||||||
this._shcore.CreateMethod('GetDpiForMonitor');
|
|
||||||
}
|
|
||||||
catch (xx)
|
|
||||||
{
|
|
||||||
this._shcore = null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
catch (xx)
|
||||||
|
{
|
||||||
|
this._shcore = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
this.getInfo = function getInfo()
|
this.getInfo = function getInfo()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user