Browse Source

--- Merging r23552 into '.':
U rtl/win/winsock2.pp
--- Merging r23733 into '.':
U rtl/freebsd/termios.inc
--- Merging r24164 into '.':
U rtl/inc/mouseh.inc
U rtl/unix/keyboard.pp
--- Merging r24302 into '.':
U rtl/wince/sysutils.pp
--- Merging r24427 into '.':
U packages/imagemagick/src/imagemagick.pas
--- Merging r24430 into '.':
U packages/winunits-base/src/activex.pp
--- Merging r24435 into '.':
G packages/winunits-base/src/activex.pp
--- Merging r24446 into '.':
U rtl/win/sockets.pp
--- Merging r24448 into '.':
U rtl/win/wininc/struct.inc
--- Merging r24451 into '.':
U rtl/objpas/classes/stringl.inc
--- Merging r24537 into '.':
U packages/fcl-image/src/fpcanvas.inc
--- Merging r24555 into '.':
G packages/fcl-image/src/fpcanvas.inc

# revisions: 23552,23733,24164,24302,24427,24430,24435,24446,24448,24451,24537,24555
r23552 | marco | 2013-01-31 19:48:32 +0100 (Thu, 31 Jan 2013) | 2 lines
Changed paths:
M /trunk/rtl/win/winsock2.pp

* make ioctl related constants unsigned.
r23733 | marco | 2013-03-08 23:26:40 +0100 (Fri, 08 Mar 2013) | 2 lines
Changed paths:
M /trunk/rtl/freebsd/termios.inc

* added missing baudrates that were in 7.x already. Patch by Graeme, Mantis #23992
r24164 | marco | 2013-04-06 20:58:05 +0200 (Sat, 06 Apr 2013) | 2 lines
Changed paths:
M /trunk/rtl/inc/mouseh.inc
M /trunk/rtl/unix/keyboard.pp

* mousebutton 4 and 5 support (gpm only?) Mantis #13469
r24302 | marco | 2013-04-22 17:58:15 +0200 (Mon, 22 Apr 2013) | 3 lines
Changed paths:
M /trunk/rtl/wince/sysutils.pp

* Applied patch from Victor Campillo that adds GetLocalTimeOffset support
similar to win32. Mantis #24253
r24427 | marco | 2013-05-04 18:47:53 +0200 (Sat, 04 May 2013) | 2 lines
Changed paths:
M /trunk/packages/imagemagick/src/imagemagick.pas

* use win32 dll names for win64. (win32->Windows), patch by Andrew Brunner, mantis #24346
r24430 | marco | 2013-05-04 20:30:15 +0200 (Sat, 04 May 2013) | 1 line
Changed paths:
M /trunk/packages/winunits-base/src/activex.pp

* IStreamPersistInit. Patch part of Mantis #22442 (but not all)
r24435 | marco | 2013-05-04 22:22:44 +0200 (Sat, 04 May 2013) | 1 line
Changed paths:
M /trunk/packages/winunits-base/src/activex.pp

* IOleControl and some other interfaces from #22442. safecall folded to function:hresult;stdcall; calls.
r24446 | marco | 2013-05-05 10:42:08 +0200 (Sun, 05 May 2013) | 2 lines
Changed paths:
M /trunk/rtl/win/sockets.pp

* add boolean that can be changed to avoid shutting down winsock. This can trouble other DLLs. Mantis #22597
r24448 | marco | 2013-05-05 11:37:00 +0200 (Sun, 05 May 2013) | 3 lines
Changed paths:
M /trunk/rtl/win/wininc/struct.inc

* parts of #23953 done. Deprecation of old shlobj structures that are still in unit windows. However shlobj first needs to honour ifdef unicode. It currently
only supports -A and -W variants, and not the suffixless aliases.
r24451 | marco | 2013-05-05 16:04:15 +0200 (Sun, 05 May 2013) | 2 lines
Changed paths:
M /trunk/rtl/objpas/classes/stringl.inc

