CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2002
    Posts
    126

    Insert into file

    hi,

    I have a file that is extremly large 50GB+. I want to insert some data into the middle of it, but do not want to have to shuffle the contents of the file up to make room or copy the contents of the file around.

    Is it possible to extend a file from either the beginning or the middle, using any windows API code? Idon't believe it is, but if anyone knows I'd greatly appreciate it.

    Thanks,

  2. #2
    Join Date
    Aug 2002
    Location
    Madrid
    Posts
    4,588

    Re: Insert into file

    I don't think that the Windows API exposes functionality for this king of operation. It could be done by manipulating the MFT and the file links, but that's very low level.

    Can't you redesign the fileformat so that it has internal links to a next part? Then you could just add stuff at the end, even though logically it would be in the middle.
    Get this small utility to do basic syntax highlighting in vBulletin forums (like Codeguru) easily.
    Supports C++ and VB out of the box, but can be configured for other languages.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured