[fpc-pascal]How to copy a lot of data?

memsom at interalpha.co.uk memsom at interalpha.co.uk
Wed Dec 4 11:19:02 CET 2002

> If you ask "why?" it's because I need to call:
> GetMyData(1, MyRecord, rsize);
> GetMyData(2, MyArray, rsize);
> GetMyData(3, MyInteger, rsize);


which platform? In win32 API I would suggest:

VOID CopyMemory (PVOID Destination, CONST VOID * Source,DWORD Length);

which is (or should be) defined in 'windosw.pas' and has a Pascal form:

procedure CopyMemory(Destination: Pointer; Source: Pointer; Length: DWORD);

You could also try:

procedure Move( const Source; var Dest; count : Integer );

which is part of Delphi's RTL (it's in system.pas) so I would hope that FPC 
implements it and that most platforms have it.


This message was sent using Mistral WebMail.

More information about the fpc-pascal mailing list