Kaynağa Gözat

* fix win32,win64 parts, fixes #40439. All records to under pshpack4 in header.

marcoonthegit 1 yıl önce
ebeveyn
işleme
27b3084e67

+ 2 - 2
packages/winunits-base/src/richedit.pp

@@ -13,7 +13,7 @@ interface
 uses Messages, Windows;
 
 {$IFDEF FPC}
-{$PACKRECORDS C}
+{$PACKRECORDS 4} // MS header contains pshpack4 under ifdef win32
 {$ENDIF}
 
 Const
@@ -694,7 +694,7 @@ Const
 
      EDITSTREAMCALLBACK = function (dwCookie:DWORD_PTR; pbBuff:LPBYTE; cb:LONG; var pcb:LONG):DWORD;
 
-     _editstream = record
+     _editstream = packed record
           dwCookie : DWORD_PTR;
           dwError : DWORD;
           pfnCallback : EDITSTREAMCALLBACK;

+ 1 - 1
rtl/win/wininc/struct.inc

@@ -2535,7 +2535,7 @@ Const
      TDRIVERINFO3 = DRIVER_INFO_3;
      PDRIVERINFO3 = ^DRIVER_INFO_3;
 
-     EDITSTREAM = record
+     EDITSTREAM = packed record
           dwCookie : DWORD_PTR;
           dwError : DWORD;
           pfnCallback : EDITSTREAMCALLBACK;