* set namevalueseparator to =, mantis #24116
r24537 | marco | 2013-05-20 18:19:48 +0200 (Mon, 20 May 2013) | 2 lines
Changed paths:
M /trunk/packages/fcl-image/src/fpcanvas.inc

* fix memleak in fpcanvas. Patch by wp, mantis #24427
r24555 | marco | 2013-05-23 12:01:46 +0200 (Thu, 23 May 2013) | 2 lines
Changed paths:
M /trunk/packages/fcl-image/src/fpcanvas.inc

* fix memleak in fpcanvas. Patch by wp, mantis #24427 attempt two

git-svn-id: branches/fixes_2_6@24945 -

marco 12 years ago
parent
commit
318b380921

+ 1 - 0
packages/fcl-image/src/fpcanvas.inc

@@ -28,6 +28,7 @@ end;
 
 destructor TFPCustomCanvas.Destroy;
 begin
+  FreeAndNil(FClipRegion);
   FRemovingHelpers := True;
   // first remove all helper references
   RemoveHelpers;

+ 1 - 1
packages/imagemagick/src/imagemagick.pas

@@ -42,7 +42,7 @@ type
 {$endif}
 
 const
-{$ifdef Win32}
+{$ifdef Windows}
   MagickExport = 'CORE_RL_magick_.dll';
   WandExport = 'CORE_RL_wand_.dll';
 {$else}

+ 250 - 2
packages/winunits-base/src/activex.pp

@@ -73,6 +73,86 @@ CONST
    GUID_NULL  : TGUID =  '{00000000-0000-0000-0000-000000000000}';
    IID_IPrint : TGUID = '{B722BCC9-4E68-101B-A2BC-00AA00404770}';
    IID_IOleCommandTarget : TGUID = '{B722BCCB-4E68-101B-A2BC-00AA00404770}';
