help with file header

Please support our C# advertiser: Intel Parallel Studio Home
Reply

Join Date: May 2004
Posts: 19
Reputation: matika is an unknown quantity at this point 
Solved Threads: 0
matika matika is offline Offline
Newbie Poster

help with file header

 
1
  #1
May 19th, 2006
hiii all
do any1 knows how to read the header of a file to know its format
as example if i've a mp3 file but it's name do not include .mp3
i wanna make a program that read the header of the file and detect it's format but i dont know how to read the header in c#
plzzzzzzzz help anythng u send could help :)
tnx
Reply With Quote Quick reply to this message  
Join Date: Jul 2005
Posts: 1,542
Reputation: tayspen is on a distinguished road 
Solved Threads: 98
Team Colleague
tayspen's Avatar
tayspen tayspen is offline Offline
<Insert title here>

Re: help with file header

 
1
  #2
May 19th, 2006
Perhaps this will help?

http://www.devhood.com/tutorials/tut...tutorial_id=79


I am sure, you could get what you need from that code, in order to throw together a little class to do what you want.
Firefox
Ewido
Tune up windows
Get detailed system information
My Fixes

Member - Alliance of Security Analysis Professionals - Since 2006
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 206
Reputation: plazmo is an unknown quantity at this point 
Solved Threads: 16
plazmo's Avatar
plazmo plazmo is offline Offline
Posting Whiz in Training

Re: help with file header

 
1
  #3
May 23rd, 2006
I tried this a while ago, and its not 100% possible because i think not all files contain a header or such that says what the file is
Reply With Quote Quick reply to this message  
Join Date: May 2006
Posts: 4
Reputation: MrBenz is an unknown quantity at this point 
Solved Threads: 1
MrBenz MrBenz is offline Offline
Newbie Poster

Re: help with file header

 
1
  #4
May 23rd, 2006
Originally Posted by matika
hiii all
do any1 knows how to read the header of a file to know its format
as example if i've a mp3 file but it's name do not include .mp3
i wanna make a program that read the header of the file and detect it's format but i dont know how to read the header in c#
plzzzzzzzz help anythng u send could help
tnx
try.....string extension = Path.GetExtension(file);
Reply With Quote Quick reply to this message  
Join Date: Jul 2005
Posts: 1,542
Reputation: tayspen is on a distinguished road 
Solved Threads: 98
Team Colleague
tayspen's Avatar
tayspen tayspen is offline Offline
<Insert title here>

Re: help with file header

 
1
  #5
May 23rd, 2006
He wants to use the header of the file.

What if for some reason it has no extension? Then that way won't work .
Firefox
Ewido
Tune up windows
Get detailed system information
My Fixes

Member - Alliance of Security Analysis Professionals - Since 2006
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC