|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
bug: increasing ADO.NET 2.0 timeouts ?results in an exception (Vs.2005, VB.NET): "The CLR has been unable to transition from COM context 0x1a1c68 to COM context 0x1a1dd8 for 60 seconds. The thread that owns the destination context/apartment is most likely either doing a non pumping wait or processing a very long running operation without pumping Windows messages. This situation generally has a negative performance impact and may even lead to the application becoming non responsive or memory usage accumulating continually over time. To avoid this problem, all single threaded apartment (STA) threads should use pumping wait primitives (such as CoWaitForMultipleHandles) and routinely pump messages during long running operations." Have no idea how "pumping wait primitives" can be set in VB.NET. what about you? btw: at least my girl friend was impressed by what kind of coding I do ;-) thanks herbert How exactly do you read those headers?
-- Show quoteMiha Markic [MVP C#] RightHand .NET consulting & development www.rthand.com Blog: http://cs.rthand.com/blogs/blog_with_righthand/ "herbert" <herb***@discussions.microsoft.com> wrote in message news:A02F8C9E-EABC-476D-B79A-5B1D62D5BB2A@microsoft.com... > Reading the MP3 header of hundreds of MP3 files in many subdirectories > results in an exception (Vs.2005, VB.NET): > > "The CLR has been unable to transition from COM context 0x1a1c68 to COM > context 0x1a1dd8 for 60 seconds. The thread that owns the destination > context/apartment is most likely either doing a non pumping wait or > processing a very long running operation without pumping Windows messages. > This situation generally has a negative performance impact and may even > lead > to the application becoming non responsive or memory usage accumulating > continually over time. To avoid this problem, all single threaded > apartment > (STA) threads should use pumping wait primitives (such as > CoWaitForMultipleHandles) and routinely pump messages during long running > operations." > > Have no idea how "pumping wait primitives" can be set in VB.NET. > what about you? > btw: at least my girl friend was impressed by what kind of coding I do ;-) > > thanks herbert > Miha,
this is the VB.NET Code: Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Dim path As String Me.FolderBrowserDialog1.Description = "Select the directory that you want to use As the default." Me.FolderBrowserDialog1.ShowNewFolderButton = False OpenFileDialog1.InitialDirectory = FolderBrowserDialog1.SelectedPath Dim result As DialogResult = FolderBrowserDialog1.ShowDialog() Me.FolderBrowserDialog1.RootFolder = Environment.SpecialFolder.MyComputer If (result = Windows.Forms.DialogResult.OK) Then path = FolderBrowserDialog1.SelectedPath MsgBox(path) 'Look for MP3 Files in all Subdirectories 'path = selected path from the user (with the FloderBrowserDialog 'value = listing of the found files (Wrapper) Dim value As System.Collections.ObjectModel.ReadOnlyCollection(Of String) = My.Computer.FileSystem.GetFiles(path, FileIO.SearchOption.SearchAllSubDirectories, "*.mp3") Test_dbDataSet.info.BeginLoadData() 'Load the information in the DataSet For Each myfile As String In value 'Read the Tag from the Mp3 file Dim ID3Tag As New ID3TagV2 If GetID3TagV2(myfile, ID3Tag) = True Then 'write a new row into the Dataset 'function "aeiou": function to overwrite specific signs ("Ä, Ö,...) Test_dbDataSet.info.AddinfoRow(aeiou(path), ID3Tag.Title, ID3Tag.Artist, ID3Tag.Album, ID3Tag.Year_Renamed, ID3Tag.Genre, ID3Tag.Comment, ID3Tag.Composer, ID3Tag.OriginalArtist, ID3Tag.Copyreght, ID3Tag.Link, ID3Tag.ExtendedHeader, ID3Tag.PlayCounter, ID3Tag.Track, ID3Tag.Encoder, ID3Tag.Language, ID3Tag.Length, ID3Tag.MediaType, ID3Tag.Publisher, ID3Tag.DecodingSoftware) End If Next Test_dbDataSet.info.EndLoadData() logfile("Nach Verzeichnis gesucht") logfile(path) End If End Sub thanks Herbert Show quote "Miha Markic [MVP C#]" wrote: > How exactly do you read those headers? > > -- > Miha Markic [MVP C#] > RightHand .NET consulting & development www.rthand.com > Blog: http://cs.rthand.com/blogs/blog_with_righthand/ > > "herbert" <herb***@discussions.microsoft.com> wrote in message > news:A02F8C9E-EABC-476D-B79A-5B1D62D5BB2A@microsoft.com... > > Reading the MP3 header of hundreds of MP3 files in many subdirectories > > results in an exception (Vs.2005, VB.NET): > > > > "The CLR has been unable to transition from COM context 0x1a1c68 to COM > > context 0x1a1dd8 for 60 seconds. The thread that owns the destination > > context/apartment is most likely either doing a non pumping wait or > > processing a very long running operation without pumping Windows messages. > > This situation generally has a negative performance impact and may even > > lead > > to the application becoming non responsive or memory usage accumulating > > continually over time. To avoid this problem, all single threaded > > apartment > > (STA) threads should use pumping wait primitives (such as > > CoWaitForMultipleHandles) and routinely pump messages during long running > > operations." > > > > Have no idea how "pumping wait primitives" can be set in VB.NET. > > what about you? > > btw: at least my girl friend was impressed by what kind of coding I do ;-) > > > > thanks herbert > > > > > |
|||||||||||||||||||||||