Resolved handle warnings
This commit is contained in:
1 parent
9b21c21a8e
commit
677aed6ef9
1 file changed
+2
-2
@@ -401,7 +401,7 @@ namespace PInvokeSerialPort
|
||||
_checkSends = CheckAllSends;
|
||||
wo.Offset = 0;
|
||||
wo.OffsetHigh = 0;
|
||||
wo.hEvent = _checkSends ? _writeEvent.Handle : IntPtr.Zero;
|
||||
wo.hEvent = _checkSends ? _writeEvent.SafeWaitHandle.DangerousGetHandle() : IntPtr.Zero;
|
||||
_ptrUwo = Marshal.AllocHGlobal(Marshal.SizeOf(wo));
|
||||
Marshal.StructureToPtr(wo, _ptrUwo, true);
|
||||
_writeCount = 0;
|
||||
@@ -686,7 +686,7 @@ namespace PInvokeSerialPort
|
||||
var unmanagedOv = Marshal.AllocHGlobal(Marshal.SizeOf(ov));
|
||||
ov.Offset = 0;
|
||||
ov.OffsetHigh = 0;
|
||||
ov.hEvent = sg.Handle;
|
||||
ov.hEvent = sg.SafeWaitHandle.DangerousGetHandle();
|
||||
Marshal.StructureToPtr(ov, unmanagedOv, true);
|
||||
|
||||
uint eventMask = 0;
|
||||
|
||||
Reference in new issue
Block a user