ReadFile is byte oriented.
You are reading in 512 bytes chunks due to the fact you are telling ReadFile to read 512 bytes :).
Try this:
SetLength(buf2, 512);
hDiskFile := CreateFile(...);
// Error check here, please.
SetFilePointer(hDiskFile, 300, Nil, FILE_BEGIN);
// Error check here...
Yes you can, Druid, but...
But Delphi events are mimics for Windows messages, so you need to have some knowldege about the Windows message subsystem and the message queue.
To generate an event you need to send an "user" (propietary) Windows message. To get the event you need an object looping...
var
buf2:array of byte; // Dynamic array to hold file data
...
ReadFile(hDiskFile, buf2, sizeof(buf2), intreadedamount, nil);
The dyn arrays and ansi strings are pointers to the control structures, not pointers to the data space.
If you use buf2 : array[1..n] of byte as Glen said, then...
TYVM guys.
The upgrade is mainly from D6.
Any changes in the packed records, fixed arrays of char/byte or string[n]? I heavily relay on them.
The new VCL components support XP themes?
buho (A).
Hellow, guys!
Please, I need to ask a favor: can anyone post some pointers on BDS 2006? Bugs, compatibility issues, informed opinions, etc?
TIA.
buho (A).
PS: Nice to see most of you are still here!
I was "dumbified" last night :(
The better way to pass the buffer is the simplest one:
ReadConsoleInput(InputHandle, InputBuffer[1], 128, InputEventsRead);
Defining the parameter as a TInputRecord like Borland does permits calls like:
ReadConsoleInput(InputHandle, InputBuffer[n], m - n...
The function declararation expects a single record and not an array/pointer :(
To add insult to the injury, you can't typecast an array as a record.
----------------
Trick 1:
UNCHECK "Typed @ operator" in the compiler options and use:
var
p : PInputRecord;
...
begin
p := @InputBuffer...
The AV is due to the VCL TListView not being prepared to have columns inserted "from outside".
You code is ok; it inserts the columns with the due names in my TListView.
Why it doesn't work in the desktop list I only can guess:
a) May be your LV_COLUMN record is not packed and/or
b) You are...
I've tried your code in a "honest" list in the VCL.
Some funny things:
a) The columns appears with the due names.
b) The column zero is the rightmost column.
c) I have an AV every time I try to resize the columns with the mouse.
I think you forgot the cchTextMax field, but in my case the AV...
ctxt" is a string variable, you can't cast it to an object.
The form where the buttons are have a method named FindChildControl; it is a function receiving the control name and returning a pointer to it.
Try something like this code:
var
...
Btn : TControl;
...
Btn :=...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.