mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-12-16 04:50:51 +01:00
* fix test on non-Windows systems (patch by Olivier Coursière, mantis#28556)
git-svn-id: trunk@31368 -
This commit is contained in:
parent
cb05e1dbf4
commit
db4119ee08
@ -17,15 +17,15 @@ type
|
||||
private
|
||||
refcount: integer;
|
||||
public
|
||||
function QueryInterface(constref iid : tguid;out obj) : Hresult;stdcall;
|
||||
function _AddRef : longint;stdcall;
|
||||
function _Release : longint;stdcall;
|
||||
function QueryInterface(constref iid : tguid;out obj) : Hresult;{$IFNDEF WINDOWS}cdecl{$else}stdcall{$ENDIF};
|
||||
function _AddRef : longint;{$IFNDEF WINDOWS}cdecl{$else}stdcall{$ENDIF};
|
||||
function _Release : longint;{$IFNDEF WINDOWS}cdecl{$else}stdcall{$ENDIF};
|
||||
end;
|
||||
|
||||
var
|
||||
called: Boolean = False;
|
||||
|
||||
function TTest.QueryInterface(constref IID: TGUID; out Obj): Hresult; stdcall;
|
||||
function TTest.QueryInterface(constref IID: TGUID; out Obj): Hresult; {$IFNDEF WINDOWS}cdecl{$else}stdcall{$ENDIF};
|
||||
begin
|
||||
called := true;
|
||||
if getinterface(iid,obj) then
|
||||
@ -34,13 +34,13 @@ begin
|
||||
result:=longint(E_NOINTERFACE);
|
||||
end;
|
||||
|
||||
function TTest._AddRef : longint;stdcall;
|
||||
function TTest._AddRef : longint;{$IFNDEF WINDOWS}cdecl{$else}stdcall{$ENDIF};
|
||||
begin
|
||||
Inc(refcount);
|
||||
result := refcount;
|
||||
end;
|
||||
|
||||
function TTest._Release : longint;stdcall;
|
||||
function TTest._Release : longint;{$IFNDEF WINDOWS}cdecl{$else}stdcall{$ENDIF};
|
||||
begin
|
||||
Dec(refcount);
|
||||
result := refcount;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user