методу _Release нельзя сделать
override не потому, что он
stdcall, а потому, что он не виртуальный.
В Вашем случае надо делать так
Код:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | type
TMyClass = class (TInterfacedObject,
IUnknown,
IInterface1,
IInterface2,
...
IInterfacen)
protected
function QueryInterface( const IID: TGUID; out Obj): HResult; stdcall;
function _AddRef: Integer ; stdcall;
function _Release: Integer ; stdcall;
...
end ;
function TMyClass .QueryInterface( const IID: TGUID; out Obj): HResult;
begin
Result := inherited QueryInterface(IID,Obj);
end ;
function TMyClass ._AddRef: Integer ;
begin
Result := inherited _AddRef;
end ;
function TMyClass ._Release: Integer ;
begin
Result := inherited _Release
end ;
|