+   LIBID_OC : TGUID = '{A6663F44-FC7D-4FC4-861A-37BA700330E3}';
+
+   IID_IEnumConnections : TGUID = '{B196B287-BAB4-101A-B69C-00AA00341D07}';
+   IID_IEnumConnectionPoints : TGUID = '{B196B285-BAB4-101A-B69C-00AA00341D07}';
+   IID_IConnectionPoint : TGUID = '{B196B286-BAB4-101A-B69C-00AA00341D07}';
+   IID_IConnectionPointContainer : TGUID = '{B196B284-BAB4-101A-B69C-00AA00341D07}';
+   IID_IClassFactory : TGUID = '{00000001-0000-0000-C000-000000000046}';
+   IID_IClassFactory2 : TGUID = '{B196B28F-BAB4-101A-B69C-00AA00341D07}';
+   IID_IProvideClassInfo : TGUID = '{B196B283-BAB4-101A-B69C-00AA00341D07}';
+   IID_ITypeInfo : TGUID = '{00020401-0000-0000-C000-000000000046}';
+   IID_ITypeComp : TGUID = '{00020403-0000-0000-C000-000000000046}';
+   IID_ITypeLib : TGUID = '{00020402-0000-0000-C000-000000000046}';
+   IID_IProvideClassInfo2 : TGUID = '{A6BC3AC0-DBAA-11CE-9DE3-00AA004BB851}';
+   IID_IProvideMultipleClassInfo : TGUID = '{A7ABA9C1-8983-11CF-8F20-00805F2CD064}';
+   IID_IOleControl : TGUID = '{B196B288-BAB4-101A-B69C-00AA00341D07}';
+   IID_IOleControlSite : TGUID = '{B196B289-BAB4-101A-B69C-00AA00341D07}';
+   IID_IPropertyPage : TGUID = '{B196B28D-BAB4-101A-B69C-00AA00341D07}';
+   IID_IPropertyPageSite : TGUID = '{B196B28C-BAB4-101A-B69C-00AA00341D07}';
+   IID_IPropertyPage2 : TGUID = '{01E44665-24AC-101B-84ED-08002B2EC713}';
+   IID_IPropertyNotifySink : TGUID = '{9BFBBC02-EFF1-101A-84ED-00AA00341D07}';
+   IID_ISpecifyPropertyPages : TGUID = '{B196B28B-BAB4-101A-B69C-00AA00341D07}';
+   IID_IPersist : TGUID = '{0000010C-0000-0000-C000-000000000046}';
+   IID_IPersistMemory : TGUID = '{BD1AE5E0-A6AE-11CE-BD37-504200C10000}';
+   IID_IPersistStreamInit : TGUID = '{7FD52380-4E07-101B-AE2D-08002B2EC713}';
+   IID_IStream : TGUID = '{0000000C-0000-0000-C000-000000000046}';
+   IID_ISequentialStream : TGUID = '{0C733A30-2A1C-11CE-ADE5-00AA0044773D}';
+   IID_IPersistPropertyBag : TGUID = '{37D84F60-42CB-11CE-8135-00AA004BB851}';
+   IID_IPropertyBag : TGUID = '{55272A00-42CB-11CE-8135-00AA004BB851}';
+   IID_IErrorLog : TGUID = '{3127CA40-446E-11CE-8135-00AA004BB851}';
+   IID_ISimpleFrameSite : TGUID = '{742B0E01-14E6-101B-914E-00AA00300CAB}';
+   IID_IFont : TGUID = '{BEF6E002-A874-101A-8BBA-00AA00300CAB}';
+   IID_IPicture : TGUID = '{7BF80980-BF32-101A-8BBB-00AA00300CAB}';
+   IID_IFontEventsDisp : TGUID = '{4EF6100A-AF88-11D0-9846-00C04FC29993}';
+   IID_IFontDisp : TGUID = '{BEF6E003-A874-101A-8BBA-00AA00300CAB}';
+   IID_IPictureDisp : TGUID = '{7BF80981-BF32-101A-8BBB-00AA00300CAB}';
+   IID_IAdviseSink : TGUID = '{0000010F-0000-0000-C000-000000000046}';
+   IID_IMoniker : TGUID = '{0000000F-0000-0000-C000-000000000046}';
+   IID_IPersistStream : TGUID = '{00000109-0000-0000-C000-000000000046}';
+   IID_IBindCtx : TGUID = '{0000000E-0000-0000-C000-000000000046}';
+   IID_IRunningObjectTable : TGUID = '{00000010-0000-0000-C000-000000000046}';
+   IID_IEnumMoniker : TGUID = '{00000102-0000-0000-C000-000000000046}';
+   IID_IEnumString : TGUID = '{00000101-0000-0000-C000-000000000046}';
+   IID_IAdviseSinkEx : TGUID = '{3AF24290-0C96-11CE-A0CF-00AA00600AB8}';
+   IID_IOleWindow : TGUID = '{00000114-0000-0000-C000-000000000046}';
+   IID_IOleInPlaceObject : TGUID = '{00000113-0000-0000-C000-000000000046}';
+   IID_IOleInPlaceObjectWindowless : TGUID = '{1C2056CC-5EF4-101B-8BC8-00AA003E3B29}';
+   IID_IDropTarget : TGUID = '{00000122-0000-0000-C000-000000000046}';
+   IID_IDataObject : TGUID = '{0000010E-0000-0000-C000-000000000046}';
+   IID_IEnumFORMATETC : TGUID = '{00000103-0000-0000-C000-000000000046}';
+   IID_IEnumSTATDATA : TGUID = '{00000105-0000-0000-C000-000000000046}';
+   IID_IOleInPlaceSite : TGUID = '{00000119-0000-0000-C000-000000000046}';
+   IID_IOleInPlaceFrame : TGUID = '{00000116-0000-0000-C000-000000000046}';
+   IID_IOleInPlaceUIWindow : TGUID = '{00000115-0000-0000-C000-000000000046}';
+   IID_IOleInPlaceActiveObject : TGUID = '{00000117-0000-0000-C000-000000000046}';
+   IID_IOleInPlaceSiteEx : TGUID = '{9C2CAD80-3424-11CF-B670-00AA004CD6D8}';
+   IID_IOleInPlaceSiteWindowless : TGUID = '{922EADA0-3424-11CF-B670-00AA004CD6D8}';
+   IID_IViewObject : TGUID = '{0000010D-0000-0000-C000-000000000046}';
+   IID_IViewObject2 : TGUID = '{00000127-0000-0000-C000-000000000046}';
+   IID_IViewObjectEx : TGUID = '{3AF24292-0C96-11CE-A0CF-00AA00600AB8}';
+   IID_IOleUndoUnit : TGUID = '{894AD3B0-EF97-11CE-9BC9-00AA00608E01}';
+   IID_IOleUndoManager : TGUID = '{D001F200-EF97-11CE-9BC9-00AA00608E01}';
+   IID_IOleParentUndoUnit : TGUID = '{A1FAF330-EF97-11CE-9BC9-00AA00608E01}';
+   IID_IEnumOleUndoUnits : TGUID = '{B3E7C340-EF97-11CE-9BC9-00AA00608E01}';
+   IID_IPointerInactive : TGUID = '{55980BA0-35AA-11CF-B671-00AA004CD6D8}';
+   IID_IObjectWithSite : TGUID = '{FC4801A3-2BA9-11CF-A229-00AA003D7352}';
+   IID_IPerPropertyBrowsing : TGUID = '{376BD3AA-3845-101B-84ED-08002B2EC713}';
+   IID_IPropertyBag2 : TGUID = '{22F55882-280B-11D0-A8A9-00A0C90C2004}';
+   IID_IPersistPropertyBag2 : TGUID = '{22F55881-280B-11D0-A8A9-00A0C90C2004}';
+   IID_IQuickActivate : TGUID = '{CF51ED10-62FE-11CF-BF86-00A0C9034836}';
+   IID_IOleClientSite : TGUID = '{00000118-0000-0000-C000-000000000046}';
+   IID_IOleContainer : TGUID = '{0000011B-0000-0000-C000-000000000046}';
+   IID_IParseDisplayName : TGUID = '{0000011A-0000-0000-C000-000000000046}';
+   IID_IEnumUnknown : TGUID = '{00000100-0000-0000-C000-000000000046}';
+   IID_IBindHost : TGUID = '{FC4801A1-2BA9-11CF-A229-00AA003D7352}';
+   IID_IBindStatusCallback : TGUID = '{79EAC9C1-BAF9-11CE-8C82-00AA004BA90B}';
+   IID_IBinding : TGUID = '{79EAC9C0-BAF9-11CE-8C82-00AA004BA90B}';
+   IID_IServiceProvider : TGUID = '{6D5140C1-7436-11CE-8034-00AA006009FA}';
+   IID_IOleControlTypes : TGUID = '{00000000-0000-0000-0000-000000000000}';
+   IID_IPicture2 : TGUID = '{F5185DD8-2012-4B0B-AAD9-F052C6BD482B}';
+
 
      // bit flags for IExternalConnection
 CONST
