Exemples pour une dll sous mirc vc++ 6

Soyez le premier à donner votre avis sur cette source.

Vue 5 601 fois - Téléchargée 199 fois

Description

Ba c'est dans le zip !

Et pis: http://www.devforum.fr.fm
et http://xtrem.tuxfamily.org/posesource.php

Source / Exemple :


#define WINAMP_BUTTON_PREVIOUS  40044
#define WINAMP_BUTTON_PLAY      40045
#define WINAMP_BUTTON_PAUSE     40046
#define WINAMP_BUTTON_STOP      40047
#define WINAMP_FADE_STOP        40147
#define WINAMP_BUTTON_NEXT      40048
#define WINAMP_VOLUMEUP         40058
#define WINAMP_VOLUMEDOWN       40059
#define WINAMP_TOGGLE_SHUFFLE   40023
#define WINAMP_TOGGLE_REPEAT    40022
#define EXEC_VIS_PLUGIN			40192
#define WINAMP_FFWD5S           40148
#define WINAMP_REW5S            40144
#define WINAMP_CLOSE            40001
#define WINAMP_BOF_PLAYLIST     40154
#define WINAMP_EOF_PLAYLIST     40158
#define WINAMP_TOGGLE_STAY_TOP  40019
#define WINAMP_OPEN             40029
#define WINAMP_TOGGLE_PL        40040
#define WINAMP_TOGGLE_WA_SHADE  40064
#define WINAMP_TOGGLE_PL_SHADE  40266
#define WINAMP_TOGGLE_EQ        40036

