Click here to Skip to main content
15,915,834 members
Home / Discussions / C#
   

C#

 
AnswerRe: Any example of TAPI Programming in C#? Pin
Michael P Butler17-Feb-03 20:21
Michael P Butler17-Feb-03 20:21 
AnswerRe: Any example of TAPI Programming in C#? Pin
Richard Deeming18-Feb-03 1:06
mveRichard Deeming18-Feb-03 1:06 
GeneralProperty returns Collection Pin
Member 1697717-Feb-03 18:08
Member 1697717-Feb-03 18:08 
GeneralWindows Form and Command Line Pin
Braincrash17-Feb-03 16:47
Braincrash17-Feb-03 16:47 
GeneralRe: Windows Form and Command Line Pin
jtmtv1817-Feb-03 19:33
jtmtv1817-Feb-03 19:33 
GeneralRe: Windows Form and Command Line Pin
Braincrash18-Feb-03 7:02
Braincrash18-Feb-03 7:02 
GeneralRe: Windows Form and Command Line Pin
jtmtv1818-Feb-03 11:28
jtmtv1818-Feb-03 11:28 
GeneralRe: Windows Form and Command Line Pin
Braincrash18-Feb-03 13:59
Braincrash18-Feb-03 13:59 
Generalchanging encryption password size Pin
jtmtv1817-Feb-03 15:22
jtmtv1817-Feb-03 15:22 
GeneralRe: changing encryption password size Pin
Furty17-Feb-03 17:01
Furty17-Feb-03 17:01 
GeneralRe: changing encryption password size Pin
jtmtv1817-Feb-03 19:31
jtmtv1817-Feb-03 19:31 
GeneralRe: changing encryption password size Pin
Furty18-Feb-03 9:40
Furty18-Feb-03 9:40 
GeneralRe: changing encryption password size Pin
jtmtv1818-Feb-03 12:10
jtmtv1818-Feb-03 12:10 
GeneralSecurity question Pin
Omega50117-Feb-03 13:30
Omega50117-Feb-03 13:30 
GeneralRe: Security question Pin
jtmtv1817-Feb-03 13:46
jtmtv1817-Feb-03 13:46 
GeneralRe: Security question Pin
Omega50117-Feb-03 14:07
Omega50117-Feb-03 14:07 
GeneralRe: Security question Pin
jtmtv1817-Feb-03 14:16
jtmtv1817-Feb-03 14:16 
GeneralRe: Security question Pin
Omega50117-Feb-03 15:21
Omega50117-Feb-03 15:21 
GeneralRe: Security question Pin
Furty17-Feb-03 16:55
Furty17-Feb-03 16:55 
GeneralReading Files From Offset Pin
afronaut17-Feb-03 13:19
afronaut17-Feb-03 13:19 
Hello all -

I'm trying to write some code to read ID3 tags from mp3 files. ID3 stores information at *the end* of the mp3 file in 128 bytes.

I want to avoid having to loop through the entire file to get the data that I need but it appears that one only can read from the beginning of a file using the .NET I/O classes.

Is it possible to call a version of a Read method with an offset specifying where in a file you want to start reading into a byte array?

eg:
string path = "c:\\downers\\Mancini.mp3";
FileInfo fi = new FileInfo(path);
// the file length
long len = fi.Length;
// subtract 128
long start= len - 128;
int st = (int)start;
Stream fis = File.Open(path,FileMode.Open, FileAccess.Read);
BinaryReader re = new BinaryReader(fis);
byte[] data = new byte[128];
re.Read(data, start, 128); // this won't work, but you get my intuitions...

This doesn't work though; the offset argument in the middle of the read method is an offset in the byte array to start on.

Any ideas? Am I missing something obvious? Otherwise I just have code that loops through the entire file a byte at a time. Cry | :((

*->>Always working on my game, teach me
*->>something new.
cout << "dav1d\n";
GeneralRe: Reading Files From Offset Pin
Xpander17-Feb-03 16:14
Xpander17-Feb-03 16:14 
GeneralRe: Reading Files From Offset Pin
Wesner Moise17-Feb-03 16:21
Wesner Moise17-Feb-03 16:21 
GeneralRe: Reading Files From Offset Pin
afronaut18-Feb-03 2:43
afronaut18-Feb-03 2:43 
GeneralRe: Reading Files From Offset Pin
Furty17-Feb-03 17:05
Furty17-Feb-03 17:05 
Questionprinting in .net problem? Pin
zhoujun17-Feb-03 13:13
zhoujun17-Feb-03 13:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.