|
Hi, All!
How can I verify if selected file is DOS, 16/32/64-bit executable?
Thank a lot!
|
|
|
|
|
Are you talking about your executable? If you are, it can't be 16 bit - there is no 16 bit .NET environment.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
No, external file. Any *.EXE that I choose on my HDD.
|
|
|
|
|
ds41 wrote: Any *.EXE that I choose on my HDD
There's multiple sorts of executable[^] formats. A 16bits DOS executable might start with the ASCII signature "MZ", but it's not guaranteed to be an executable. Might also just be a textfile that's renamed to "exe"
I are Troll
|
|
|
|
|
See this[^] post. Should help.
|
|
|
|
|
Because of your reply to POH I assume that you want to determine the "kind" of exe file something is.
It's simple really. Parse the headers a bit (skip the MZ header)
If there is NE, it's a 16bit windows (or DOS 4) executable.
If there is PE, it's a 32 or 64 bit executable, parse the PE header to determine which.
Otherwise, it's a simple MZ (DOS) executable.
|
|
|
|
|
Nice tip! But as I see I should get SubSystem too (cui/gui). It is stored in the PE header right? Do you have any information about offsets which I should use?
|
|
|
|
|
There is no fixed offset from the beginning of the file, so I will explain how to get to the correct location.
First read DWORD at offset 0x3C from the beginning of the file (it's in the DOS header, a field called e_lfanew)
Move to the offset specified by e_lfanew (this is the place where you will find NE or PE, or something else if it's a DOS executable (or in that case this value may be invalid, I'm not really sure - it's been a while since I saw a real DOS executable))
Move 92 bytes further and read a WORD, this is the subsystem.
modified on Monday, June 7, 2010 11:42 AM
|
|
|
|
|
hi all
i am using vs.net 2005 to change the excel's cell word partially e.g
abc <==where by only the a is red
is this possible
so far i am able to change the whole cell color with this
Excel.Range rng2 = oSheet.get_Range("A1", Missing.Value);
rng2.Font.Color = System.Drawing.ColorTranslator.ToOle(System.Drawing.Color.Red);
can anyone advice please
|
|
|
|
|
//Assuming you did not select the cell yourself
rng2.get_characters(1,1).Font.Color = System.Drawing.ColorTranslator.ToOle(System.Drawing.Color.Red);
|
|
|
|
|
thanks alot it works
very interesting what can be done with c# and excel
|
|
|
|
|
Hello To All,
I hava an Image. and I want to print only its selected area which is selected by Rectangle.
Code For Printing Image is
Rectangle1 = new Rectangle(0,0,Imagetoprint.width,Imagetoprint.height);
Graphics1.Drawimage(Imagetoprint,Rectangle1);
Your help and suggestion needed.
Thanks
If you can think then I Can.
|
|
|
|
|
asked and answered here[^].
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
hi all,
i use c# to send a sms to a mobile , i send it correctly but if the sms contains +
this character not shown.
how can show + character in this sms
thanks alot
|
|
|
|
|
Hi this Raghu.I have to Save the State of Windows Form in Some File Format Such as .cfg by Button Click Event and Also when It was needed,it has to retrieve from the saved format and display the Saved Contents in C#.
|
|
|
|
|
Raghu_M wrote: .I have to Save the State of Windows Form in Some File Format Such as .cfg by Button Click Event and Also when It was needed,it has to retrieve from the saved format and display the Saved Contents in C#.
Excellent, good luck with that.
Did you have a specific question, or are you just after someone to do your work for you?
|
|
|
|
|
Don't cross post the same question in multiple forums. Choose ONE and follow the question there...
|
|
|
|
|
Only because it is my article[^]. Do some research next time!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I m having a visualstudio 2008 project all debug folder files. The exe runs well in winxp and window7 32 bit but problem arises when i try to run in window7 64 bit. Plz help me how to resolve this issue.
Any comments are welcome
|
|
|
|
|
I can understand you get problems when you compile the exe for 34 bits...
But seriously: You need to post more about the error you're getting. It could be an issue with loading 3rd part assemblies, but it's impossible to say when you don't post any error information.
|
|
|
|
|
when exe is run in window7 64 bit then gets error msg i-e
Unhandled exception has occured in your application . If u click continue the application will ignore this error and attempt to continue.if u click quit the application will close immediatly. Input string was not in correct format.
|
|
|
|
|
|
No. if you dont mind then Can u plz provide me ur email so that i could send u exe and u would better able to find issue.
|
|
|
|
|
I'll happily do your work for you, if you'll agree to my daily rate. Minimum 1 day @ £475/day.
|
|
|
|
|
which is not even my one month pay
|
|
|
|