View Single Post
Old 1st March 2006, 17:45   #348
Lucky Luke
Junior Member
 
Join Date: Feb 2005
Posts: 5
Hi, very nice plugin, but I have a problem when I try to create a instance of the playlist class in Visual Basic .NET 2005 express edition.

I've this piece of code:

code:

Dim winamp As New ActiveWinamp.Application
Dim playlist As New ActiveWinamp.Playlist ' I get the error on this line



And this is the error:
Retrieving the COM class factory for component with CLSID {5108E2F5-A7E8-4284-9555-9FA8C3994B9C} failed due to the following error: 80040154.

But when I use this:
code:

Dim winamp As New ActiveWinamp.Application

Private Sub LoadPlaylist()
Dim i As Integer
Dim total As Integer = winamp.Playlist.Count
Dim pct As Integer
lstPlaylist.Items.Clear()
For i = 0 To total - 1
lstPlaylist.Items.Add(winamp.Playlist.Item(i).ATFString("[%artist% - ]$if2(%title%,$filepart(%filename%))")) ' on this line I get the error

pct = ((i + 1) / total) * 100
Progressbar.Value = pct
Next

StatusText.Text = "Playlist Refreshed"
Progressbar.Value = 0
End Sub



I get this error:
Object reference not set to an instance of an object.

So i tried this:
code:

Dim winamp As New ActiveWinamp.Application

Private Sub LoadPlaylist()
Dim i As Integer
Dim total As Integer = winamp.Playlist.Count
Dim pct As Integer
lstPlaylist.Items.Clear()
For i = 0 To total - 1
lstPlaylist.Items.Add(New winamp.Playlist.Item(i).ATFString("[%artist% - ]$if2(%title%,$filepart(%filename%))")) ' on this line I get the error

pct = ((i + 1) / total) * 100
Progressbar.Value = pct
Next

StatusText.Text = "Playlist Refreshed"
Progressbar.Value = 0
End Sub



But then I get the error:
Type 'winamp.Playlist.Item' is not defined.

Does anybody know how to fix this?
Lucky Luke is offline   Reply With Quote