Einzelnen Beitrag anzeigen

hathor
(Gast)

n/a Beiträge
 
#22

Re: Winamp library "knacken"

  Alt 13. Okt 2007, 23:42
Auszüge:

http://nunzioweb.com/daz/winamp/wa504_sdk.exe

Delphi-Quellcode:
// columns in our big treeview
#define COL_ARTIST 0
#define COL_TITLE 1
#define COL_ALBUM 2
#define COL_LENGTH 3
#define COL_TRACK 4
#define COL_GENRE 5
#define COL_YEAR 6
#define COL_FILENAME 7

// makes a NULL char * an empty string
#define MAKESAFE(x) ((x)?(x):"")


// yes, we could easily use an itemRecord / itemRecordList here instead of 'Song's, but the point of this example
// is to show how to integrate with some other native structure
typedef struct

  char *artist;
  char *title;
  char *album;
  int songlen; // seconds?
  int track_nr;
  char *genre;
  int year;
  char *filename;
}
 Song;
//----------------------------------------
    memset(&p->Items[p->Size],0,sizeof(itemRecord));
    p->Items[p->Size].album=s->album;
    p->Items[p->Size].artist=s->artist;
    p->Items[p->Size].title=s->title;
    p->Items[p->Size].genre=s->genre;
    p->Items[p->Size].filename=s->filename;
    p->Items[p->Size].track=s->track_nr;
    p->Items[p->Size].year=s->year;
    p->Items[p->Size].length=s->songlen;
    p->Size++;
//------------------------------------------
      m_list.setLibraryParentWnd(plugin.hwndLibraryParent);
      m_list.setwnd(GetDlgItem(hwndDlg,IDC_LIST));
      m_list.AddCol("Artist",200);
      m_list.AddCol("Title",200);
      m_list.AddCol("Album",200);
      m_list.AddCol("Length",64);
      m_list.AddCol("Track #",64);
      m_list.AddCol("Genre",100);
      m_list.AddCol("Year",64);
      m_list.AddCol("Filename",80);
  Mit Zitat antworten Zitat