Click here to Skip to main content
15,891,657 members
Home / Discussions / C#
   

C#

 
Questioncan we Give Size For Message Boxes??? Pin
S K Y11-Mar-09 16:30
S K Y11-Mar-09 16:30 
AnswerRe: can we Give Size For Message Boxes??? Pin
Christian Graus11-Mar-09 16:40
protectorChristian Graus11-Mar-09 16:40 
QuestionHow to Maximize Form.....??? Pin
S K Y11-Mar-09 15:14
S K Y11-Mar-09 15:14 
AnswerRe: How to Maximize Form.....??? Pin
PIEBALDconsult11-Mar-09 15:22
mvePIEBALDconsult11-Mar-09 15:22 
GeneralRe: How to Maximize Form.....??? Pin
S K Y11-Mar-09 15:27
S K Y11-Mar-09 15:27 
GeneralRe: How to Maximize Form.....??? Pin
DaveyM6911-Mar-09 15:31
professionalDaveyM6911-Mar-09 15:31 
GeneralRe: How to Maximize Form.....??? Pin
S K Y11-Mar-09 16:52
S K Y11-Mar-09 16:52 
QuestionGetting this Error message....any one know y??? Pin
S K Y11-Mar-09 14:47
S K Y11-Mar-09 14:47 
AnswerRe: Getting this Error message....any one know y??? Pin
DaveyM6911-Mar-09 14:56
professionalDaveyM6911-Mar-09 14:56 
GeneralRe: Getting this Error message....any one know y??? Pin
S K Y11-Mar-09 15:26
S K Y11-Mar-09 15:26 
GeneralRe: Getting this Error message....any one know y??? Pin
DaveyM6911-Mar-09 15:34
professionalDaveyM6911-Mar-09 15:34 
GeneralRe: Getting this Error message....any one know y??? Pin
Christian Graus11-Mar-09 15:58
protectorChristian Graus11-Mar-09 15:58 
GeneralRe: Getting this Error message....any one know y??? Pin
S K Y11-Mar-09 18:18
S K Y11-Mar-09 18:18 
QuestionHow to use OleDbConnection or SqlCommand to read Schema and database records [modified] Pin
granthamlee11-Mar-09 14:30
granthamlee11-Mar-09 14:30 
QuestionSyste.OutOfMemoryException Pin
Member 461797111-Mar-09 14:23
Member 461797111-Mar-09 14:23 
AnswerRe: Syste.OutOfMemoryException [modified] Pin
Luc Pattyn11-Mar-09 14:34
sitebuilderLuc Pattyn11-Mar-09 14:34 
AnswerRe: Syste.OutOfMemoryException Pin
DaveyM6911-Mar-09 14:40
professionalDaveyM6911-Mar-09 14:40 
AnswerRe: Syste.OutOfMemoryException Pin
DaveyM6911-Mar-09 14:45
professionalDaveyM6911-Mar-09 14:45 
AnswerRe: Syste.OutOfMemoryException Pin
Member 461797111-Mar-09 14:48
Member 461797111-Mar-09 14:48 
GeneralRe: Syste.OutOfMemoryException Pin
DaveyM6911-Mar-09 14:52
professionalDaveyM6911-Mar-09 14:52 
GeneralRe: Syste.OutOfMemoryException Pin
Member 461797111-Mar-09 14:59
Member 461797111-Mar-09 14:59 
GeneralRe: Syste.OutOfMemoryException Pin
DaveyM6911-Mar-09 15:26
professionalDaveyM6911-Mar-09 15:26 
I've had a quick look at that code, each time you call ID3Info(string FilePath, bool LoadData), it calls ID3v1(string FilePath, bool LoadData) which calls Load() in the same class (if LoadData is true) which has FS.Close(); as the penultimate line, so that shouldn't be the source of your problem.

You could try changing the ID3v1 Load method to:
using (FileStreamEx FS = new FileStreamEx(_FilePath, FileMode.Open))
{
    _HaveTag = false;
    if (FS.HaveID3v1())
    {
        _Title = FS.ReadText(30, TextEncodings.Ascii);
        FS.Seek(-95, SeekOrigin.End);
        _Artist = FS.ReadText(30, TextEncodings.Ascii);
        FS.Seek(-65, SeekOrigin.End);
        _Album = FS.ReadText(30, TextEncodings.Ascii);
        FS.Seek(-35, SeekOrigin.End);
        _Year = FS.ReadText(4, TextEncodings.Ascii);
        FS.Seek(-31, SeekOrigin.End);
        _Comment = FS.ReadText(28, TextEncodings.Ascii);
        FS.Seek(-2, SeekOrigin.End);
        _TrackNumber = FS.ReadByte();
        _Genre = FS.ReadByte();
        _HaveTag = true;
    }
}


Dave
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)

GeneralRe: Syste.OutOfMemoryException Pin
Luc Pattyn11-Mar-09 15:46
sitebuilderLuc Pattyn11-Mar-09 15:46 
GeneralRe: Syste.OutOfMemoryException Pin
DaveyM6911-Mar-09 15:56
professionalDaveyM6911-Mar-09 15:56 
GeneralRe: Syste.OutOfMemoryException Pin
Luc Pattyn11-Mar-09 16:06
sitebuilderLuc Pattyn11-Mar-09 16:06 

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.