AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Suchfunktion Ergebnis der Suchanfrage

Ergebnis der Suchanfrage


Datum des Suchindex: Heute, 21:17

Parameter dieser Suchanfrage:

Suche in Thema: Untyped Binary Files
Suche alle Beiträge, die von "marabu" geschrieben wurden
• Suchmethode: "Suche nach allen Begriffen"
• Nach Datum (firstpost) sortiert
• Zeige Treffer als Beiträge
Zeige 4 von insges. 4 Treffern
Suche benötigte 0.011s

Es liegen Ergebnisse in folgenden Bereichen vor:

  • Forum: Object-Pascal / Delphi-Language

    Re: Untyped Binary Files

      Delphi
      by marabu, 21. Feb 2006
    Hi Silvia,

    don't panic...

    If you decide on a blocksize of 1 byte you must use a read / write count of SizeOf(Integer) - and everything falls in place.

    Good Luck

    marabu
  • Forum: Object-Pascal / Delphi-Language

    Re: Untyped Binary Files

      Delphi
      by marabu, 19. Feb 2006
    One more thing to mention is, you assign a block size when opening the file. You should make a decision:


    // either
    Reset(Mfile, 1);
    BlockRead(Mfile, tmp, SizeOf(Integer));

    // or
    Reset(Mfile, SizeOf(Integer));
    BlockRead(Mfile, tmp, 1);
  • Forum: Object-Pascal / Delphi-Language

    Re: Untyped Binary Files

      Delphi
      by marabu, 19. Feb 2006
    Access to address 0 usually happens due to an uninitialized pointer. Try to single step through Button3Click() just to make sure the exception really is thrown there. As the second parameter of BlockRead() is concerned you are doing alright. The procedure signature states the second parameter as an untyped variable, so you can pass in any variable type you like.

    marabu
  • Forum: Object-Pascal / Delphi-Language

    Re: Untyped Binary Files

      Delphi
      by marabu, 19. Feb 2006
    Hi Silvia,

    it is good practice to close a file before reopening it - there is a CloseFile() missing in your OnClick handler for Button1. There seems to be no further problem with your code, means it performs as intended on my machine. Can you point out the very line of code that throws the exception?

    BTW: Modern times file i/o is done with filestreams. You might want to read about it in the...


URL zu dieser Suchanfrage:

https://www.delphipraxis.net/dp_search.php?do=usersearch&search_username=marabu&search_exact_username=1&search_sortby=dateline&search_resulttype=post&search_matchmode=0&searchthreadid=63488
Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 21:28 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz