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

    Talking brain teaser Windows Application for reading writing to specific file

    Ok what I am trying to do is I have a .dat file that I can not read but can at the same time. What I mean is I know how to decypher it by hand (alas takes minutes per 6 parts and there are thousands.) I am trying to make an application that can read this and allow me to edit it from my computer. I can open this with a hex program such as hex editor neo. I am currently trying to get it so I can read the file and have it place corresponding parts in to text boxes that I can alter to suit my needs. I fyou would like I can upload one of the 2 files I am trying to do. If I get help with the frst I maybe able to do the second.
    I am new to visual basic and know a tiny bit about C++ if you think I would be better off trying in C# I can try that as well I do know some since learning c++.

    There are 41 parts to each item listed in the file and each one would need to go in its own text box.
    in hex there are 348 blocks that need to be arranged in corresponding order. Also the begining of the file has 6 block followed by a code for each item. I need to find a way to put all the correct code in the correct text box and have it make sence. If you would like I can upload one file for you to look at and see if you can figure it out. I have been trying for the last 5 months to do this.

  2. #2
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,362

    Re: brain teaser Windows Application for reading writing to specific file

    Sounds like you need to use the binary reader object to read in a given amount of bytes. This would be true for VB.Net or C#
    Always use [code][/code] tags when posting code.

  3. #3
    Join Date
    Jan 2011
    Posts
    4

    Re: brain teaser Windows Application for reading writing to specific file

    yes that does seem to be what I need to do. I was just wondering how I would go about putting each part into a text box I have been reading for a little while about it but so far am still a little stump. I will post back anything I find out.

  4. #4
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: brain teaser Windows Application for reading writing to specific file

    One character at a time...
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  5. #5
    Join Date
    Jan 2011
    Posts
    4

    Re: brain teaser Windows Application for reading writing to specific file

    ok I am trying to figure out how to get a certain selection of the code to tranlate into certain txt boxes. As I said I want to make an application out of this. I am trying to get the first 8 to go into textbox1 and the second 16 to go into textbox2. Would anyone care to help me figure this out.

  6. #6
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: brain teaser Windows Application for reading writing to specific file

    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  7. #7
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,362

    Re: brain teaser Windows Application for reading writing to specific file

    Without looking into it I would think create couple of byte array variables. Read the 8 bytes into the first array and the 16 bytes into the second array then use the method to get the text I think it is something like

    Code:
    MyString=Encoding.ASCII.GetString(rBytes, 0, numBytes)
    Always use [code][/code] tags when posting code.

  8. #8
    Join Date
    Jan 2011
    Posts
    4

    Re: brain teaser Windows Application for reading writing to specific file

    I will look into this and let you know what I find or if it works or not.

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