@@ -2090,11 +2170,41 @@ TYPE
              end;
      PROPVARIANT=TPROPVARIANT;
      TagPROPVARIANT = TPROPVARIANT;
-// Unknwn.idl
 
-// IUnknown is in classesh.inc
 
+     tagCONTROLINFO = packed record
+                        cb      : LongWord;
+                        hAccel  : wireHACCEL;
+                        cAccel  : Word;
+                        dwFlags : LongWord;
+                      end;
+     PtagCONTROLINFO = ^TagControlInfo;
+     PCONTROLINFO    = PtagCONTROLINFO;
+
+     PtagPOINTF = ^tagPOINTF;
+     tagPOINTF = packed record
+                  x : Single;
+                  y : Single;
+                  end;
+
+     tagPROPPAGEINFO = packed record
+                 cb : LongWord;
+                 pszTitle : PWideChar;
+                 size : tagSIZE;
+                 pszDocString : PWideChar;
+                 pszHelpFile : PWideChar;
+                 dwHelpContext : LongWord;
+                 end;
+     PtagCAUUID = ^tagCAUUID;
+
+     tagCAUUID = packed record
+                  cElems : LongWord;
+                  pElems : PGUID;
+                 end;
+
+// Unknwn.idl
 
+// IUnknown is in classesh.inc
 
    AsyncIUnknown = Interface(IUnknown)
       ['{000e0000-0000-0000-C000-000000000046}']
