Thread: Jamendo plugin
View Single Post
Old 4th July 2007, 11:38   #3
Junior Member
Join Date: Jul 2007
Posts: 7
Here is a snipped of the code I tried to use.


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