Results 1 to 2 of 2

Thread: very perplexing

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Apr 2001
    Posts
    66

    very perplexing

    Can anyone tell me how to make the lpBuffer from ReadFile into a usable string. I need to open a file, read it, then search the entire buffer for certain things. I can't figure out how make what is returned into something I can use. I'm used to VB but I have to make this in C++ which I am not very accustomed to.

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    Since lpBuffer probably is char*, you can directly use it as string. If it is not, you need to cast the pointer, like (char*)lpBuffer.

    And you got to append a '\0' to the end.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

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