views:

571

answers:

1

Is there a difference between Move and CopyMemory in Delphi(specifically versions 2007 and up)?

If so, what are the differences?

+11  A: 

Have a look at windows.pas in Delphi:

procedure CopyMemory(Destination: Pointer; Source: Pointer; Length: DWORD);
begin
  Move(Source^, Destination^, Length);
end;

Does that answer your question? :>

Kornel Kisielewicz
How'd I miss the fact that one takes pointers and the other doesn't... Oh well, thanks a lot.
JPvdMerwe
That, and the argument order is reversed.
Mason Wheeler