Browse Source

--- Merging r25576 into '.':
U packages/fcl-net/src/cnetdb.pp
--- Merging r25581 into '.':
G packages/fcl-net/src/cnetdb.pp
--- Merging r25640 into '.':
U packages/fcl-passrc/src/paswrite.pp
--- Merging r25659 into '.':
U packages/winunits-base/src/activex.pp
--- Merging r25723 into '.':
U rtl/win/wininc/messages.inc

# revisions: 25575,25576,25581,25640,25659,25723
r25575 | michael | 2013-09-26 09:08:36 +0200 (Thu, 26 Sep 2013) | 1 line
Changed paths:
M /trunk/packages/fcl-net/src/ssockets.pp

* Removed unussed but unix-only variables
r25576 | michael | 2013-09-26 09:13:50 +0200 (Thu, 26 Sep 2013) | 1 line
Changed paths:
M /trunk/packages/fcl-net/src/cnetdb.pp

* Fixed bug ID #24909 (switch 2 fields in addrinfo record)
r25581 | svenbarth | 2013-09-26 14:27:37 +0200 (Thu, 26 Sep 2013) | 6 lines
Changed paths:
M /trunk/packages/fcl-net/src/cnetdb.pp

Correct fix for Mantis #24909 : some systems (Linux, OpenBSD) use the one order while other systems use the other (FreeBSD, NetBSD).

+ add a define for each of the two orders
* fail if none of the two defines is defined ( => for porting to new systems)
+ use the order as specified by the define
r25640 | marco | 2013-10-04 23:37:52 +0200 (Fri, 04 Oct 2013) | 2 lines
Changed paths:
M /trunk/packages/fcl-passrc/src/paswrite.pp

* fix for #24947, writing index expression of property. Patch by Daniel Gaspary.
r25659 | marco | 2013-10-05 22:43:09 +0200 (Sat, 05 Oct 2013) | 1 line
Changed paths:
M /trunk/packages/winunits-base/src/activex.pp

* IPicture from #25147. Translated IPicture2 (win64 safe) myself. (roughly the same but with 64-bit handle type)
r25723 | marco | 2013-10-08 18:02:25 +0200 (Tue, 08 Oct 2013) | 3 lines
Changed paths:
M /trunk/rtl/win/wininc/messages.inc

* changed type of unused parameter in TWMSetFocus from WParam to LParam as
suggest by ChrisF, Mantis #25171

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

marco 12 years ago
parent
commit
915b95ab00

+ 16 - 0
packages/fcl-net/src/cnetdb.pp

@@ -191,6 +191,16 @@ type
   PProtoEnt = ^TProtoEnt;
   PPProtoEnt = ^PProtoEnt;
 
+{$if defined(LINUX) or defined(OPENBSD)}
+{$define FIRST_ADDR_THEN_CANONNAME}
+{$endif}
+{$if defined(FREEBSD) or defined(NETBSD)}
+{$define FIRST_CANONNAME_THEN_ADDR}
+{$endif}
+{$if not defined(FIRST_CANONNAME_THEN_ADDR) and not defined(FIRST_ADDR_THEN_CANONNAME)}
+{$error fatal 'Please consult the netdh.h file for your system to determine the order of ai_addr and ai_canonname'}
+{$endif} 
+
   PAddrInfo = ^addrinfo;
   addrinfo = record
     ai_flags: cInt;     {* AI_PASSIVE, AI_CANONNAME, AI_NUMERICHOST *}
@@ -198,8 +208,14 @@ type
     ai_socktype: cInt;  {* SOCK_xxx *}
     ai_protocol: cInt;  {* 0 or IPPROTO_xxx for IPv4 and IPv6 *}
     ai_addrlen: TSocklen;  {* length of ai_addr *}
+{$ifdef FIRST_CANONNAME_THEN_ADDR}
     ai_canonname: PChar;   {* canonical name for hostname *}
     ai_addr: psockaddr;	   {* binary address *}
+{$endif}
+{$ifdef FIRST_ADDR_THEN_CANONNAME}
+    ai_addr: psockaddr;	   {* binary address *}
+    ai_canonname: PChar;   {* canonical name for hostname *}
+{$endif}
     ai_next: PAddrInfo;	   {* next structure in linked list *}
   end;
   TAddrInfo = addrinfo;

+ 2 - 0
packages/fcl-passrc/src/paswrite.pp

@@ -404,6 +404,8 @@ begin
     wrt(': ');
     WriteType(AProp.VarType);
   end;
+  if AProp.IndexValue <> '' then
+    wrt(' index ' + AProp.IndexValue); 
   if AProp.ReadAccessorName <> '' then
     wrt(' read ' + AProp.ReadAccessorName);
   if AProp.WriteAccessorName <> '' then

+ 78 - 0
packages/winunits-base/src/activex.pp

@@ -61,6 +61,10 @@ type
    TOleDate	       = DATE;
    POleDate	       = ^TOleDate;	
    OLE_HANDLE	       = UINT;
+   OLE_XSIZE_HIMETRIC = LONG;
+   OLE_YSIZE_HIMETRIC = LONG;
+   OLE_XPOS_HIMETRIC = LONG;
+   OLE_YPOS_HIMETRIC = LONG;
    LPOLE_HANDLE        = ^OLE_HANDLE;
    OLE_COLOR	       = DWORD;
    LPOLE_COLOR         = ^OLE_COLOR;
@@ -68,6 +72,7 @@ type
    POleHandle          = LPOLE_HANDLE;
    TOleColor           = OLE_COLOR;
    POleColor           = LPOle_Color;
+   HHandle             = UINT_PTR;
 
 CONST
    GUID_NULL  : TGUID =  '{00000000-0000-0000-0000-000000000000}';