@@ -2281,6 +2391,32 @@ TYPE
        Function GetSizeMax(Out cbSize:ULarge_Integer):HResult; StdCall;
        End;
 
+     IPersistStreamInit = interface(IPersist)
+       ['{7FD52380-4E07-101B-AE2D-08002B2EC713}']
+       Function IsDirty:HResult;StdCall;
+       Function Load(pstm:IStream):HResult;StdCall;
+       Function Save(pstm:IStream;fClearDirty:Integer):HResult;StdCall;
+       Function GetSizeMax(out pCbSize:_ULARGE_INTEGER):HResult;StdCall;
+       Function InitNew:HResult;StdCall;
+       End;
+       // IPersistMemory :
+
+     IPersistMemory = interface(IPersist)
+       ['{BD1AE5E0-A6AE-11CE-BD37-504200C10000}']
+        // IsDirty :
+       function IsDirty:HResult;StdCall;
+        // Load :
+       function Load(var pMem:pointer;cbSize:LongWord):HResult;StdCall;
+        // Save :
+       function Save(out pMem:pointer;fClearDirty:Integer;cbSize:LongWord):HResult;StdCall;
+        // GetSizeMax :
+       function GetSizeMax(out pCbSize:LongWord):HResult;StdCall;
+        // InitNew :
+       function InitNew:HResult;StdCall;
+      end;
+
+
+
     PIMoniker = ^IMoniker;
     IMoniker = Interface (IPersistStream)
       ['{0000000f-0000-0000-C000-000000000046}']
@@ -3293,6 +3429,118 @@ type
     function GetGUID(dwguid:DWord;out pguid:TGUID):HResult; StdCall;
   end;
 
+  IProvideMultipleClassInfo = interface(IProvideClassInfo2)
+   ['{A7ABA9C1-8983-11CF-8F20-00805F2CD064}']
+    // GetMultiTypeInfoCount :
+   function GetMultiTypeInfoCount(out pcti:LongWord):HResult; StdCall;
+    // GetInfoOfIndex :
+   function GetInfoOfIndex(iti:LongWord;dwFlags:LongWord;out pptiCoClass:ITypeInfo;out pdwTIFlags:LongWord;out pcdispidReserved:LongWord;out piidPrimary:GUID;out piidSource:GUID):HResult; StdCall;
+  end;
+  // IOleControl :
+
+ IOleControl = interface(IUnknown)
+   ['{B196B288-BAB4-101A-B69C-00AA00341D07}']
+    // GetControlInfo :
+   function GetControlInfo(var pCI:tagCONTROLINFO):HRESULT;stdcall;
+    // OnMnemonic :
+   function OnMnemonic(var pMsg:tagMSG):HRESULT;stdcall;
+    // OnAmbientPropertyChange :
+   function OnAmbientPropertyChange(dispID:Integer):HRESULT;stdcall;
+    // FreezeEvents :
+   function FreezeEvents(bFreeze:Integer):HRESULT;stdcall;
+  end;
+
+// IOleControlSite :
+
+ IOleControlSite = interface(IUnknown)
+   ['{B196B289-BAB4-101A-B69C-00AA00341D07}']
+    // OnControlInfoChanged :
+   function OnControlInfoChanged:HRESULT;stdcall;
+    // LockInPlaceActive :
+   function LockInPlaceActive(fLock:Integer):HRESULT;stdcall;
+    // GetExtendedControl :
+   function GetExtendedControl(out ppDisp:IDispatch):HRESULT;stdcall;
+    // TransformCoords :
+   function TransformCoords(var pPtlHimetric:_POINTL;var pPtfContainer:tagPOINTF;dwFlags:LongWord):HRESULT;stdcall;
+    // TranslateAccelerator :
+   function TranslateAccelerator(var pMsg:tagMSG;grfModifiers:LongWord):HRESULT;stdcall;
+    // OnFocus :
+   function OnFocus(fGotFocus:Integer):HRESULT;stdcall;
+    // ShowPropertyFrame :
+   function ShowPropertyFrame:HRESULT;stdcall;
+  end;
+
+// IPropertyPage :
+
+ IPropertyPageSite = interface;
+
+ IPropertyPage = interface(IUnknown)
+   ['{B196B28D-BAB4-101A-B69C-00AA00341D07}']
+    // SetPageSite :
+   function SetPageSite(pPageSite:IPropertyPageSite):HRESULT;stdcall;
+    // Activate :
+   function Activate(hWndParent:wireHWND;var pRect:TRECT;bModal:Integer):HRESULT;stdcall;
+    // Deactivate :
+   function Deactivate:HRESULT;stdcall;
+    // GetPageInfo :
+   function GetPageInfo(out pPageInfo:tagPROPPAGEINFO):HRESULT;stdcall;
+    // SetObjects :
+   function SetObjects(cObjects:LongWord;var ppUnk:IUnknown):HRESULT;stdcall;
+    // Show :
+   function Show(nCmdShow:UInt):HRESULT;stdcall;
+    // Move :
+   function Move(var pRect:TRECT):HRESULT;stdcall;
+    // IsPageDirty :
+   function IsPageDirty:HRESULT;stdcall;
+    // Apply :
+   function Apply:HRESULT;stdcall;
+    // Help :
+   function Help(pszHelpDir:PWideChar):HRESULT;stdcall;
+    // TranslateAccelerator :
+   function TranslateAccelerator(var pMsg:tagMSG):HRESULT;stdcall;
+  end;
+
+// IPropertyPageSite :
+
+ IPropertyPageSite = interface(IUnknown)
+   ['{B196B28C-BAB4-101A-B69C-00AA00341D07}']
+    // OnStatusChange :
+   function OnStatusChange(dwFlags:LongWord):HRESULT;stdcall;
+    // GetLocaleID :
+   function GetLocaleID(out pLocaleID:LongWord):HRESULT;stdcall;
+    // GetPageContainer :
+   function GetPageContainer(out ppUnk:IUnknown):HRESULT;stdcall;
+    // TranslateAccelerator :
+   function TranslateAccelerator(var pMsg:tagMSG):HRESULT;stdcall;
+  end;
+
+// IPropertyPage2 :
+
+ IPropertyPage2 = interface(IPropertyPage)
+   ['{01E44665-24AC-101B-84ED-08002B2EC713}']
+    // EditProperty :
+   function EditProperty(dispID:Integer):HRESULT;stdcall;
+  end;
+
+// IPropertyNotifySink :
+
+ IPropertyNotifySink = interface(IUnknown)
+   ['{9BFBBC02-EFF1-101A-84ED-00AA00341D07}']
+    // OnChanged :
+   function OnChanged(dispID:Integer):HRESULT;stdcall;
+    // OnRequestEdit :
+   function OnRequestEdit(dispID:Integer):HRESULT;stdcall;
+  end;
+
+  // ISpecifyPropertyPages :
+
+ ISpecifyPropertyPages = interface(IUnknown)
+   ['{B196B28B-BAB4-101A-B69C-00AA00341D07}']
+    // GetPages :
+   function GetPages(out pPages:tagCAUUID):HRESULT;stdcall;
+  end;
+
+
 { ******************************************************************************************************************
                                                           stuff from objbase.h
   ****************************************************************************************************************** }

