Thread: File Management :: Win32

  1. #1
    Registered User
    Join Date
    Nov 2001
    Posts
    1,348

    File Management :: Win32

    Hi.

    How do you read, write, and append data to files using Win32 CreateFile? In core C++, we can use write(). CreateFile returns a handle to a file. I thought about mapping the file and then casting the void * that MapViewOfFile() returns to BYTE *, but that seems overkill since all the process does is write to a file.

    Thanks,
    Kuphryn

  2. #2
    PC Fixer-Upper Waldo2k2's Avatar
    Join Date
    May 2002
    Posts
    2,001
    look up ReadFile() and WriteFile() at msdn. (i think those are the function names). They're much simpler to use than what you had in mind (you're right it was overkill )
    Last edited by Waldo2k2; 12-13-2002 at 05:38 PM.
    PHP and XML
    Let's talk about SAX

  3. #3
    Registered User
    Join Date
    Nov 2001
    Posts
    1,348
    Okay. Thanks.

    Kuphryn

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. opening empty file causes access violation
    By trevordunstan in forum C Programming
    Replies: 10
    Last Post: 10-21-2008, 11:19 PM
  2. C++ std routines
    By siavoshkc in forum C++ Programming
    Replies: 33
    Last Post: 07-28-2006, 12:13 AM
  3. Possible circular definition with singleton objects
    By techrolla in forum C++ Programming
    Replies: 3
    Last Post: 12-26-2004, 10:46 AM
  4. Making a LIB file from a DEF file for a DLL
    By JMPACS in forum C++ Programming
    Replies: 0
    Last Post: 08-02-2003, 08:19 PM
  5. System
    By drdroid in forum C++ Programming
    Replies: 3
    Last Post: 06-28-2002, 10:12 PM