CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 1999
    Posts
    6

    Read & Write to an output file



    This may sound trival but I just can't seem to figure it out on my own.


    I have an output file that stores job infomation. Looks somthing like this:


    [Job Info]

    "Job#"

    "Job Name"

    [Calculations Type #1]

    ....10 colmuns of data....

    ..

    ..

    ..

    [Calculations Type #2]

    ....8 columns of data....

    ..

    ..

    and so on.


    Is there a way to search for one of the labels and then start reading AND writing using that label as a base. I could use the Input and Write commands to read OR write to file but not both. I could use the Put and Get commands but they require a fixed row width. Please somebody help a newbie out!

  2. #2
    Join Date
    Dec 1998
    Posts
    28

    Re: Read & Write to an output file



    It sounds like you're rewritting some funcitons already in the API. Heres what you wanna look up in the API viewer:

    WritePrivateProfileSection

    WritePrivateProfileString

    GetPrivateProfileSecion

    GetPrivateProfileString



  3. #3
    Join Date
    Aug 1999
    Posts
    6

    Re: Read & Write to an output file



    Where can I find documentaion on how to use these routines.

  4. #4
    Join Date
    Apr 1999
    Location
    Rotterdam, Netherlands
    Posts
    278

    Re: Read & Write to an output file



    They're quite simple, but for some detailed description you can check the MSDN of our friend Bill's site. Just like any other API function there is (almost any).

    The docu is for C++, but most of the things you'll read you'll understand, because it isn't that hard.

    if you want a real good book about the Win32API for VB, check Dan Appleman's 'VB Programmer's Guide To The Win32API'. It's the bible for VB programmer's.

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