Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 925803
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T19:34:40+00:00 2026-05-15T19:34:40+00:00

in visual basic i can open a binary(exe) file with below way : Strx$

  • 0

in visual basic i can open a binary(exe) file with below way :

Strx$ = Space(FileLen(FileName))
Open FileName For Binary As #1
  Get #1, , Strx$
Close

in this way i can read all of binary file characters and read file content like this format :

alt text
(source: iranblog.com)

and the question is how can i open a binary(exe) file in delphi with a string format(Like image) and not 0,1(binary) format ?

Thank you!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T19:34:41+00:00Added an answer on May 15, 2026 at 7:34 pm

    EXE files contain embedded NULL (#0) Characters. You may have problems using Strings as typically NULL is found at the end of the string. Some routines will stop working with a string once the NULL is encountered.

    Having said that the following would get the contents of a file into a string.

    function GetFileIntoString(FileName : String) : String;
    var
     SS : TStringStream;
    begin
      SS := TStringStream.Create('');   
      try
        SS.LoadFromFile(FileName);
        result := SS.DataString;
      finally
        SS.Free;
      end;
    end;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I get Visual Basic to open another form using code? I have
If Visual Studio includes Visual Basic, why can't I open a VB 6.0 file
how can i get cell text value from excell sheet in visual basic and
It seems that Visual Basic can not reference sheets according to user-modified sheet names.
I can display a simple Visual Basic inputbox from a PowerShell script like this:
How can you change your IP Address using visual basic please? I havnt been
how can i add media player without controls and border in visual basic....
Language Visual Basic 6. I want to know if there is an open source
Using the commandline visual basic compiler (vbc.exe) with option VBruntime- does not allow using
I'm using Visual Basic 2010 Express. I have a form that can be minimized.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.