Results 1 to 9 of 9

Thread: Store Data

  1. #1

    Thread Starter
    Hyperactive Member samsyl's Avatar
    Join Date
    Jun 2001
    Location
    London
    Posts
    338

    Store Data

    Is is possible to store data in a .exe file? I want to store some text in exe (No database , No another File). Thanks for reply

  2. #2
    Not NoteMe SLH's Avatar
    Join Date
    Mar 2002
    Location
    192.168.0.1 Preferred Animal: Penguin Reason for errors: Line#38
    Posts
    3,051
    Will you want to edit the text at all?
    Quotes:
    "I am getting better then you guys.." NoteMe, on his leet english skills.
    "And I am going to meat her again later on tonight." NoteMe
    "I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
    "my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
    Have I helped you? Please Rate my posts.


  3. #3

    Thread Starter
    Hyperactive Member samsyl's Avatar
    Join Date
    Jun 2001
    Location
    London
    Posts
    338
    Yes I want to use this text for read & edit.

  4. #4
    Not NoteMe SLH's Avatar
    Join Date
    Mar 2002
    Location
    192.168.0.1 Preferred Animal: Penguin Reason for errors: Line#38
    Posts
    3,051
    I'm not sure, but i don't think this is possible. Or at least it would be very difficult.

    You'd obviously get read/write issues, because you can't edit an exe when it's running. Also, i don't think you could simply say 'MemoryLocationInEXE = "A String". It would be a lot more difficult.


    If the reason you want to do this is because you don't want anyone editing your files, then you could search this forum for an encryption algorythm, as there are many.
    Quotes:
    "I am getting better then you guys.." NoteMe, on his leet english skills.
    "And I am going to meat her again later on tonight." NoteMe
    "I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
    "my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
    Have I helped you? Please Rate my posts.


  5. #5
    Super Moderator manavo11's Avatar
    Join Date
    Nov 2002
    Location
    Around the corner from si_the_geek
    Posts
    7,171
    If the reason is to hide, then try saving the data to the registry.


    Has someone helped you? Then you can Rate their helpful post.

  6. #6
    Fanatic Member
    Join Date
    Sep 2000
    Posts
    770
    It is not hard at all.. You can create your own data structures... e. g.

    Code:
    Type mystruct_t
        Name As string * 10
        Age As Integer
        Gender As Integer
    End Type
    
    Dim profile as mystruct_t

    you can then seek to the end of the file and PUT this info. You can read it back out bo seeking to the end of the file but then subract the length of the structure.. e.g Len(profile), gets sizeof mystruct_t and then do a GET to get the data back out...

    As far as manavo11's post... You can't hide data. You can only protect it from prying eyes... Besides that, there are many uses for storing data after the exe structures...

  7. #7
    Super Moderator manavo11's Avatar
    Join Date
    Nov 2002
    Location
    Around the corner from si_the_geek
    Posts
    7,171
    I didn't mean that it is invisible but that it is harder to find that a ini file in the same path as your exe... I recommend saving with encrtyption though whichever method you use...


    Has someone helped you? Then you can Rate their helpful post.

  8. #8
    Fanatic Member
    Join Date
    Sep 2000
    Posts
    770
    I guess thats why microsoft put a Find function in regedit. Don't know the reg keys/values you say? Try a hexeditor.

  9. #9
    Super Moderator manavo11's Avatar
    Join Date
    Nov 2002
    Location
    Around the corner from si_the_geek
    Posts
    7,171
    Originally posted by nkad
    I guess thats why microsoft put a Find function in regedit. Don't know the reg keys/values you say?
    Huh? I never said that they are invisible or you cannot find them. It is just harder that an ini file in the same path as your app... I'm confused


    Has someone helped you? Then you can Rate their helpful post.

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