Go Back   Winamp Forums > Developer Center > Winamp Development

Reply
Thread Tools Search this Thread Display Modes
Old 19th April 2002, 17:00   #1
[MU]Pinky
Junior Member
 
Join Date: Apr 2002
Posts: 1
Get Winamp Version

I use this VC++ code to get Winamp Version:

code:

char ver[5];
int ret = SendMessage(gWAHandle,WM_USER, 0, 0);
itoa(ret,ver,16);
ver[1] = '.';



When I print the ver String i see: 2.06 but I have Winamp 2.76 running.

thx Pinky
[MU]Pinky is offline   Reply With Quote
Old 23rd April 2002, 08:51   #2
bananskib
Junior Member
 
Join Date: Apr 2002
Posts: 8
The doc in frontend.h (http://www.winamp.com/nsdn/winamp2x/dev/sdk/FRONTEND.H) states
/*
** int version = SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETVERSION);
**
** Version will be 0x20yx for winamp 2.yx. versions previous to Winamp 2.0
** typically (but not always) use 0x1zyx for 1.zx versions. Weird, I know.
**
** The basic format for sending messages to Winamp is:
** int result=SendMessage(hwnd_winamp,WM_WA_IPC,command_data,command);
** (for the version check, command_data is 0).
*/

////////////////////////////////////////////////
int version = SendMessage(plugin.hwndParent,WM_WA_IPC,0,IPC_GETVERSION);
char szBuffer[5] ;
sprintf(szBuffer,"%x",version);
///////////////////////////////////////////////
when I ran this code - my szBuffer was "2707"

bananskib
bananskib is offline   Reply With Quote
Reply
Go Back   Winamp 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