Old 3rd July 2007, 14:10   #1
id2ndr
Junior Member
 
Join Date: Jul 2007
Posts: 7
Jamendo plugin

Hi,

I'm trying to develop a plugin to add Jamendo to media library. I'm new to C++ but I know C and java. I haven't use sdk before.

In order to do that I download wa_sdk and I tried to modify ml_ex (MediaList_example) plugin.

I need to retrieve differents ids with standard http get request but I don't know how to do that.
My idea was to use the a winamp internal function to do that, instead of an external library. (This would also use proxy setting of winamp and other things like that). So do you know if it's possible and where I can find this function ?

Thanks
id2ndr is offline   Reply With Quote
Old 4th July 2007, 08:39   #2
id2ndr
Junior Member
 
Join Date: Jul 2007
Posts: 7
I founded the function. It's :
code:
int (*httpRetrieveFile)(HWND hwnd, char *url, char *file, char *dlgtitle);

at line 377 in wa502_sdk\winamp\wa_ipc.h

I founded an use of it here

I founded this :
code:
error=SendMessage(mod.hMainWindow,WM_USER,(WPARAM)NULL,240); // get HTTP getter function

So i tried to do the same thing with the same window handler (m_hwnd is the handler used in ml_ex plugin but doesn't work). Doing this SendMessage return a number greater than 1.
Then I try to use
code:
httpRetrieveFile(plugin.hwndWinampParent, url, file, dlgtitle);
but running Winamp : Run-Time Check Failure #3 - The variable 'httpRetrieveFile' is being used without being defined..

Do someone knows which HWND I have to use with httpRetrieveFile and SendMessage functions ?

Thanks

Last edited by id2ndr; 4th July 2007 at 10:06.
id2ndr is offline   Reply With Quote
Old 4th July 2007, 12:38   #3
id2ndr
Junior Member
 
Join Date: Jul 2007
Posts: 7
Here is a snipped of the code I tried to use.

code:

int (*httpRetrieveFile)(HWND hwnd, char *url, char *file, char *dlgtitle);
int error;
error= SendMessage(plugin.hwndWinampParent,WM_USER,(WPARAM)NULL,IPC_GETHTTPGETTER); // get HTTP getter function
if (error>1) {
httpRetrieveFile= (void*)error; // This line doesn't compile
error= httpRetrieveFile(plugin.hwndWinampParent, url, file, dlgtitle);
}



I try to initialize httpRetrieveFile with result but : cannot convert from 'int' to 'int (__cdecl *)(HWND,char *,char *,char *)'.
However I used the same pattern as the plugin on my first post.

How can I cast error to the type of httpRetrieveFile pointer ?
id2ndr is offline   Reply With Quote
Old 4th July 2007, 13:25   #4
id2ndr
Junior Member
 
Join Date: Jul 2007
Posts: 7
I founded how to do :
code:
httpRetrieveFile= (int (*)(HWND, char *, char *, char *))result;
id2ndr is offline   Reply With Quote
Reply
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