#define MIRC_HALT		0
#define MIRC_CONTINUE	1
#define MIRC_PERFORM	2
#define MIRC_RETURN		3
/*
------------------------------------
-		Next GEN DLL				-
-		Version 0.0.5				-
-		By PiX						-
-		Thanks To	Necroman		-
-					n3n				-
------------------------------------

  • /
#pragma comment(linker,"/OPT:NOWIN98") #pragma check_stack(off) #include <windows.h> #include <shlobj.h> #include <stdio.h> #include "NG_DLL.h" //------------------------------------------------------------------------------------------ //Tittle Customizer int __stdcall mirctitle(HWND mWnd, HWND aWnd, char *data, char *parms, BOOL print, BOOL nopause) { SetWindowText(FindWindow("mIRC", NULL) , data ); return MIRC_CONTINUE; } //------------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------------ //Directory Finder int __stdcall specdir(HWND mWnd, HWND aWnd, char *data, char *parms, BOOL print, BOOL nopause) { int directory = atol(data); strcpy(data,"ERROR_BAD_INTEGER"); if (directory == -1) { GetWindowsDirectory(data,MAX_PATH); return 3; } if (directory == -2) { GetSystemDirectory(data,MAX_PATH); return 3; } LPITEMIDLIST list; LPMALLOC pShellMalloc; if(SUCCEEDED(SHGetMalloc(&pShellMalloc))) { if(SUCCEEDED(SHGetSpecialFolderLocation(0,directory ,&list))) { SHGetPathFromIDList(list,data); pShellMalloc->Free(list); } pShellMalloc->Release(); } return MIRC_RETURN; } int __stdcall specdirhelp(HWND mWnd, HWND aWnd, char *data, char *parms, BOOL print, BOOL nopause) { strcpy( data , "/clear | /echo System -2 | /echo Windows -1 | /echo Desktop 0 | Programs 2 | /echo My Documents 5 | /echo Favorites 6 | /echo Startup 7 | /echo Recent 8 | /echo SendTo 9 | /echo Start Menu 11 | /echo Desktop 16 | /echo Nethood 19 | /echo Fonts 20 | /echo Templates 21 | /echo Application Data 26 | /echo Printhood 27 | /echo Internet Cache 32 | /echo Cookies 33 | /echo History 34"); return MIRC_PERFORM; } //------------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------------ //Version info int __stdcall version(HWND mWnd, HWND aWnd, char *data, char *parms, BOOL print, BOOL nopause) { strcpy( data , "NG_Dll 0.0.5 By PiX , pix@laposte.net, #programation @ Voila"); return MIRC_RETURN; } //------------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------------ //MsgBox int __stdcall OK(HWND mWnd, HWND aWnd, char *data, char *parms, BOOL print, BOOL nopause) { int reponse; reponse = MessageBox(mWnd, data, "Avertissement", MB_OK + MB_ICONSTOP); return MIRC_CONTINUE; } int __stdcall YESNO(HWND mWnd, HWND aWnd, char *data, char *parms, BOOL print, BOOL nopause) { int reponse; reponse = MessageBox(mWnd, data, "Avertissement", MB_YESNO + MB_ICONQUESTION); if (reponse == IDYES) return MIRC_CONTINUE; else return MIRC_HALT; } //------------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------------ //Exemple Of The SendMessage() Function //Here: Controling Winamp //Thanks To Sveinn Steinarsson for his DLL WA_Link void Send_To_Winamp( int Wa_CMD ) { SendMessage(FindWindow("Winamp v1.x", NULL),WM_COMMAND,Wa_CMD,0); } int __stdcall WAPLAY(HWND mWnd, HWND aWnd, char *data, char *parms, BOOL print, BOOL nopause) { Send_To_Winamp( WINAMP_BUTTON_PLAY ); return MIRC_CONTINUE; } int __stdcall WAPAUSE(HWND mWnd, HWND aWnd, char *data, char *parms, BOOL print, BOOL nopause) { Send_To_Winamp( WINAMP_BUTTON_PAUSE ); return MIRC_CONTINUE;} int __stdcall WAPREVIOUS(HWND mWnd, HWND aWnd, char *data, char *parms, BOOL print, BOOL nopause) { Send_To_Winamp( WINAMP_BUTTON_PREVIOUS ); return MIRC_CONTINUE; } int __stdcall WASTOP(HWND mWnd, HWND aWnd, char *data, char *parms, BOOL print, BOOL nopause) { Send_To_Winamp( WINAMP_BUTTON_STOP ); return MIRC_CONTINUE; } int __stdcall WAFADE_STOP(HWND mWnd, HWND aWnd, char *data, char *parms, BOOL print, BOOL nopause) { Send_To_Winamp( WINAMP_FADE_STOP ); return MIRC_CONTINUE; } int __stdcall WANEXT(HWND mWnd, HWND aWnd, char *data, char *parms, BOOL print, BOOL nopause) { Send_To_Winamp( WINAMP_BUTTON_NEXT ); return MIRC_CONTINUE; } int __stdcall WAVOLUMEUP(HWND mWnd, HWND aWnd, char *data, char *parms, BOOL print, BOOL nopause) { Send_To_Winamp( WINAMP_VOLUMEUP ); return MIRC_CONTINUE; } int __stdcall WAVOLUMEDOWN(HWND mWnd, HWND aWnd, char *data, char *parms, BOOL print, BOOL nopause) { Send_To_Winamp( WINAMP_VOLUMEDOWN ); return MIRC_CONTINUE; } int __stdcall WATOGGLE_SHUFFLE(HWND mWnd, HWND aWnd, char *data, char *parms, BOOL print, BOOL nopause) { Send_To_Winamp( WINAMP_TOGGLE_SHUFFLE ); return MIRC_CONTINUE; } int __stdcall WATOGGLE_REPEAT(HWND mWnd, HWND aWnd, char *data, char *parms, BOOL print, BOOL nopause) { Send_To_Winamp( WINAMP_TOGGLE_REPEAT ); return MIRC_CONTINUE; } int __stdcall WAEXEC_VIS_PLUGIN(HWND mWnd, HWND aWnd, char *data, char *parms, BOOL print, BOOL nopause) { Send_To_Winamp( EXEC_VIS_PLUGIN ); return MIRC_CONTINUE; } int __stdcall WAFFWD5S(HWND mWnd, HWND aWnd, char *data, char *parms, BOOL print, BOOL nopause) { Send_To_Winamp( WINAMP_FFWD5S ); return MIRC_CONTINUE; } int __stdcall WAREW5S(HWND mWnd, HWND aWnd, char *data, char *parms, BOOL print, BOOL nopause) { Send_To_Winamp( WINAMP_REW5S ); return MIRC_CONTINUE; } int __stdcall WACLOSE(HWND mWnd, HWND aWnd, char *data, char *parms, BOOL print, BOOL nopause) { Send_To_Winamp( WINAMP_CLOSE ); return MIRC_CONTINUE; } int __stdcall WAOPEN(HWND mWnd, HWND aWnd, char *data, char *parms, BOOL print, BOOL nopause) { Send_To_Winamp( WINAMP_OPEN ); return MIRC_CONTINUE; } //------------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------------ //OS Version Tester //Thanks To Kamek int __stdcall GetOSVersion(HWND mWnd, HWND aWnd, char *data, char *parms, BOOL print, BOOL nopause) { OSVERSIONINFO VersionInfo; char WinVer[5]; VersionInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); GetVersionEx(&VersionInfo); switch (VersionInfo.dwPlatformId) { case VER_PLATFORM_WIN32s: strcpy(WinVer, "32s"); break; case VER_PLATFORM_WIN32_WINDOWS: if (VersionInfo.dwMinorVersion > 0) { if (VersionInfo.dwMinorVersion >= 90) { strcpy(WinVer, "Me"); } else if ((VersionInfo.dwMinorVersion >= 10) && (VersionInfo.dwBuildNumber >= 2222)) { strcpy(WinVer, "98SE"); } else { strcpy(WinVer, "98"); } } else { strcpy(WinVer, "95"); } break; case VER_PLATFORM_WIN32_NT: if (VersionInfo.dwMajorVersion >= 5) { if (VersionInfo.dwMinorVersion >= 1) { strcpy(WinVer, "XP"); } else { strcpy(WinVer, "2000"); } } else { strcpy(WinVer, "NT"); } break; } sprintf(data, "Windows %s %lu.%02lu.%04u%s", WinVer, VersionInfo.dwMajorVersion, VersionInfo.dwMinorVersion, LOWORD(VersionInfo.dwBuildNumber), VersionInfo.szCSDVersion); return MIRC_RETURN; } //------------------------------------------------------------------------------------------ int __stdcall memrest(HWND mWnd, HWND aWnd, char *data, char *parms, BOOL print, BOOL nopause) { MEMORYSTATUS mem; GlobalMemoryStatus(&mem); sprintf(data, "%d",mem.dwTotalPhys / (1024 * 1024)); return 3; }

Conclusion :


ya des truc "inspiré de codes sources d'ici mais c'estais juste pour monter comment on fesait.

Codes Sources

A voir également

Ajouter un commentaire Commentaires
Messages postés
16
Date d'inscription
lundi 27 mai 2002
Statut
Membre
Dernière intervention
12 novembre 2004

Dsl cé juste un bout de code pour faire une dll utilisable a partir de mIRC
avec de fontion pour recuperer le nb de ram commander winamp sommairement
creer une ctite msgbox recuperer de repertoire systeme de windows ben voila !!!!!!

Re: Cordialement
Messages postés
368
Date d'inscription
mercredi 14 novembre 2001
Statut
Membre
Dernière intervention
1 septembre 2008

si teplait, tu pourais expliquer son utilisté ? j'ai oas dit que ca ne servait a rien ! je voudrais jsute ssavoir, reellement, a quoi elle sert. puisque tu ne kl'as pas dit dans le espaces reservés a cet effet.

cordialement

Vous n'êtes pas encore membre ?

inscrivez-vous, c'est gratuit et ça prend moins d'une minute !

Les membres obtiennent plus de réponses que les utilisateurs anonymes.

Le fait d'être membre vous permet d'avoir un suivi détaillé de vos demandes et codes sources.

Le fait d'être membre vous permet d'avoir des options supplémentaires.