@@ -901,6 +906,12 @@ Const
     OLECMDF_INVISIBLE 	  = $0000000000000010;
     OLECMDF_DEFHIDEONCTXTMENU = $0000000000000020;
 
+    OLECMDERR_E_UNKNOWNGROUP = -2147221244;
+    OLECMDERR_E_CANCELED     = -2147221245;
+    OLECMDERR_E_NOHELP       = -2147221246;
+    OLECMDERR_E_DISABLED     = -2147221247;
+    OLECMDERR_E_NOTSUPPORTED = -2147221248;
+
     OLECMDTEXTF_NONE      = $0000000000000000;
     OLECMDTEXTF_NAME      = $0000000000000001;
     OLECMDTEXTF_STATUS    = $0000000000000002;
@@ -3604,6 +3615,73 @@ type
    function SetHdc(hDC:wireHDC):HRESULT;stdcall;
   end;
 
+// IPicture :
+
+ IPicture = interface(IUnknown)
+   ['{7BF80980-BF32-101A-8BBB-00AA00300CAB}']
+    // get_Handle :
+   function get_Handle(out pHandle:OLE_HANDLE):HRESULT;stdcall;
+    // get_hPal :
+   function get_hPal(out phPal:OLE_HANDLE):HRESULT;stdcall;
+    // get_Type :
+   function get_Type(out pType:SHORT):HRESULT;stdcall;
+    // get_Width :
+   function get_Width(out pWidth:OLE_XSIZE_HIMETRIC):HRESULT;stdcall;
+    // get_Height :
+   function get_Height(out pHeight:OLE_YSIZE_HIMETRIC):HRESULT;stdcall;
+    // Render :
+   function Render(hDC:wireHDC;x:Integer;y:Integer;cx:Integer;cy:Integer;xSrc:OLE_XPOS_HIMETRIC;ySrc:OLE_YPOS_HIMETRIC;cxSrc:OLE_XSIZE_HIMETRIC;cySrc:OLE_YSIZE_HIMETRIC;var pRcWBounds:TRECT):HRESULT;stdcall;
+    // set_hPal :
+   function set_hPal(hPal:OLE_HANDLE):HRESULT;stdcall;
+    // get_CurDC :
+   function get_CurDC(out phDC:wireHDC):HRESULT;stdcall;
+    // SelectPicture :
+   function SelectPicture(hDCIn:wireHDC;out phDCOut:wireHDC;out phBmpOut:OLE_HANDLE):HRESULT;stdcall;
+    // get_KeepOriginalFormat :
+   function get_KeepOriginalFormat(out pKeep:Integer):HRESULT;stdcall;
+    // put_KeepOriginalFormat :
+   function put_KeepOriginalFormat(keep:Integer):HRESULT;stdcall;
+    // PictureChanged :
+   function PictureChanged:HRESULT;stdcall;
+    // SaveAsFile :
+   function SaveAsFile(pStream:IStream;fSaveMemCopy:Integer;out pCbSize:Integer):HRESULT;stdcall;
+    // get_Attributes :
+   function get_Attributes(out pDwAttr:LongWord):HRESULT;stdcall;
+  end;
+
+  IPicture2 = interface(IUnknown)
+   ['{F5185DD8-2012-4b0b-AAD9-F052C6BD482B}']
+    // get_Handle :
+   function get_Handle(out pHandle:HHANDLE):HRESULT;stdcall;
+    // get_hPal :
+   function get_hPal(out phPal:HHANDLE):HRESULT;stdcall;
+    // get_Type :
+   function get_Type(out pType:SHORT):HRESULT;stdcall;
+    // get_Width :
+   function get_Width(out pWidth:OLE_XSIZE_HIMETRIC):HRESULT;stdcall;
+    // get_Height :
+   function get_Height(out pHeight:OLE_YSIZE_HIMETRIC):HRESULT;stdcall;
+    // Render :
+   function Render(hDC:wireHDC;x:LONG;y:LONG;cx:LONG;cy:LONG;xSrc:OLE_XPOS_HIMETRIC;ySrc:OLE_YPOS_HIMETRIC;cxSrc:OLE_XSIZE_HIMETRIC;cySrc:OLE_YSIZE_HIMETRIC;var pRcWBounds:TRECT):HRESULT;stdcall;
+    // set_hPal :
+   function set_hPal(hPal:HHANDLE):HRESULT;stdcall;
+    // get_CurDC :
+   function get_CurDC(out phDC:HDC):HRESULT;stdcall;
+    // SelectPicture :
+   function SelectPicture(hDCIn:HDC;out phDCOut:HDC;out phBmpOut:HHANDLE):HRESULT;stdcall;
+    // get_KeepOriginalFormat :
+   function get_KeepOriginalFormat(out pKeep:WinBOOL):HRESULT;stdcall;
+    // put_KeepOriginalFormat :
+   function put_KeepOriginalFormat(keep:WinBOOL):HRESULT;stdcall;
+    // PictureChanged :
+   function PictureChanged:HRESULT;stdcall;
+    // SaveAsFile :
+   function SaveAsFile(pStream:IStream;fSaveMemCopy:LONG;out pCbSize:LONG):HRESULT;stdcall;
+    // get_Attributes :
+   function get_Attributes(out pDwAttr:LongWord):HRESULT;stdcall;
+  end;
+
+
 // IFontDisp :
 
  IFontDisp = interface(IDispatch)

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

@@ -1443,7 +1443,7 @@
     TWMSetFocus = record
       Msg : UINT;
       FocusedWnd : HWND;
-      Unused : WPARAM;
+      Unused : LPARAM;
       Result : LRESULT;
     end;