![]() |
Delphi-Version: 2010
Move() error
I have some code:
Delphi-Quellcode:
Error: array type required. I tried in 7 and 2010.
Len: DWORD;
Ptr: PByte; Move(Len, Ptr[0], 4); Move(Len, Ptr[4], 4); What to do with this? Please, help. |
AW: Move() error
What do you want to do?
|
AW: Move() error
If you want do use an index [0] or [4] you need an array type, not just a pointer (PByte).
E.g.:
Delphi-Quellcode:
Dont forget to allocate memory (e.g. using AllocMem, GetMem) before you use the pointer.
var
Ptr : array [0..4] of PByte; |
Re: Move() error
Hm, PByteArray is working :D I got code with PByte and its author told is working...
|
AW: Re: Move() error
Delphi-Quellcode:
and not
2 * DWORD = 8 Byte
Delphi-Quellcode:
.
5 * PByte
Delphi-Quellcode:
var
MyData : array [0..7] of Byte;
Delphi-Quellcode:
But why
var
TMyTyp = array [0..7] of Byte; TMyPtr = ^TMyTyp; ![]()
Delphi-Quellcode:
var
Ptr: array [0..1] of DWORD; Ptr[0] := Len; Ptr[1] := Len; |
Alle Zeitangaben in WEZ +1. Es ist jetzt 15:38 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz