.dll files are compiled code (machine language instructions)..NOT plain-text source code
what do you hope to accomplish by viewing compiled code?
Hi,
I'm trying to read dll files by opening them in a Textbox/RTB but it don't work, It only shows "MZ" text.
Tried to change the encoding to: "Default, UTF7/8 & Unicode" still the same.
I just want to read the inside text of the dll like Notepad/++ do.
Thanks.
I do not use any type of messenger outside of MPGH.
Inactive but you can reach me through VM/PM.
.dll files are compiled code (machine language instructions)..NOT plain-text source code
what do you hope to accomplish by viewing compiled code?
Last edited by abuckau907; 07-25-2014 at 08:01 PM.
'Some things that can be counted, don't matter. And some things that matter, can't be counted' - A.E.
--
so post code and ask a question...
1. read all bytes of file
2. output each byte to textbox
where is your confusion?
'Some things that can be counted, don't matter. And some things that matter, can't be counted' - A.E.
--
I do not use any type of messenger outside of MPGH.
Inactive but you can reach me through VM/PM.
It's do to with there being bytes that are == 0 inside the file..normally a 0 byte signifies the end of string. To my surprise, System.Text.Encoding.ASCII.GetString() actually goes through the whole byte array, despite any 0's, and returns a string the same length as the byte array. If you debug with the IDE, you can check the value of the string returned and it's the full string.
So...the problem is with the text box --> as soon as it encounters a 0 byte it assumes it's the end of the string.
To fix, after reading the bytes from file into an array, I loop over the array and change any 0 bytes to the ascii value of '?'.
code:
seems right
'Some things that can be counted, don't matter. And some things that matter, can't be counted' - A.E.
--
[MPGH]Mayion (07-26-2014)