Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / March 2006

Tip: Looking for answers? Try searching our database.

How to get file header information

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
HR - 27 Feb 2006 21:53 GMT
I'm looking for a way to programmtically identify if an executable image is
32 or 64 bit.  I can do this from a DOS prompt using "dumpbin /headers
filex.exe | find /I machine".  I need to what dumpbin does to get the header
of a file.  What C call do I make to do that?  Alternatively, if I could get
the source to the command dumpbin I could figure it out.  But I'll take the
straight C call or any help.  Thanks!

HR

Signature

Jack Of All Trades, Master Of How Many?

William DePalo [MVP VC++] - 27 Feb 2006 23:15 GMT
> I'm looking for a way to programmtically identify if an executable image
> is
[quoted text clipped - 6 lines]
> the
> straight C call or any help.  Thanks!

Check the docs for GetBinaryType()

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/getbi
narytype.asp


Regards,
Will
HR - 10 Mar 2006 07:22 GMT
This works great for executables. Thanks for the pointer.  Is there a similar
call to use on .dll files?  dumpbin /header works on both .exe and .dll
files, so there must be a way!  

Thanks.

HR

> > I'm looking for a way to programmtically identify if an executable image
> > is
[quoted text clipped - 13 lines]
> Regards,
> Will

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.