diff options
-rw-r--r-- | compiler/utils/msgdif.pp | 2 | ||||
-rw-r--r-- | packages/base/winunits/activex.pp | 25 | ||||
-rw-r--r-- | rtl/objpas/classes/classesh.inc | 9 | ||||
-rw-r--r-- | rtl/objpas/classes/compon.inc | 4 | ||||
-rw-r--r-- | rtl/objpas/types.pp | 22 |
5 files changed, 35 insertions, 27 deletions
diff --git a/compiler/utils/msgdif.pp b/compiler/utils/msgdif.pp index 47be800827..4b49775bfb 100644 --- a/compiler/utils/msgdif.pp +++ b/compiler/utils/msgdif.pp @@ -362,7 +362,7 @@ function MsgToSet(const Msg, FileName: string; var R: TArgSet): Boolean; begin j:=i+1; l:=length(msg)+1; while (j<l) and (Msg[j] in ['0'..'9']) do Inc(j); - if j = l then + if j > (i+1) then begin val(copy(Msg,i+1,j-i-1),num,code); if num > high(TArgSet) then begin diff --git a/packages/base/winunits/activex.pp b/packages/base/winunits/activex.pp index c723d4cdef..7c79775dbc 100644 --- a/packages/base/winunits/activex.pp +++ b/packages/base/winunits/activex.pp @@ -1125,22 +1125,10 @@ TYPE - tagSTATSTG = record - pwcsName : POleStr; - dwType : DWord; - cbSize : ULarge_integer; - mtime : TFileTime; - ctime : TFileTime; - atime : TFileTime; - grfMode : DWord; - grfLocksSupported : DWord; - clsid : TCLSID; - grfStateBits : DWord; - reserved : DWord; - end; + tagSTATSTG = types.tagSTATSTG; TStatStg = tagSTATSTG; - PStatStg = ^TStatStg; + PStatStg = types.PStatStg; STATSTG = TStatStg; { TagRemSNB = Record @@ -2724,6 +2712,15 @@ TYPE POleMenuGroupWidths = LPOLEMENUGROUPWIDTHS; + IProvideClassInfo = Interface (IUnknown) + ['{B196B283-BAB4-101A-B69C-00AA00341D07}'] + function GetClassInfo(out pptti : ITypeInfo):HResult; StdCall; + end; + IProvideClassInfo2 = Interface (IProvideClassInfo) + ['{A6BC3AC0-DBAA-11CE-9DE3-00AA004BB851}'] + function GetGUID(dwguid:DWord;out pguid:TGUID):HResult; StdCall; + end; + { ****************************************************************************************************************** stuff from objbase.h ****************************************************************************************************************** } diff --git a/rtl/objpas/classes/classesh.inc b/rtl/objpas/classes/classesh.inc index 0043e30de8..64a436f5e4 100644 --- a/rtl/objpas/classes/classesh.inc +++ b/rtl/objpas/classes/classesh.inc @@ -1382,6 +1382,11 @@ type end; } + IInterfaceComponentReference = interface + ['{3FEEC8E1-E400-4A24-BCAC-1F01476439B1}'] + function GetComponent:TComponent; + end; + IDesignerNotify = interface ['{B971E807-E3A6-11D1-AAB1-00C04FB16FBC}'] procedure Modified; @@ -1392,7 +1397,7 @@ type { TComponent } - TComponent = class(TPersistent,IUnknown) + TComponent = class(TPersistent,IUnknown,IInterfaceComponentReference) private FOwner: TComponent; FName: TComponentName; @@ -1445,6 +1450,7 @@ type function QueryInterface(const IID: TGUID; out Obj): Hresult; virtual; stdcall; function _AddRef: Integer; stdcall; function _Release: Integer; stdcall; + function iicrGetComponent: TComponent; { IDispatch } //!!!! function GetTypeInfoCount(out Count: Integer): Integer; stdcall; //!!!! function GetTypeInfo(Index, LocaleID: Integer; out TypeInfo): Integer; stdcall; @@ -1454,6 +1460,7 @@ type //!!!! Flags: Word; var Params; VarResult, ExcepInfo, ArgErr: Pointer): Integer; stdcall; public //!! Moved temporary + function IInterfaceComponentReference.GetComponent=iicrgetcomponent; procedure WriteState(Writer: TWriter); virtual; constructor Create(AOwner: TComponent); virtual; procedure BeforeDestruction; override; diff --git a/rtl/objpas/classes/compon.inc b/rtl/objpas/classes/compon.inc index 502c318dc3..070e7dee53 100644 --- a/rtl/objpas/classes/compon.inc +++ b/rtl/objpas/classes/compon.inc @@ -580,4 +580,8 @@ begin result:=-1; end; +function TComponent.iicrGetComponent: TComponent; +begin + result:=self; +end; diff --git a/rtl/objpas/types.pp b/rtl/objpas/types.pp index 8a4989b2ca..de2a1930fe 100644 --- a/rtl/objpas/types.pp +++ b/rtl/objpas/types.pp @@ -228,17 +228,17 @@ type packed {$endif FPC_REQUIRES_PROPER_ALIGNMENT} record - pwcsName : POleStr; - dwType : Longint; - cbSize : Largeint; - mtime : TFileTime; - ctime : TFileTime; - atime : TFileTime; - grfMode : Longint; - grfLocksSupported : Longint; - clsid : TCLSID; - grfStateBits : Longint; - reserved : Longint; + pwcsName : POleStr; + dwType : DWord; + cbSize : Large_uint; + mtime : TFileTime; + ctime : TFileTime; + atime : TFileTime; + grfMode : DWord; + grfLocksSupported : DWord; + clsid : TCLSID; + grfStateBits : DWord; + reserved : DWord; end; TStatStg = tagSTATSTG; STATSTG = TStatStg; |