|
Hello Friends
I am having a file in binary mode.Now, I want to read it So that I can get the format of that File.
Is ther any way in MFC or Win32 to reverse it ?
Thanks In Advance.
regards
yogesh
|
|
|
|
|
Unless you know the format of the file contents there is not really any way to do it. You can try some guesswork and logical tests (I have done similar in the past) but it is really down to looking at the content, and figuring out what each byte or set of bytes is supposed to represent.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
What do you mean with getting the format? If it's a binary file and you don't know how to interpret its contents, I don't think you can get a format.
Regarding the reversion, thats quite easy, although I don't see the point in doing it. You could use the functions fread(), frwite() and the like to read it into a large enough char array, loop through it from back to front and write it byte by byte into a new file (assuming is is small enough to fit into memory).
|
|
|
|
|
thanks Guys For your valuable replies.
|
|
|
|
|
yogeshs wrote: Is ther any way in MFC or Win32 to reverse it ? Reverse engineer, or reverse the contents?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|