Changeset 347


Ignore:
Timestamp:
Dec 26, 2024, 11:48:56 AM (15 hours ago)
Author:
chronos
Message:
  • Modified: Empty interface reference counting methods.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ItemList.pas

    r346 r347  
    107107    function GetCount: SizeInt; override;
    108108  public
    109   type
    110   var
    111109    NewId: Integer;
    112110    function GetName: string;
    113111    function GetItemFields: TItemFields;
    114112    function Remove(constref AValue: TItem): SizeInt;
    115     function Add(constref AValue: TItem): SizeInt;
     113    function Add(constref AValue: TItem): SizeInt; overload;
    116114    function CreateItem(Name: string = ''): T; virtual;
    117115    function CreateBaseItem(Name: string = ''): TItem;
     
    255253  {$IFNDEF WINDOWS}cdecl{$ELSE}stdcall{$ENDIF};
    256254begin
    257   Result := 0;
     255  if GetInterface(IID, Obj) then Result := 0
     256    else Result := E_NOINTERFACE;
    258257end;
    259258
    260259function TItemList<T>._AddRef: LongInt; {$IFNDEF WINDOWS}cdecl{$ELSE}stdcall{$ENDIF};
    261260begin
    262   Result := 0;
     261  Result := -1;
    263262end;
    264263
    265264function TItemList<T>._Release: LongInt; {$IFNDEF WINDOWS}cdecl{$ELSE}stdcall{$ENDIF};
    266265begin
    267   Result := 0;
     266  Result := -1;
    268267end;
    269268
Note: See TracChangeset for help on using the changeset viewer.