Results 1 to 35 of 35

Thread: Find a string in a text file Fast....

Hybrid View

  1. #1
    VB6, XHTML & CSS hobbyist Merri's Avatar
    Join Date
    Oct 2002
    Location
    Finland
    Posts
    6,654

    Re: Find a string in a text file Fast....

    If you are reading files that big you may wish to consider using some level of buffering instead of reading the whole file to memory at once.

  2. #2
    Frenzied Member
    Join Date
    Apr 2003
    Location
    The Future - Skynet
    Posts
    1,157

    Re: Find a string in a text file Fast....

    Quote Originally Posted by Merri View Post
    If you are reading files that big you may wish to consider using some level of buffering instead of reading the whole file to memory at once.
    Agree but can your code still be applied? It seems that your api opens the whole file at once.

    Is it similar to this one:
    http://www.vbforums.com/showpost.php...0&postcount=12

    If yes, can you help me clean it up? I would really appreciate your help on this.
    I'll Be Back!

    T-1000

    Microsoft .Net 2005
    Microsoft Visual Basic 6
    Prefer using API

  3. #3
    Frenzied Member
    Join Date
    Apr 2003
    Location
    The Future - Skynet
    Posts
    1,157

    Re: Find a string in a text file Fast....

    Hi Merri, I got your code to work on big files. It does run faster then any of the other method but there is a memory leak.

    If you run it in Excel VBA, you can seek the memory keeps accumulating in the task manager.
    I'll Be Back!

    T-1000

    Microsoft .Net 2005
    Microsoft Visual Basic 6
    Prefer using API

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