Register for your free account! | Forgot your password?

Go Back   elitepvpers > Other Online Games > Diablo 2 > Diablo 2 Programming
You last visited: Today at 06:30

  • Please register to post and access all features, it's quick, easy and FREE!


Winamp Control Sourcecode

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Apr 2006
Posts: 6,597
Received Thanks: 1,831
Winamp Control Sourcecode

Für diejenigen die es intressiert wie die .dll vom Winamp Controller aussieht hier:

Link zum fertigen download:





Code:
#include <Windows.h>

/*
WINAMP CONTROL IDS



40044 - Previous track button of WinAmp;
40048 - Next track button of WinAmp;
40045 - Play button of WinAmp;
40046 - Pause/Unpause button;
40047 - Stop button of WinAmp;

*/



typedef void (_stdcall *Print)(wchar_t* Text, char Color);

void D2Print(char* message) {
   wchar_t wBuffer[256];
   MultiByteToWideChar(0, 1, message, 100, wBuffer, 100);


   HMODULE handle = GetModuleHandle("D2Client.dll");
   if (!handle)
      handle = LoadLibrary("D2Client.dll");


   Print PrintMessage = (Print) (((DWORD)handle) + 0x71740);//1.12
   //Print PrintMessage = (Print) (((DWORD)handle) + 0x3F180);//1.13PTR


   PrintMessage(wBuffer, 0);

}
HWND hwndWinamp = FindWindow("Winamp v1.x",NULL); 
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;
}

DWORD WINAPI MyThread(LPVOID)
{


D2Print("Winamp Control by Medix");
D2Print("F1 = Play/Pause | F2 = Next Track | F3 = Previous Track | F4 = Show current Track");
   for(;;)
    {
    if(GetAsyncKeyState(VK_F4)){
          Title();
         D2Print(title);
         while(GetAsyncKeyState(VK_F4))
         {SleepEx(100, true);}
    }
//play/pause
    if(GetAsyncKeyState(VK_F1))
    {
        SendMessage(hwndWinamp,WM_COMMAND,40046,0);
        while(GetAsyncKeyState(VK_F2))
         {SleepEx(200, true);}

    }
//next song
        if(GetAsyncKeyState(VK_F2))
    {
        SendMessage(hwndWinamp,WM_COMMAND,40048,0);
        Title();
         D2Print(title);
                  while(GetAsyncKeyState(VK_F2))
         {SleepEx(100, true);}

    }
//prev. song
        if(GetAsyncKeyState(VK_F3))
    {
        SendMessage(hwndWinamp,WM_COMMAND,40044,0);
           Title();
         D2Print(title);
               while(GetAsyncKeyState(VK_F3))
         {SleepEx(100, true);}


    }


    }
}

extern"C"
BOOL WINAPI DllMain(HINSTANCE hInstance,DWORD dwReason, LPVOID lpvReserved) {
   switch (dwReason) {
      case DLL_PROCESS_ATTACH: {

     CreateThread(0, 0, (LPTHREAD_START_ROUTINE) MyThread, 0, 0, 0);
                         }



    case DLL_PROCESS_DETACH: {

        }


                         }



                         return true;


}



Medix is offline  
Thanks
1 User
Reply



« common -fragen zu befehlen -wie gehört was geschrieben | [Request] Mule Script auf NT Basis »

Similar Threads
Winamp Control
asdf deleted
11 Replies - Diablo 2 Programming
Control Center for Admin Easy to Control all
Credits go to ucyc for making this nice programm http://www.pictureupload.de/originals/pictures/151009164127_2.jpg...
2 Replies - Maple Story
Winamp Problem
Wenn ich eine Playlist abspiele, springt er einfach zwischen den Liedern hin und her wenn er eins beendet hat, aber auch wenn ich genau eines...
4 Replies - Technical Support
winamp geht net :(
hab nu au ne alte winamp version gefunden (0.2) nur geht sie net O_o°°° lied auswahl geht aber ich hören kein sound :< play hab ich an ...
7 Replies - Technical Support
Radio mit winamp
hi leute, ich wollte eure hilfe mal beanspruchen, es geht darum das ich gerne mein eigenes internetradio hätte und gern wisen würde wie das geht&#33;...
4 Replies - Main



All times are GMT +2. The time now is 06:30.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Abuse
Copyright ©2018 elitepvpers All Rights Reserved.