+ 2 - 0
rtl/freebsd/termios.inc

@@ -190,6 +190,8 @@ CONST
         B76800  = 76800;
         B115200 =115200;
         B230400 =230400;
+        B460800 =460800;
+        B921600 =921600;
         EXTA    = 19200;
         EXTB    = 38400;
 

+ 2 - 0
rtl/inc/mouseh.inc

@@ -33,6 +33,8 @@ const
   MouseLeftButton   = $01;                         { Left mouse button }
   MouseRightButton  = $02;                         { Right mouse button }
   MouseMiddleButton = $04;                         { Middle mouse button }
+  MouseButton4      = $08;
+  MouseButton5      = $10;
 
   MouseEventBufSize = 16;                { Size of event queue }
 

+ 1 - 0
rtl/objpas/classes/stringl.inc

@@ -1374,6 +1374,7 @@ begin
   FMap := TFPStrObjMap.Create;
   FMap.OnPtrCompare := @MapPtrCompare;
   FOnCompareText := @DefaultCompareText;
+  NameValueSeparator:='=';
   CheckSpecialChars;
 end;
 

+ 14 - 1
rtl/unix/keyboard.pp

@@ -491,6 +491,13 @@ const
     Action : 0;
   );
 
+  procedure GenFakeReleaseEvent(MouseEvent : TMouseEvent);
+  begin
+    MouseEvent.action := MouseActionUp;
+    MouseEvent.buttons := 0;
+    PutMouseEvent(MouseEvent);
+  end;
+  
   procedure GenMouseEvent;
   var MouseEvent: TMouseEvent;
       ch : char;
@@ -510,7 +517,7 @@ const
      bit  5   : mouse movement while button down.
      bit  6   : interpret button 1 as button 4
                 interpret button 2 as button 5}
-    case buttonval and 3 of
+    case buttonval and 67 of
       0 : {left button press}
         MouseEvent.buttons:=1;
       1 : {middle button pressed }
@@ -519,6 +526,10 @@ const
         MouseEvent.buttons:=4;
       3 : { no button pressed }
         MouseEvent.buttons:=0;
+      64: { button 4 pressed }
+          MouseEvent.buttons:=8;
+      65: { button 5 pressed }
+          MouseEvent.buttons:=16;
     end;
      if inhead=intail then
        fpSelect(StdInputHandle+1,@fdsin,nil,nil,10);
@@ -552,6 +563,8 @@ const
        end;
 *)
      PutMouseEvent(MouseEvent);
+     if (MouseEvent.buttons and (8+16)) <> 0 then // 'M' escape sequence cannot map button 4&5 release, so fake one.
+       GenFakeReleaseEvent(MouseEvent);
 {$ifdef DebugMouse}
      if MouseEvent.Action=MouseActionDown then
        Write(system.stderr,'Button down : ')

+ 6 - 1
rtl/win/sockets.pp

@@ -53,6 +53,10 @@ const
 {$i socketsh.inc}
 {$i fpwinsockh.inc}
 
+// finalizing Winsock2 stack might upset other DLLS. Mantis #22597
+var 
+  NoWinsockCleanupCall : Boolean = false;
+
 Implementation
 
 { Include filerec and textrec structures }
@@ -276,5 +280,6 @@ var
 initialization
   WSAStartUp(WINSOCK_VERSION,wsadata);
 finalization
-  WSACleanUp;
+  If Not NoWinsockCleanupCall Then 
+   WSACleanUp;
 end.

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

@@ -435,11 +435,11 @@ Const
           lpfn : BFFCALLBACK;
           lParam : LPARAM;
           iImage : longint;
