[Lazarus-es] Implementar PascalMock
francisco prieto
fajprieto en gmail.com
Vie Jun 20 21:04:45 CEST 2014
No se si estoy mejor o peor Jose porque ahora le puse:
type
// TNoRefCountObject
//
{: Base object to implement interfaces without reference counting }
TNoRefCountObject = class(TObject, IInterface)
protected
function QueryInterface(const*ref* IID: TGUID; out Obj): HResult;
stdcall;
function _AddRef: Integer; stdcall;
function _Release: Integer; stdcall;
end;
implementation
{ TNoRefCountObject }
function TNoRefCountObject.QueryInterface(const*ref* IID: TGUID; out Obj):
HResult;
begin
if GetInterface(IID, Obj) then
Result := 0
else
Result := E_NOINTERFACE;
end;
y me da esta sarta de errores:
NoRefCountObject.pas(29,28) Error: Calling convention doesn't match forward
NoRefCountObject.pas(20,14) Hint: Found declaration:
TNoRefCountObject.QueryInterface(constref TGuid,out <Formal type>):LongInt;
StdCall;
NoRefCountObject.pas(37,28) Error: Calling convention doesn't match forward
NoRefCountObject.pas(21,14) Hint: Found declaration:
TNoRefCountObject._AddRef:LongInt; StdCall;
NoRefCountObject.pas(42,28) Error: Calling convention doesn't match forward
NoRefCountObject.pas(22,14) Hint: Found declaration:
TNoRefCountObject._Release:LongInt; StdCall;
NoRefCountObject.pas(48) Fatal: There were 3 errors compiling module,
stopping
Gracias por la mano,
Pancho
Córdoba
Argentina
2014-06-20 15:55 GMT-03:00 José Mejuto <joshyfun en gmail.com>:
> El 20/06/2014 20:33, francisco prieto escribió:
>
>
> TNoRefCountObject = class(TObject, IInterface)
>> protected
>> function QueryInterface(const IID: TGUID; out Obj): HResult; stdcall;
>>
> function QueryInterface(constREF IID: TGUID; out Obj): HResult;
> stdcall;
>
> function _AddRef: Integer; stdcall;
>> function _Release: Integer; stdcall;
>> end;
>>
>>
> Esa es una diferencia con Delphi, al ser Delphi "Windows Only".
>
> --
>
>
> _______________________________________________
> Lazarus-es mailing list
> Lazarus-es en lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus-es
>
------------ próxima parte ------------
Se ha borrado un adjunto en formato HTML...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus-es/attachments/20140620/65ab91cd/attachment-0002.html>
More information about the Lazarus-es
mailing list