How the Yahoo! Messenger status is stored

It’s been some time since I launched the first version of Mp3-S ( http://mp3-s.dta.ro ), so I guess now it’s a good time to share to the world a couple of tips about how I designed the software. Mp3-S is used to show in your Yahoo! Messenger status what you are listening in Winamp. The current released version is 1.3 and it has over 10.000 downloads on Softpedia.Com.

So the first step is to get the current song played in Winamp. This can be easily done by getting the title of the Winamp window (which can also be seen in the Taskbar) by using one of your favorite programming languages (the only problem that might occur is that if the “Scroll title in Windows taskbar” option is checked, the software will not work as intended).

I have designed Mp3-S using MFC (Microsoft Foundation Classes) in Microsoft Visual Studio 6 (this happened a long time ago). There is a way to get the properties of a Window based on it’s title ( Click here for more info ). This can be used to get the title of the song that is currently being played and also find get a reference to the Yahoo! Messenger application (which I will refer to as “YHO”).

Next we modify the current status. Yahoo! Messenger stores some info in the local registry in HKEY_CURRENT_USER\Software\Yahoo\pager . There is a value there called “Yahoo! User ID” specifying the current user that is logged in. Under HKEY_CURRENT_USER \ Software \ Yahoo \ pager \ profiles \ <current_user> \ Custom Msgs\ all the statuses for the current user are being kept. You may now modify values “1” and “1_bin” with what you want and you are half way done. You will have to send a message to the Yahoo! Messenger window, giving it a “hint” to update the status.

If we explore Yahoo! Messenger’s resources using ResHack ( Click here to download ), we notice that the status is updated via a resource that has the ID 388 ( the button of the first status ). All we have to do is trigger that resource, as if we have clicked on it. In MFC, this would look something like : YHO->SendMessage(273, 388, 0);. Next Yahoo! updates the status and the process is complete.

Resource ID

One Response to “How the Yahoo! Messenger status is stored”

  1. katana Says:

    In messenger 8.1.0.421 there is no HKCU\Software\Yahoo\pager\Yahoo! User Id key. Where can i find it ?

Leave a Reply