-       end;
-     LPBROWSEINFO = ^BROWSEINFO;
-     _browseinfo = BROWSEINFO;
-     Tbrowseinfo = BROWSEINFO;
-     PBROWSEINFO = ^BROWSEINFO;
+       end deprecated 'Use shlobj version. Will be removed in 2.8'; 
+     LPBROWSEINFO = ^BROWSEINFO deprecated;
+     _browseinfo = BROWSEINFO deprecated;
+     Tbrowseinfo = BROWSEINFO deprecated;
+     PBROWSEINFO = ^BROWSEINFO deprecated;
 
      FILETIME = record
           dwLowDateTime : DWORD;
@@ -747,11 +747,11 @@ Const
           nShow : longint;
           dwHotKey : DWORD;
           hIcon : HANDLE;
-       end;
-     LPCMINVOKECOMMANDINFO = ^CMINVOKECOMMANDINFO;
-     _CMInvokeCommandInfo = CMINVOKECOMMANDINFO;
-     TCMInvokeCommandInfo = CMINVOKECOMMANDINFO;
-     PCMInvokeCommandInfo = ^CMINVOKECOMMANDINFO;
+       end deprecated 'Use shlobj version. Will be removed in 2.8';
+     LPCMINVOKECOMMANDINFO = ^CMINVOKECOMMANDINFO deprecated;
+     _CMInvokeCommandInfo = CMINVOKECOMMANDINFO deprecated;
+     TCMInvokeCommandInfo = CMINVOKECOMMANDINFO deprecated;
+     PCMInvokeCommandInfo = ^CMINVOKECOMMANDINFO deprecated;
 
      COLORADJUSTMENT = record
           caSize : WORD;

+ 6 - 6
rtl/win/winsock2.pp

@@ -77,15 +77,15 @@ const
   IOC_IN       = $80000000;
   IOC_INOUT    = (IOC_IN or IOC_OUT);
 
-  FIONREAD     = IOC_OUT or { get # bytes to read }
+  FIONREAD     = ULONG(IOC_OUT or { get # bytes to read }
     ((Longint(SizeOf(Longint)) and IOCPARM_MASK) shl 16) or
-    (Longint(Byte('f')) shl 8) or 127;
-  FIONBIO      = IOC_IN or { set/clear non-blocking i/o }
+    (Longint(Byte('f')) shl 8) or 127);
+  FIONBIO      = ULONG(IOC_IN or { set/clear non-blocking i/o }
     ((Longint(SizeOf(Longint)) and IOCPARM_MASK) shl 16) or
-    (Longint(Byte('f')) shl 8) or 126;
-  FIOASYNC     = IOC_IN or { set/clear async i/o }
+    (Longint(Byte('f')) shl 8) or 126);
+  FIOASYNC     = ULONG(IOC_IN or { set/clear async i/o }
     ((Longint(SizeOf(Longint)) and IOCPARM_MASK) shl 16) or
-    (Longint(Byte('f')) shl 8) or 125;
+    (Longint(Byte('f')) shl 8) or 125);
 
 type
   PHostEnt = ^THostEnt;

+ 16 - 1
rtl/wince/sysutils.pp

@@ -30,7 +30,7 @@ uses
 {$DEFINE HAS_OSERROR}
 {$DEFINE HAS_OSCONFIG}
 {$DEFINE HAS_TEMPDIR}
-
+{$DEFINE HAS_LOCALTIMEZONEOFFSET}
 { Include platform independent interface part }
 {$i sysutilh.inc}
 
@@ -468,6 +468,21 @@ begin
   windows.Getlocaltime(SystemTime);
 end;
 
+function GetLocalTimeOffset: Integer;
+var
+  TZInfo: TTimeZoneInformation;
+begin
+   case GetTimeZoneInformation(TZInfo) of
+     TIME_ZONE_ID_UNKNOWN:
+       Result := TZInfo.Bias;
+     TIME_ZONE_ID_STANDARD:
+       Result := TZInfo.Bias + TZInfo.StandardBias;
+     TIME_ZONE_ID_DAYLIGHT:
+       Result := TZInfo.Bias + TZInfo.DaylightBias;
+     else
+       Result := 0;
+   end;
+end;
 
 {****************************************************************************
                               Misc Functions