BlockWrite failed!!!!? - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

BlockWrite failed!!!!?

Hi All,

In my application, I am using 'BlockWrite' procedure to write my structured data into file. It was working fine.

But since last 2-3 days, I am getting error in BlockWrite procedure.
Actually, there are so many forms and units in my application; and i tried BlockWrite from different forms too, but in vain. I am stuck with the error and can not understand how it sudden refused to work!!!

I tried the same function with another testing application and it is working fine there; which is more confusing.

This is the testing function which I tried in both, my main application and my testing application.

[code]procedure _SaveDataToFile();
Buf: Array[0..255] of char;
TestFile: File of Char;
AssignFile(TestFile, 'c:abcd.cfg');
if not EOF(TestFile) then
Seek(TestFile, FileSize(TestFile));
Buf := 'kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk';
BlockWrite(TestFile, Buf, sizeof(Buf));

Can any one help me?

Thanks in advance.


  • Kyl3Kyl3 Posts: 6Member
    I swear the exact same thing happened to me.
    I have a download program that uses block write and now I get a I/O Error and when I try to recompile it mess up at the block write part.

    Using Delphi 7
Sign In or Register to comment.