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

    Smile Help Please! Reading .EXE Files

    Hi does anyone know how to read the caption of text boxes or other controls without the program being visible or open.

    Any help will be appreciated.

  2. #2
    Join Date
    Oct 2003
    Location
    .NET2.0 / VS2005 Developer
    Posts
    7,104

    Re: Help Please! Reading .EXE Files

    you could take a screenshot of the program and print it out.. that would allow you read the captions on labels etc, without the program being open.. to take a screenshot, press the PrtScrn button

    (ask a silly question..)
    "it's a fax from your dog, Mr Dansworth. It looks like your cat" - Gary Larson...DW1: Data Walkthroughs 1.1...DW2: Data Walkthroughs 2.0...DDS: The DataSet Designer Surface...ANO: ADO.NET2 Orientation...DAN: Deeper ADO.NET...DNU...PQ

  3. #3
    Join Date
    Aug 2004
    Posts
    184

    Smile Re: Help Please! Reading .EXE Files

    Thanks but thats not what i want,
    what i wanted to do was to read infomation from another .exe program using some kind of api call or opening it in binary
    but i dont think you can get text box values or labels by opening a file in binary.

  4. #4
    Join Date
    Sep 2004
    Location
    South Africa
    Posts
    135

    Question Re: Help Please! Reading .EXE Files

    Quote Originally Posted by cdrcools
    Thanks but thats not what i want,
    what i wanted to do was to read infomation from another .exe program using some kind of api call or opening it in binary
    but i dont think you can get text box values or labels by opening a file in binary.
    Sorry I am not much help but I think you and I have the same problem and I have not received an answer that is helpful thus far... I want to call one project while I am in another project without including the code or the form in my current project. I have tried saving it as an exe file but it doesn't help. The Shell() function is helpful although it calls the file but includes all the buttons and form....

  5. #5
    Join Date
    Aug 2004
    Location
    Bucharest, Romania... sometimes
    Posts
    1,039

    Re: Help Please! Reading .EXE Files

    I think you'll find your answer exactly when avinash_sahay will succeed to get a form object from a window handle, for any VB 6.0 application:
    http://www.codeguru.com/forum/showth...12808#poststop
    Somehow, I think the problems are related to the same issue, since you want the caption of your controls from the exe file. Moreover, you don't even want to run this exe, but to read the file and by "disassembling" it or something, to find what would become the caption at run-time of these controls.
    Hmm, good luck
    Bogdan Apostol
    ESRI Developer Network

    Compilers demystified - Function pointers in Visual Basic 6.0
    Enables the use of function pointers in VB6 and shows how to embed native code in a VB application.

    Customize your R2H
    The unofficial board dedicated to ASUS R2H UMPC owners.

  6. #6
    Join Date
    Aug 2004
    Posts
    184

    Smile Re: Help Please! Reading .EXE Files

    Thanks,
    Its under the same catagory but not insactly what i want
    the program i want to get info from doesn't open at all, it might open in binary or binary access read, i have this program it opens a another program with common dialog and when you click this button called read it fill these txtboxes and otion buttons ect with info thats inside the file we just opened , lets you change whats in the text boxes and save it so the program ypu opened is basicly recompiled.

    It is possible because i have this program that does it, unfortantly theres no source code for it.

    There are source codes ive downloaded that say they do this and look identical to this program but non of them work.

    If you find anything other than whats already been posted about getting form controls PLEASE TELL ME!
    thanks

  7. #7
    Join Date
    Aug 2004
    Location
    Bucharest, Romania... sometimes
    Posts
    1,039

    Re: Help Please! Reading .EXE Files

    Maybe would be better to share with us what program & source you have. Let us see for ourselves what is this software doing, because I think you're not explaining correctly what it does.
    Why do you want to make your own version, if you already have this software?
    Bogdan Apostol
    ESRI Developer Network

    Compilers demystified - Function pointers in Visual Basic 6.0
    Enables the use of function pointers in VB6 and shows how to embed native code in a VB application.

    Customize your R2H
    The unofficial board dedicated to ASUS R2H UMPC owners.

  8. #8
    Join Date
    Aug 2004
    Posts
    184

    Smile Re: Help Please! Reading .EXE Files

    Ok this isn't my source but this is a delphi source i found if you know the delphi language you can tell me how to decode it in visual basic.

    The problem is it didn't come with a server program the program you read with this

    I discovered that its not actually reading the file in binary it looks like its reading in hex or some other coding using the memory address.
    Attached Files Attached Files

  9. #9
    Join Date
    Aug 2004
    Location
    Bucharest, Romania... sometimes
    Posts
    1,039

    Re: Help Please! Reading .EXE Files

    I've carefully read the source you've posted. After browsing a file, gets assigned to F variable. The file pointer is set to position 0x1828 (in hex, the number of records from the beginning of the file, first being record 0). S will become the string found at that position, because the while loop ends when NULL char is encountered. If S is the char "1", some checkbox gets checked, else unchecked (supposely the meaning being that icq is used... by what... have no idea). Same weird thing from location 0x1A01, to (un)check another box showing if a password needs to be checked on a server (this is what I understand from the comments and object names). Next location: 0x1A03 to register a user (this is c_r_a_p already). And so on, and on, and on...
    Finally, the file gets closed and the statusbar shows "Settings read."
    There's nothing here showing that it's about an exe file, not saying about a VB project compiled output exe, nor about it's caption or textbox or other controls!
    I think I've just waisted time here... again.
    Good luck with this stuff (I see it as garbage).
    Bye bye
    Bogdan Apostol
    ESRI Developer Network

    Compilers demystified - Function pointers in Visual Basic 6.0
    Enables the use of function pointers in VB6 and shows how to embed native code in a VB application.

    Customize your R2H
    The unofficial board dedicated to ASUS R2H UMPC owners.

  10. #10
    Join Date
    Aug 2004
    Posts
    184

    Smile Re: Help Please! Reading .EXE Files

    Its for a R.A.T Remote Administrative Tool
    its a program you use to access some elses computer over the internet
    the server is the program you put on the computer you want to hack and it has all these commands programmed into, ie the things it can do
    the sourcecode is called Edit server its used to read and change the server program so you can change it whatever way you like, the password is used to ensure that only you can hack their computer, the icq is a notify it sends a pager message to your uin telling you that the person you wanted to hack is online and also sends their ip address.

    So thats what Edit Server does, and its all i'm missing
    call it crap all you want, i think its a great program if it would just ****in work
    it could also be a new way of protecting personnal data.

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