Change to type casting instead of marshalling
authorSaurabh Singh <sausing@microsoft.com>
Thu, 13 Feb 2020 23:52:55 +0000 (15:52 -0800)
committerSaurabh Singh <sausing@microsoft.com>
Thu, 13 Feb 2020 23:52:55 +0000 (15:52 -0800)
src/libraries/System.Data.OleDb/src/OleDbCommand.cs

index 63aec6c..0e72368 100644 (file)
@@ -430,7 +430,7 @@ namespace System.Data.OleDb
                 {
                     fixed (tagDBPARAMBINDINFO* p = &bindInfo[i])
                     {
-                        bindInfo_x86[i] = (tagDBPARAMBINDINFO_x86)Marshal.PtrToStructure((IntPtr)p, typeof(tagDBPARAMBINDINFO_x86));
+                        bindInfo_x86[i] = *(tagDBPARAMBINDINFO_x86*)p;
                     }
                 }
                 fixed (tagDBPARAMBINDINFO_x86* p = &bindInfo_x86[0])