Go Back   Winamp & Shoutcast Forums > Developer Center > Winamp Development

Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 4th December 2005, 13:41   #1
Junior Member
Join Date: Dec 2005
Posts: 4
Help don't know what I make wrong! get titel and Interpret from winamp!

Hi, I have some problems to get the songtitel and interpret!

I use following code for it:

//programming with C++ Borland Builder 6
//Winamp Version 5.112
//wa sdk 504
---- Header ----
//Die Structur aus der SDK deklariert!

typedef struct {
char *filename;
char *metadata;
char *ret;
int retlen;
} extendedFileInfoStruct;

//ein Structur Objekt erstellt!
extendedFileInfoStruct File;

---- Cpp Datei ----
//Winamp Handle
HANDLE hwnd_winamp;
//Winamp Handle Finden
hwnd_winamp = FindWindow("Winamp v1.x",NULL);
//Position ausfindig machen
int currentPos = SendMessage(hwnd_winamp,WM_USER,0,IPC_GETLISTPOS);
//Strucktur abrufen
//File Name auslesen!!!
File.filename = (char*)SendMessage(hwnd_winamp, WM_WA_IPC, currentPos, IPC_GETPLAYLISTFILE);
But this Code Crasht Winamp...
*don't now why...*

So I search, and get this Code in the Winamp - Forum:

//pass a pointer to the following struct in wParam
typedef struct {
char *filename;

int quickCheck; /*
set to 0 to always get,
1 for quick, 2 for default
(if 2, quickCheck will be set to 0 if
quick wasnot used) */

// filled in by winamp
int length;
char *title;
int titlelen;
} basicFileInfoStruct;

basicFileInfoStruct bfi;

bfi.quickCheck = 0;
bfi.filename = (char*)SendMessage(hwndWinamp, WM_WA_IPC, any_index, IPC_GETPLAYLISTFILE);
bfi.title = GlobalAlloc(GPTR, 1024);
SendMessage(hwndWinamp, WM_WA_IPC, (WPARAM)&bfi, IPC_GET_BASIC_FILE_INFO);
// Do whatever you want with bfi.title and bfi.length now...
but it crashed Winamp too.

*Don't know what I make wrong*

So I test it again:


typedef struct {
char *filename;
char *title;
int length;
} enqueueFileWithMetaStruct;

enqueueFileWithMetaStruct File;

It crashed down again... -.-

I have search @ google and this forum! *long time* but nothing!

I don't know what i make wrong...

Can anyone Help me please ?

I only whant to get the titel & interprett!

cyby2005 is offline   Reply With Quote
Go Back   Winamp & Shoutcast Forums > Developer Center > Winamp Development

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump