summaryrefslogtreecommitdiff
path: root/packages/winunits-base/src
diff options
context:
space:
mode:
Diffstat (limited to 'packages/winunits-base/src')
-rw-r--r--packages/winunits-base/src/activex.pp102
-rw-r--r--packages/winunits-base/src/shlobj.pp34
-rw-r--r--packages/winunits-base/src/stdole2.pas114
-rw-r--r--packages/winunits-base/src/typelib.pas27
4 files changed, 101 insertions, 176 deletions
diff --git a/packages/winunits-base/src/activex.pp b/packages/winunits-base/src/activex.pp
index 942f4edaf7..e981acb46d 100644
--- a/packages/winunits-base/src/activex.pp
+++ b/packages/winunits-base/src/activex.pp
@@ -665,6 +665,8 @@ Const
DISPID_AMBIENT_USERAGENT = -5513;
DISPID_SECURITYDOMAIN = -5514;
+ MEMBERID_NIL = -1;
+
DISPATCH_METHOD = $1;
DISPATCH_PROPERTYGET = $2;
DISPATCH_PROPERTYPUT = $4;
@@ -1104,6 +1106,9 @@ Const
OLERENDER_FORMAT = 2;
OLERENDER_ASIS = 3;
+ OLEVERBATTRIB_NEVERDIRTIES = 1;
+ OLEVERBATTRIB_ONCONTAINERMENU = 2;
+
XFORMCOORDS_POSITION = $1;
XFORMCOORDS_SIZE = $2;
XFORMCOORDS_HIMETRICTOCONTAINER = $4;
@@ -1842,6 +1847,7 @@ TYPE
StorageLayout = tagStorageLayout;
+ PtagSTATDATA = ^tagSTATDATA;
tagSTATDATA = Record
// field used by:
FORMATETC : Tformatetc; // EnumAdvise, EnumData (cache), EnumFormats
@@ -1849,6 +1855,8 @@ TYPE
padvSink : Pointer {IAdviseSink}; // EnumAdvise
dwConnection: DWord; // EnumAdvise
End;
+ PStatData = PtagSTATDATA;
+ TStatData = tagSTATDATA;
STATDATA = TagStatData;
LPStatData = ^StatData;
@@ -1867,8 +1875,20 @@ TYPE
End;
TYPEDESC = tagTYPEDESC;
-
-
+ PtagOBJECTDESCRIPTOR = ^tagOBJECTDESCRIPTOR;
+ tagOBJECTDESCRIPTOR = packed record
+ cbSize : LongWord;
+ clsid : TCLSID;
+ dwDrawAspect : LongWord;
+ sizel : SIZEL;
+ pointl : POINTL;
+ dwStatus : LongWord;
+ dwFullUserTypeName : LongWord;
+ dwSrcOfCopy : LongWord;
+ end;
+ POBJECTDESCRIPTOR = PtagOBJECTDESCRIPTOR;
+ TOBJECTDESCRIPTOR = tagOBJECTDESCRIPTOR;
+ OBJECTDESCRIPTOR = TOBJECTDESCRIPTOR;
tagARRAYDESC = Record
tdescElem : TYPEDESC; // element type
@@ -2579,23 +2599,21 @@ TYPE
['{7FD52380-4E07-101B-AE2D-08002B2EC713}']
Function IsDirty:HResult;StdCall;
Function Load(pstm:IStream):HResult;StdCall;
- Function Save(pstm:IStream;fClearDirty:Integer):HResult;StdCall;
+ Function Save(pstm:IStream;fClearDirty:Bool):HResult;StdCall;
Function GetSizeMax(out pCbSize:_ULARGE_INTEGER):HResult;StdCall;
Function InitNew:HResult;StdCall;
End;
- // IPersistMemory :
IPersistMemory = interface(IPersist)
['{BD1AE5E0-A6AE-11CE-BD37-504200C10000}']
function IsDirty:HResult;StdCall;
function Load(var pMem:pointer;cbSize:LongWord):HResult;StdCall;
- function Save(out pMem:pointer;fClearDirty:Integer;cbSize:LongWord):HResult;StdCall;
+ function Save(out pMem:pointer;fClearDirty:Bool;cbSize:LongWord):HResult;StdCall;
function GetSizeMax(out pCbSize:LongWord):HResult;StdCall;
function InitNew:HResult;StdCall;
end;
-
PIMoniker = ^IMoniker;
IMoniker = Interface (IPersistStream)
['{0000000f-0000-0000-C000-000000000046}']
@@ -3536,7 +3554,7 @@ TYPE
['{37D84F60-42CB-11CE-8135-00AA004BB851}']
function InitNew:HResult;stdcall;
function Load(pPropBag:IPropertyBag;pErrorLog:IErrorLog):HResult;stdcall;
- function Save(pPropBag:IPropertyBag;fClearDirty:Integer;fSaveAllProperties:Integer):HResult;stdcall;
+ function Save(pPropBag:IPropertyBag;fClearDirty:Bool;fSaveAllProperties:Bool):HResult;stdcall;
end;
IEnumGUID = interface(IUnknown)
@@ -3620,31 +3638,26 @@ type
function GetMultiTypeInfoCount(out pcti:LongWord):HResult; StdCall;
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}']
function GetControlInfo(var pCI:tagCONTROLINFO):HRESULT;stdcall;
function OnMnemonic(var pMsg:tagMSG):HRESULT;stdcall;
function OnAmbientPropertyChange(dispID:Integer):HRESULT;stdcall;
- function FreezeEvents(bFreeze:Integer):HRESULT;stdcall;
+ function FreezeEvents(bFreeze:Bool):HRESULT;stdcall;
end;
-// IOleControlSite :
-
IOleControlSite = interface(IUnknown)
['{B196B289-BAB4-101A-B69C-00AA00341D07}']
function OnControlInfoChanged:HRESULT;stdcall;
- function LockInPlaceActive(fLock:Integer):HRESULT;stdcall;
+ function LockInPlaceActive(fLock:Bool):HRESULT;stdcall;
function GetExtendedControl(out ppDisp:IDispatch):HRESULT;stdcall;
function TransformCoords(var pPtlHimetric:_POINTL;var pPtfContainer:tagPOINTF;dwFlags:LongWord):HRESULT;stdcall;
function TranslateAccelerator(var pMsg:tagMSG;grfModifiers:LongWord):HRESULT;stdcall;
- function OnFocus(fGotFocus:Integer):HRESULT;stdcall;
+ function OnFocus(fGotFocus:Bool):HRESULT;stdcall;
function ShowPropertyFrame:HRESULT;stdcall;
end;
-// IPerPropertyBrowsing :
-
IPerPropertyBrowsing = interface(IUnknown)
['{376BD3AA-3845-101B-84ED-08002B2EC713}']
function GetDisplayString(dispID:Integer;out pBstr:WideString):HRESULT;stdcall;
@@ -3653,14 +3666,12 @@ type
function GetPredefinedValue(dispID:Integer;dwCookie:LongWord;out pVarOut:OleVariant):HRESULT;stdcall;
end;
-// IPropertyPage :
-
IPropertyPageSite = interface;
IPropertyPage = interface(IUnknown)
['{B196B28D-BAB4-101A-B69C-00AA00341D07}']
function SetPageSite(pPageSite:IPropertyPageSite):HRESULT;stdcall;
- function Activate(hWndParent:wireHWND;var pRect:TRECT;bModal:Integer):HRESULT;stdcall;
+ function Activate(hWndParent:wireHWND;var pRect:TRECT;bModal:Bool):HRESULT;stdcall;
function Deactivate:HRESULT;stdcall;
function GetPageInfo(out pPageInfo:tagPROPPAGEINFO):HRESULT;stdcall;
function SetObjects(cObjects:LongWord;var ppUnk:IUnknown):HRESULT;stdcall;
@@ -3672,8 +3683,6 @@ type
function TranslateAccelerator(var pMsg:tagMSG):HRESULT;stdcall;
end;
-// IPropertyPageSite :
-
IPropertyPageSite = interface(IUnknown)
['{B196B28C-BAB4-101A-B69C-00AA00341D07}']
function OnStatusChange(dwFlags:LongWord):HRESULT;stdcall;
@@ -3682,52 +3691,42 @@ type
function TranslateAccelerator(var pMsg:tagMSG):HRESULT;stdcall;
end;
-// IPropertyPage2 :
-
IPropertyPage2 = interface(IPropertyPage)
['{01E44665-24AC-101B-84ED-08002B2EC713}']
function EditProperty(dispID:Integer):HRESULT;stdcall;
end;
-// IPropertyNotifySink :
-
IPropertyNotifySink = interface(IUnknown)
['{9BFBBC02-EFF1-101A-84ED-00AA00341D07}']
function OnChanged(dispID:Integer):HRESULT;stdcall;
function OnRequestEdit(dispID:Integer):HRESULT;stdcall;
end;
- // ISpecifyPropertyPages :
-
ISpecifyPropertyPages = interface(IUnknown)
['{B196B28B-BAB4-101A-B69C-00AA00341D07}']
function GetPages(out pPages:tagCAUUID):HRESULT;stdcall;
end;
-// ISimpleFrameSite :
-
ISimpleFrameSite = interface(IUnknown)
['{742B0E01-14E6-101B-914E-00AA00300CAB}']
function PreMessageFilter(hwnd:wireHWND;msg:UInt;wp:UINT_PTR;lp:LONG_PTR;out plResult:LONG_PTR;out pdwCookie:LongWord):HRESULT;stdcall;
function PostMessageFilter(hwnd:wireHWND;msg:UInt;wp:UINT_PTR;lp:LONG_PTR;out plResult:LONG_PTR;dwCookie:LongWord):HRESULT;stdcall;
end;
-// IFont :
-
IFont = interface(IUnknown)
['{BEF6E002-A874-101A-8BBA-00AA00300CAB}']
function get_Name(out pName:WideString):HRESULT;stdcall;
function put_Name(name:WideString):HRESULT;stdcall;
function get_Size(out pSize:Currency):HRESULT;stdcall;
function put_Size(size:Currency):HRESULT;stdcall;
- function get_Bold(out pBold:Integer):HRESULT;stdcall;
- function put_Bold(bold:Integer):HRESULT;stdcall;
- function get_Italic(out pItalic:Integer):HRESULT;stdcall;
- function put_Italic(italic:Integer):HRESULT;stdcall;
- function get_Underline(out pUnderline:Integer):HRESULT;stdcall;
- function put_Underline(underline:Integer):HRESULT;stdcall;
- function get_Strikethrough(out pStrikethrough:Integer):HRESULT;stdcall;
- function put_Strikethrough(strikethrough:Integer):HRESULT;stdcall;
+ function get_Bold(out pBold:Bool):HRESULT;stdcall;
+ function put_Bold(bold:Bool):HRESULT;stdcall;
+ function get_Italic(out pItalic:Bool):HRESULT;stdcall;
+ function put_Italic(italic:Bool):HRESULT;stdcall;
+ function get_Underline(out pUnderline:Bool):HRESULT;stdcall;
+ function put_Underline(underline:Bool):HRESULT;stdcall;
+ function get_Strikethrough(out pStrikethrough:Bool):HRESULT;stdcall;
+ function put_Strikethrough(strikethrough:Bool):HRESULT;stdcall;
function get_Weight(out pWeight:Smallint):HRESULT;stdcall;
function put_Weight(weight:Smallint):HRESULT;stdcall;
function get_Charset(out pCharset:Smallint):HRESULT;stdcall;
@@ -3742,8 +3741,6 @@ type
function SetHdc(hDC:wireHDC):HRESULT;stdcall;
end;
-// IPicture :
-
IPicture = interface(IUnknown)
['{7BF80980-BF32-101A-8BBB-00AA00300CAB}']
function get_Handle(out pHandle:OLE_HANDLE):HRESULT;stdcall;
@@ -3755,10 +3752,10 @@ type
function set_hPal(hPal:OLE_HANDLE):HRESULT;stdcall;
function get_CurDC(out phDC:wireHDC):HRESULT;stdcall;
function SelectPicture(hDCIn:wireHDC;out phDCOut:wireHDC;out phBmpOut:OLE_HANDLE):HRESULT;stdcall;
- function get_KeepOriginalFormat(out pKeep:Integer):HRESULT;stdcall;
- function put_KeepOriginalFormat(keep:Integer):HRESULT;stdcall;
+ function get_KeepOriginalFormat(out pKeep:Bool):HRESULT;stdcall;
+ function put_KeepOriginalFormat(keep:Bool):HRESULT;stdcall;
function PictureChanged:HRESULT;stdcall;
- function SaveAsFile(pStream:IStream;fSaveMemCopy:Integer;out pCbSize:Integer):HRESULT;stdcall;
+ function SaveAsFile(pStream:IStream;fSaveMemCopy:Bool;out pCbSize:Integer):HRESULT;stdcall;
function get_Attributes(out pDwAttr:LongWord):HRESULT;stdcall;
end;
@@ -3780,15 +3777,10 @@ type
function get_Attributes(out pDwAttr:LongWord):HRESULT;stdcall;
end;
-
-// IFontDisp :
-
IFontDisp = interface(IDispatch)
['{BEF6E003-A874-101A-8BBA-00AA00300CAB}']
end;
-// IPictureDisp :
-
IPictureDisp = interface(IDispatch)
['{7BF80981-BF32-101A-8BBB-00AA00300CAB}']
end;
@@ -3979,8 +3971,8 @@ type
IOleInPlaceSiteEx = interface(IOleInPlaceSite)
['{9C2CAD80-3424-11CF-B670-00AA004CD6D8}']
- function OnInPlaceActivateEx(out pfNoRedraw:Integer;dwFlags:LongWord):HResult;stdcall;
- function OnInPlaceDeactivateEx(fNoRedraw:Integer):HResult;stdcall;
+ function OnInPlaceActivateEx(out pfNoRedraw:Bool;dwFlags:LongWord):HResult;stdcall;
+ function OnInPlaceDeactivateEx(fNoRedraw:Bool):HResult;stdcall;
function RequestUIActivate:HResult;stdcall;
end;
@@ -3988,13 +3980,13 @@ type
['{922EADA0-3424-11CF-B670-00AA004CD6D8}']
function CanWindowlessActivate:HResult;stdcall;
function GetCapture:HResult;stdcall;
- function SetCapture(fCapture:Integer):HResult;stdcall;
+ function SetCapture(fCapture:Bool):HResult;stdcall;
function GetFocus:HResult;stdcall;
- function SetFocus(fFocus:Integer):HResult;stdcall;
+ function SetFocus(fFocus:Bool):HResult;stdcall;
function GetDC(var pRect:tagRECT;grfFlags:LongWord;out phDC:wireHDC):HResult;stdcall;
function ReleaseDC(hDC:wireHDC):HResult;stdcall;
- function InvalidateRect(var pRect:tagRECT;fErase:Integer):HResult;stdcall;
- function InvalidateRgn(hRGN:wireHRGN;fErase:Integer):HResult;stdcall;
+ function InvalidateRect(var pRect:tagRECT;fErase:Bool):HResult;stdcall;
+ function InvalidateRgn(hRGN:wireHRGN;fErase:Bool):HResult;stdcall;
function ScrollRect(dx:SYSINT;dy:SYSINT;var pRectScroll:tagRECT;var pRectClip:tagRECT):HResult;stdcall;
function AdjustRect(var prc:tagRECT):HResult;stdcall;
function OnDefWindowMessage(msg:UInt;wParam:UINT_PTR;lParam:LONG_PTR;out plResult:LONG_PTR):HResult;stdcall;
@@ -4070,7 +4062,7 @@ type
function Uncache(dwConnection:LongWord):HRESULT;stdcall;
function EnumCache(out ppenumSTATDATA:IEnumSTATDATA):HRESULT;stdcall;
function InitCache(pDataObject:IDataObject):HRESULT;stdcall;
- function SetData(var pFormatetc:tagFORMATETC;var pmedium:wireSTGMEDIUM;fRelease:Integer):HRESULT;stdcall;
+ function SetData(var pFormatetc:tagFORMATETC;var pmedium:wireSTGMEDIUM;fRelease:Bool):HRESULT;stdcall;
end;
IOleCache2 = interface(IOleCache)
diff --git a/packages/winunits-base/src/shlobj.pp b/packages/winunits-base/src/shlobj.pp
index f94a14a465..37e43dbd00 100644
--- a/packages/winunits-base/src/shlobj.pp
+++ b/packages/winunits-base/src/shlobj.pp
@@ -243,6 +243,12 @@ Const
GCS_HELPTEXTW = $00000005; // help text (unicode version)
GCS_VALIDATEW = $00000006; // validate command exists (unicode)
GCS_UNICODE = $00000004; // for bit testing - Unicode string
+ CMIC_MASK_ICON = $00000010;
+ CMIC_MASK_HOTKEY = $00000020;
+ CMIC_MASK_FLAG_NO_UI = $00000400;
+ CMIC_MASK_UNICODE = $00004000;
+ CMIC_MASK_NO_CONSOLE = $00008000;
+ CMIC_MASK_ASYNCOK = $00100000;
CMIC_MASK_SHIFT_DOWN = $10000000;
CMIC_MASK_CONTROL_DOWN = $40000000;
CMIC_MASK_PTINVOKE = $20000000;
@@ -408,6 +414,26 @@ Const
BIF_BROWSEFORPRINTER = $2000; // Browsing for Printers
BIF_BROWSEINCLUDEFILES = $4000; // Browsing for Everything
BIF_SHAREABLE = $8000; // sharable resources displayed (remote shares, requires BIF_USENEWUI)
+ BFFM_INITIALIZED = $0001;
+ BFFM_SELCHANGED = $0002;
+ BFFM_VALIDATEFAILEDA = $0003;
+ BFFM_VALIDATEFAILEDW = $0004;
+ BFFM_SETSTATUSTEXTA = WM_USER + 100;
+ BFFM_SETSTATUSTEXTW = WM_USER + 104;
+ BFFM_ENABLEOK = WM_USER + 101;
+ BFFM_SETSELECTIONA = WM_USER + 102;
+ BFFM_SETSELECTIONW = WM_USER + 103;
+ BFFM_SETOKTEXT = WM_USER + 105;
+ BFFM_SETEXPANDED = WM_USER + 106;
+ {$ifdef Unicode}
+ BFFM_SETSTATUSTEXT = BFFM_SETSTATUSTEXTW;
+ BFFM_SETSELECTION = BFFM_SETSELECTIONW;
+ BFFM_VALIDATEFAILED = BFFM_VALIDATEFAILEDW;
+ {$else}
+ BFFM_SETSTATUSTEXT = BFFM_SETSTATUSTEXTA;
+ BFFM_SETSELECTION = BFFM_SETSELECTIONA;
+ BFFM_VALIDATEFAILED = BFFM_VALIDATEFAILEDA;
+ {$endif}
PROGDLG_NORMAL = $00000000; // default normal progress dlg behavior
PROGDLG_MODAL = $00000001; // the dialog is modal to its hwndParent (default is modeless)
PROGDLG_AUTOTIME = $00000002; // automatically updates the "Line3" text with the "time remaining" (you cant call SetLine3 if you passs this!)
@@ -1946,7 +1972,13 @@ Type
function Skip(celt: ULONG): HRESULT; stdcall; function Reset: HRESULT; stdcall;
function Clone(out ppenum: IEnumExtraSearch): HRESULT; stdcall;
end;
-
+
+ IShellDetails = interface(IUnknown)
+ ['{000214EC-0000-0000-C000-000000000046}']
+ function GetDetailsOf(pidl:LPCITEMIDLIST;iColumn:UINT;pDetails:PSHELLDETAILS):HResult;StdCall;
+ function ColumnClick(iColumn:UINT):HResult;StdCall;
+ end;
+
IShellFolder = interface(IUnknown)
['{000214E6-0000-0000-C000-000000000046}']
function ParseDisplayName(hwndOwner: HWND; pbcReserved: Pointer; lpszDisplayName: POLESTR; out pchEaten: ULONG; out ppidl: PItemIDList; var dwAttributes: ULONG): HRESULT; stdcall;
diff --git a/packages/winunits-base/src/stdole2.pas b/packages/winunits-base/src/stdole2.pas
index 1107f7b6df..a33cb428ec 100644
--- a/packages/winunits-base/src/stdole2.pas
+++ b/packages/winunits-base/src/stdole2.pas
@@ -45,10 +45,11 @@ Const
//Forward declarations
Type
- IEnumVARIANT = interface;
- IFont = interface;
+ // for activex aliases see mantis 25907
+ IEnumVARIANT = ActiveX.IEnumVariant;
+ IFont = ActiveX.IFont;
Font = dispinterface;
- IPicture = interface;
+ IPicture = ActiveX.IPicture;
Picture = dispinterface;
FontEvents = dispinterface;
@@ -93,71 +94,6 @@ Type
//interface declarations
-// IEnumVARIANT :
-
- IEnumVARIANT = interface(IUnknown)
- ['{00020404-0000-0000-C000-000000000046}']
- // Next :
- procedure Next(celt:LongWord;var rgvar:OleVariant;out pceltFetched:LongWord);stdcall;
- // Skip :
- procedure Skip(celt:LongWord);stdcall;
- // Reset_ :
- procedure Reset_;stdcall;
- // Clone :
- procedure Clone(out ppenum:IEnumVARIANT);stdcall;
- end;
-
-// IFont : Font Object
-
- IFont = interface(IUnknown)
- ['{BEF6E002-A874-101A-8BBA-00AA00300CAB}']
- function Get_Name : WideString; stdcall;
- procedure Set_Name(const pname:WideString); stdcall;
- function Get_Size : Currency; stdcall;
- procedure Set_Size(const psize:Currency); stdcall;
- function Get_Bold : WordBool; stdcall;
- procedure Set_Bold(const pbold:WordBool); stdcall;
- function Get_Italic : WordBool; stdcall;
- procedure Set_Italic(const pitalic:WordBool); stdcall;
- function Get_Underline : WordBool; stdcall;
- procedure Set_Underline(const punderline:WordBool); stdcall;
- function Get_Strikethrough : WordBool; stdcall;
- procedure Set_Strikethrough(const pstrikethrough:WordBool); stdcall;
- function Get_Weight : Smallint; stdcall;
- procedure Set_Weight(const pweight:Smallint); stdcall;
- function Get_Charset : Smallint; stdcall;
- procedure Set_Charset(const pcharset:Smallint); stdcall;
- function Get_hFont : OLE_HANDLE; stdcall;
- // Clone :
- procedure Clone(out ppfont:IFont);stdcall;
- // IsEqual :
- procedure IsEqual(pfontOther:IFont);stdcall;
- // SetRatio :
- procedure SetRatio(cyLogical:Integer;cyHimetric:Integer);stdcall;
- // AddRefHfont :
- procedure AddRefHfont(hFont:OLE_HANDLE);stdcall;
- // ReleaseHfont :
- procedure ReleaseHfont(hFont:OLE_HANDLE);stdcall;
- // Name :
- property Name:WideString read Get_Name write Set_Name;
- // Size :
- property Size:Currency read Get_Size write Set_Size;
- // Bold :
- property Bold:WordBool read Get_Bold write Set_Bold;
- // Italic :
- property Italic:WordBool read Get_Italic write Set_Italic;
- // Underline :
- property Underline:WordBool read Get_Underline write Set_Underline;
- // Strikethrough :
- property Strikethrough:WordBool read Get_Strikethrough write Set_Strikethrough;
- // Weight :
- property Weight:Smallint read Get_Weight write Set_Weight;
- // Charset :
- property Charset:Smallint read Get_Charset write Set_Charset;
- // hFont :
- property hFont:OLE_HANDLE read Get_hFont ;
- end;
-
// Font :
Font = dispinterface
@@ -180,48 +116,6 @@ Type
property Charset:Smallint dispid 8;
end;
-// IPicture : Picture Object
-
- IPicture = interface(IUnknown)
- ['{7BF80980-BF32-101A-8BBB-00AA00300CAB}']
- function Get_Handle : OLE_HANDLE; stdcall;
- function Get_hPal : OLE_HANDLE; stdcall;
- function Get_Type_ : Smallint; stdcall;
- function Get_Width : OLE_XSIZE_HIMETRIC; stdcall;
- function Get_Height : OLE_YSIZE_HIMETRIC; stdcall;
- // Render :
- procedure Render(hdc:SYSINT;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:pointer);stdcall;
- procedure Set_hPal(const phpal:OLE_HANDLE); stdcall;
- function Get_CurDC : SYSINT; stdcall;
- // SelectPicture :
- procedure SelectPicture(hdcIn:SYSINT;out phdcOut:SYSINT;out phbmpOut:OLE_HANDLE);stdcall;
- function Get_KeepOriginalFormat : WordBool; stdcall;
- procedure Set_KeepOriginalFormat(const pfkeep:WordBool); stdcall;
- // PictureChanged :
- procedure PictureChanged;stdcall;
- // SaveAsFile :
- procedure SaveAsFile(var pstm:pointer;fSaveMemCopy:WordBool;out pcbSize:Integer);stdcall;
- function Get_Attributes : Integer; stdcall;
- // SetHdc :
- procedure SetHdc(hdc:OLE_HANDLE);stdcall;
- // Handle :
- property Handle:OLE_HANDLE read Get_Handle ;
- // hPal :
- property hPal:OLE_HANDLE read Get_hPal write Set_hPal;
- // Type :
- property Type_:Smallint read Get_Type_ ;
- // Width :
- property Width:OLE_XSIZE_HIMETRIC read Get_Width ;
- // Height :
- property Height:OLE_YSIZE_HIMETRIC read Get_Height ;
- // CurDC :
- property CurDC:SYSINT read Get_CurDC ;
- // KeepOriginalFormat :
- property KeepOriginalFormat:WordBool read Get_KeepOriginalFormat write Set_KeepOriginalFormat;
- // Attributes :
- property Attributes:Integer read Get_Attributes ;
- end;
-
// Picture :
Picture = dispinterface
diff --git a/packages/winunits-base/src/typelib.pas b/packages/winunits-base/src/typelib.pas
index 32aa1d687f..42f835022b 100644
--- a/packages/winunits-base/src/typelib.pas
+++ b/packages/winunits-base/src/typelib.pas
@@ -116,7 +116,7 @@ Type
function TypeToString(TI: ITypeInfo; TD: TYPEDESC): string; virtual;
function ValidateID(id: string): boolean; virtual;
function ValidateIDAgainstDeclared(id: string): boolean; virtual;
- function MakeValidId(id:string;var valid:string): boolean; virtual;
+ function MakeValidId(id:string;out valid:string): boolean; virtual;
function MakeValidIdAgainstDeclared(id:string;var valid:string): boolean;
function RemoveTag(typename: string): string;
// The actual routines that do the work.
@@ -234,6 +234,7 @@ begin
VT_SAFEARRAY:Result:='PSafeArray';
VT_LPWSTR:Result:='PWideChar';
VT_LPSTR:Result:='PChar';
+ VT_DECIMAL:Result:='TDecimal';
else
Result := 'Unknown (' + IntToStr(ParamType) + ')';
end;
@@ -289,7 +290,7 @@ begin
result:=i<0;
end;
-function TTypeLibImporter.MakeValidId(id:string;var valid:string): boolean;
+function TTypeLibImporter.MakeValidId(id:string;out valid:string): boolean;
begin
result:= ValidateID(id);
if result then
@@ -399,7 +400,9 @@ begin
else
sRefSrc:=GUIDToString(LARef^.GUID);
RegCloseKey(Handle);
- end;
+ end
+ else
+ sRefSrc:='DLL not registered in the system';
AddToHeader('// Dependency: %s v%d.%d (%s)',[BstrName,LARef^.wMajorVerNum,LARef^.wMinorVerNum,sRefSrc]);
FUses.Add(sl);
TLRef.ReleaseTLibAttr(LARef);
@@ -451,7 +454,7 @@ var
RTIT: HREFTYPE;
TIref: ITypeInfo;
BstrName,BstrNameRef,BstrDocString : WideString;
- s,sl,sPropIntfc,sPropDispIntfc,sType,sConv,sFunc,sPar,sVarName,sMethodName,
+ s,sl,sPropDispIntfc,sType,sConv,sFunc,sPar,sVarName,sMethodName,
sPropParam,sPropParam2,sPropParam3:string;
sEventSignatures,sEventFunctions,sEventProperties,sEventImplementations:string;
i,j,k:integer;
@@ -497,13 +500,16 @@ var
function GetName(i:integer):string; //bug in Office10\MSacc.OLB _WizHook.Key
begin
- if i<cnt then
- result:=BL[i]
- else
+ result:='';
+ if i<integer(cnt) then
+ result:=BL[i];
+ if result='' then //No name ?
result:='Param'+inttostr(i);
end;
begin
+ FillMemory(@TD,Sizeof(TD),0);
+ TD.vt:=VT_ILLEGAL;
Propertycnt:=0;
SetLength(aPropertyDefs,TA^.cFuncs+TA^.cVars); // worst case, all functions getters or all setters
sEventSignatures:='';
@@ -531,7 +537,6 @@ begin
s:=format(#13#10'// %s : %s'#13#10#13#10' %sDisp = dispinterface'#13#10,[iname,iDoc,iname])
else
s:=format(#13#10'// %s : %s'#13#10#13#10' %s = dispinterface'#13#10,[iname,iDoc,iname]);
- sPropIntfc:='';
sPropDispIntfc:='';
s:=s+format(' [''%s'']'#13#10,[GUIDToString(TA^.GUID)]);
for j:=0 to TA^.cFuncs-1 do
@@ -1099,7 +1104,7 @@ Procedure TTypeLibImporter.CreateForwards(Const TL : ITypeLib; TICount : Integer
Var
i, j: integer;
BstrName, BstrNameRef : WideString;
- dwHelpContext: DWORD;
+// dwHelpContext: DWORD;
TI, TIref:ITypeInfo;
TA:LPTYPEATTR;
TIT: TYPEKIND;
@@ -1323,7 +1328,8 @@ Var
BstrName, BstrDocString, BstrHelpFile, BstrNameRef : WideString;
dwHelpContext : DWORD;
TI,TIref,TIref2 : ITypeInfo;
- TA,TAref,TAref2 : LPTYPEATTR;
+ TA,TAref: LPTYPEATTR;
+ //TAref2 : LPTYPEATTR;
TIT : TYPEKIND;
RTIT : HREFTYPE;
sl: string;
@@ -1767,6 +1773,7 @@ var
begin
Header.Clear;
InterfaceSection.Clear;
+ TL:=nil;
OleCheck(LoadTypeLib(PWidechar(InputFileName), TL ));
OleCheck(TL.GetLibAttr(LA));
try