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 ?