Hi All,
I have a question regarding compiling a Delphi project to Lazarus.
When running the compilation of the following script:
{ Implements only the write method of OLE IStream on VCL TWriter }
TWriterAdapter = class(TInterfacedObject, ISequentialStream, IStream)
private
Writer: TWriter;
public
constructor Create(AWriter: TWriter);
function Read(pv: Pointer; cb: Longint; pcbRead: PLongint): HResult; stdcall;
function Write(pv: Pointer; cb: Longint; pcbWritten: PLongint): HResult; stdcall;
function Seek(dlibMove: Largeint; dwOrigin: Longint;
out libNewPosition: Largeint): HResult; stdcall;
function SetSize(libNewSize: Largeint): HResult; stdcall;
function CopyTo(stm: IStream; cb: Largeint; out cbRead: Largeint;
out cbWritten: Largeint): HResult; stdcall;
function Commit(grfCommitFlags: Longint): HResult; stdcall;
function Revert: HResult; stdcall;
function LockRegion(libOffset: Largeint; cb: Largeint;
dwLockType: Longint): HResult; stdcall;
function UnlockRegion(libOffset: Largeint; cb: Largeint;
dwLockType: Longint): HResult; stdcall;
function Stat(out statstg: TStatStg; grfStatFlag: Longint): HResult;
stdcall;
function Clone(out stm: IStream): HResult; stdcall;
end;
I get the following error:
Streamable.pas(109,20) Error: No matching implementation for interface method "Read(Pointer;LongWord;PDWord):LongInt; StdCall;" found
Streamable.pas(109,20) Error: No matching implementation for interface method "Write(Pointer;LongWord;PDWord):LongInt; StdCall;" found
Streamable.pas(109,20) Error: No matching implementation for interface method "Read(Pointer;LongWord;PDWord):LongInt; StdCall;" found
Streamable.pas(109,20) Error: No matching implementation for interface method "Write(Pointer;LongWord;PDWord):LongInt; StdCall;" found
Streamable.pas(109,20) Error: No matching implementation for interface method "Seek(QWord;LongInt;out QWord):LongInt; StdCall;" found
Streamable.pas(109,20) Error: No matching implementation for interface method "SetSize(QWord):LongInt; StdCall;" found
Streamable.pas(109,20) Error: No matching implementation for interface method "CopyTo(IStream;QWord;out QWord;out QWord):LongInt; StdCall;" found
Streamable.pas(109,20) Error: No matching implementation for interface method "LockRegion(QWord;QWord;LongInt):LongInt; StdCall;" found
Streamable.pas(109,20) Error: No matching implementation for interface method "UnlockRegion(QWord;QWord;LongInt):LongInt; StdCall;" found
In another thread I found a way to change the StdCall to {$IFDEF WINDOWS}stdcall {$ELSE}CDECL{$ENDIF} but that does not solve this issue.
Please let me know if you are able to help me out.
Thanks in advance!