rendered paste body#include <windows.h>
void PrintMessage(char *Message, char Color)
{
typedef void (_stdcall *pPrint)(wchar_t* Text, char Color);
pPrint Print = (pPrint)0x6FAC6780; //function for adding message to chat
wchar_t Buffer[0x130]; //buffer (0x130 was maximum from what i read somewhere)
//convert to WideChar (2 bytes per each character)
MultiByteToWideChar(0, 1, Message, 100, Buffer, 100);
Print (Buffer, Color); //and print
}
HWND hwndWinamp = FindWindow("Winamp v1.x",NULL); //Finding window
char title[3024],*rTitle;
void Title()
{
GetWindowText(hwndWinamp, title, 3024);
rTitle = title+strlen(title)-8;
while (rTitle >= title)
{
if (!strnicmp(rTitle,"- Winamp",8)) break;
rTitle--;
}
if (rTitle >= title) rTitle--;
while (rTitle >= title && *rTitle == ' ') rTitle--;
*++rTitle=0;
}
BOOL WINAPI DllMain(HINSTANCE hDll,DWORD dwReason,LPVOID lpReserved) {
if(dwReason==DLL_PROCESS_ATTACH) {
Title();
PrintMessage(title,1);
}
return true;
}