File tree Expand file tree Collapse file tree 4 files changed +5
-6
lines changed Expand file tree Collapse file tree 4 files changed +5
-6
lines changed Original file line number Diff line number Diff line change 1
1
using System ;
2
2
using System . ComponentModel ;
3
- using System . Runtime . InteropServices ;
4
3
using System . Threading ;
5
4
6
5
using Windows . Win32 . Foundation ;
@@ -24,13 +23,13 @@ public GDI_REGION_TYPE GetRegionBox(out RECT box)
24
23
public void SetRegion ( HRGN value )
25
24
{
26
25
var result = SetWindowRgn ( HWnd , value , true ) ;
27
- if ( result == 0 ) throw new Win32Exception ( Marshal . GetLastWin32Error ( ) ) ;
26
+ if ( result == 0 ) throw new Win32Exception ( ) ;
28
27
}
29
28
30
29
public uint GetDpi ( )
31
30
{
32
31
var dpi = GetDpiForWindow ( HWnd ) ;
33
- if ( dpi == 0 ) throw new Win32Exception ( Marshal . GetLastWin32Error ( ) ) ;
32
+ if ( dpi == 0 ) throw new Win32Exception ( ) ;
34
33
35
34
return dpi ;
36
35
}
Original file line number Diff line number Diff line change 24
24
newOsdRegion = CreateRectRgn ( 0 , 0 ,
25
25
( int ) Math . Round ( 65 * osdScalingCoefficient ) ,
26
26
( int ) Math . Round ( 140 * osdScalingCoefficient ) ) ;
27
- if ( newOsdRegion == default ) throw new Win32Exception ( Marshal . GetLastWin32Error ( ) ) ;
27
+ if ( newOsdRegion == default ) throw new Win32Exception ( ) ;
28
28
}
29
29
else // Reset
30
30
{
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ public GDI_REGION_TYPE GetRegionBox(out RECT box)
24
24
public void SetRegion ( HRGN value )
25
25
{
26
26
var result = SetWindowRgn ( HWnd , value , true ) ;
27
- if ( result == 0 ) throw new Win32Exception ( Marshal . GetLastWin32Error ( ) ) ;
27
+ if ( result == 0 ) throw new Win32Exception ( ) ;
28
28
}
29
29
30
30
public static MediaOsd Find ( )
Original file line number Diff line number Diff line change 21
21
{
22
22
newOsdRegion = CreateRectRgn ( 0 , 0 ,
23
23
0 , 0 ) ;
24
- if ( newOsdRegion == default ) throw new Win32Exception ( Marshal . GetLastWin32Error ( ) ) ;
24
+ if ( newOsdRegion == default ) throw new Win32Exception ( ) ;
25
25
}
26
26
else // Reset
27
27
{
You can’t perform that action at this time.
0 commit comments