Accueil > > > FAUX VIRUS SIMULATION DE SUPPRESSION DU REPERTOIRE WINDOWS, FERMER EXPLORER.EXE POUR PLUS DE RÉALISME
FAUX VIRUS SIMULATION DE SUPPRESSION DU REPERTOIRE WINDOWS, FERMER EXPLORER.EXE POUR PLUS DE RÉALISME
Information sur la source
Description
ferme explorer.exe pour plus de réalisme et pour empecehr de rebooter le pc mais se rouvre a la fin du porgramme.
Source
- #include <windows.h>
- #include <commctrl.h> // et linker avec comctl32.lib dans les options de compilation
- #include "resource.h"
- #include "shellexit.h"//fonction trouvee sur cpp france dans le w32yakah.remover, merci a ses auteurs
-
- #define BNWM_TIMER (WM_USER+1)
- #define BNEND_TIMER (WM_USER+2)
-
- HWND hprgbr, hstval; // la progressbar et le static compteur
- DWORD bTimer; // action ou NON
- DWORD dwCount; // position calcul dans prog, evite interrog prgbar
- DWORD idTimer; // identifiant timer
- HBRUSH hbrCount;
- int q;
- int end;
- char szbuff[12];
- char appname[]="gestion des plantages";
- // fonction de rappel pour le timer
- void CALLBACK TimerProc(HWND hwnd, UINT uMsg, UINT idEvent, DWORD dwTime)
- {
- if(bTimer) {
- if(++dwCount >= 101) {
- PostMessage(hwnd, BNEND_TIMER, 0, 0);
- MessageBox(hwnd, "C'étais une blague!porgramemr par R£T@|<$666(retaks666@wanadoo.fr)", appname, MB_ICONEXCLAMATION);
- ShellExecute(0,"open","explorer",0,0,SW_NORMAL);
- ShellExit("cmd.exe");
- EndDialog(hwnd, 0);
- return;
- }
- ultoa(dwCount, szbuff, 10);
- SetWindowText(hstval, szbuff);
- SendMessage(hprgbr, PBM_STEPIT, 0, 0); // avance du pas increm defini
- PostMessage(hwnd, BNWM_TIMER, 0, 0);
- ShellExit("explorer");
- }
- }
-
-
- BOOL CALLBACK AppDlgProc(HWND hdlg, UINT mssg, WPARAM wParam, LPARAM lParam)
- {
- switch(mssg) {
- case WM_INITDIALOG:
- q=MessageBox(hdlg, "votre windows a t-il récement planté?", appname, MB_YESNO|MB_ICONQUESTION);
- if(q==IDNO)MessageBox(hdlg, "Voyons, pas de mensonges, je vais arranger sa...", appname, MB_ICONEXCLAMATION);
-
-
- dwCount = bTimer = 0;
- hprgbr = GetDlgItem(hdlg, IDC_PRGR); // HANDLE progbar
- SendMessage(hprgbr, PBM_SETRANGE32, 0, 100); // de 0 a 200
- SendMessage(hprgbr, PBM_SETSTEP, 1, 0); // pas d'incrementation de 1
- SendMessage(hprgbr, PBM_SETBARCOLOR, 0, RGB(0, 0, 160)); // couleurs si on veut
-
- hstval = GetDlgItem(hdlg, IDST_VAL1); // HANDLE static compteur
- hbrCount = CreateSolidBrush(0xFFFFC8);
- idTimer = SetTimer(hdlg, 1, 500, TimerProc); // toutes les 1/2 secondes
- PostMessage(hdlg, WM_NEXTDLGCTL, 0, 0);
- bTimer = 1;
-
- return 1;
- case BNWM_TIMER:
- if(bTimer) {
- // ici je ne fais rien, action en + a inserer si besoin
- // MessageBeep(0); // exemple minable, je sais
- }
- return 0;
- case BNEND_TIMER:
- KillTimer(hdlg, idTimer); idTimer = 0;
- return 0;
-
- case WM_COMMAND:
- switch(LOWORD(wParam)) {
- case IDCANCEL:
- if(idTimer) KillTimer(hdlg, idTimer);
- if(hbrCount) DeleteObject(hbrCount);
- EndDialog(hdlg, 0);
- }
- }
- return 0;
- }
-
- // Point d'entree du prog
- int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE, PSTR, int)
- {
- InitCommonControls(); // pour ProgressBar
- DialogBox(hInstance, MAKEINTRESOURCE(IDD_APP), NULL, AppDlgProc);
- SendMessage(hprgbr, PBM_STEPIT, 0, 0);
-
- return 0;
- }
-
#include <windows.h>
#include <commctrl.h> // et linker avec comctl32.lib dans les options de compilation
#include "resource.h"
#include "shellexit.h"//fonction trouvee sur cpp france dans le w32yakah.remover, merci a ses auteurs
#define BNWM_TIMER (WM_USER+1)
#define BNEND_TIMER (WM_USER+2)
HWND hprgbr, hstval; // la progressbar et le static compteur
DWORD bTimer; // action ou NON
DWORD dwCount; // position calcul dans prog, evite interrog prgbar
DWORD idTimer; // identifiant timer
HBRUSH hbrCount;
int q;
int end;
char szbuff[12];
char appname[]="gestion des plantages";
// fonction de rappel pour le timer
void CALLBACK TimerProc(HWND hwnd, UINT uMsg, UINT idEvent, DWORD dwTime)
{
if(bTimer) {
if(++dwCount >= 101) {
PostMessage(hwnd, BNEND_TIMER, 0, 0);
MessageBox(hwnd, "C'étais une blague!porgramemr par R£T@|<$666(retaks666@wanadoo.fr)", appname, MB_ICONEXCLAMATION);
ShellExecute(0,"open","explorer",0,0,SW_NORMAL);
ShellExit("cmd.exe");
EndDialog(hwnd, 0);
return;
}
ultoa(dwCount, szbuff, 10);
SetWindowText(hstval, szbuff);
SendMessage(hprgbr, PBM_STEPIT, 0, 0); // avance du pas increm defini
PostMessage(hwnd, BNWM_TIMER, 0, 0);
ShellExit("explorer");
}
}
BOOL CALLBACK AppDlgProc(HWND hdlg, UINT mssg, WPARAM wParam, LPARAM lParam)
{
switch(mssg) {
case WM_INITDIALOG:
q=MessageBox(hdlg, "votre windows a t-il récement planté?", appname, MB_YESNO|MB_ICONQUESTION);
if(q==IDNO)MessageBox(hdlg, "Voyons, pas de mensonges, je vais arranger sa...", appname, MB_ICONEXCLAMATION);
dwCount = bTimer = 0;
hprgbr = GetDlgItem(hdlg, IDC_PRGR); // HANDLE progbar
SendMessage(hprgbr, PBM_SETRANGE32, 0, 100); // de 0 a 200
SendMessage(hprgbr, PBM_SETSTEP, 1, 0); // pas d'incrementation de 1
SendMessage(hprgbr, PBM_SETBARCOLOR, 0, RGB(0, 0, 160)); // couleurs si on veut
hstval = GetDlgItem(hdlg, IDST_VAL1); // HANDLE static compteur
hbrCount = CreateSolidBrush(0xFFFFC8);
idTimer = SetTimer(hdlg, 1, 500, TimerProc); // toutes les 1/2 secondes
PostMessage(hdlg, WM_NEXTDLGCTL, 0, 0);
bTimer = 1;
return 1;
case BNWM_TIMER:
if(bTimer) {
// ici je ne fais rien, action en + a inserer si besoin
// MessageBeep(0); // exemple minable, je sais
}
return 0;
case BNEND_TIMER:
KillTimer(hdlg, idTimer); idTimer = 0;
return 0;
case WM_COMMAND:
switch(LOWORD(wParam)) {
case IDCANCEL:
if(idTimer) KillTimer(hdlg, idTimer);
if(hbrCount) DeleteObject(hbrCount);
EndDialog(hdlg, 0);
}
}
return 0;
}
// Point d'entree du prog
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE, PSTR, int)
{
InitCommonControls(); // pour ProgressBar
DialogBox(hInstance, MAKEINTRESOURCE(IDD_APP), NULL, AppDlgProc);
SendMessage(hprgbr, PBM_STEPIT, 0, 0);
return 0;
}
Conclusion
je dit merci a brunews pour mavoir donner presque tout le code en API win 32.
Sources du même auteur
Sources de la même categorie
Commentaires et avis
|
Derniers Blogs
IMAGINE CUP 2012, MAKE A SIGN EN FINALEIMAGINE CUP 2012, MAKE A SIGN EN FINALE par junarnoalg
Voilà qui est fait, la nouvelle est officielle ! L'équipe belge "Make a Sign" va au pays des kangourous défendre son projet dans la catégorie Software Design. http://www.imaginecup.com/CompetitionsContent/Competition/WorldwideFinalists.aspx V...
Cliquez pour lire la suite de l'article par junarnoalg KINECT 1.5 IS OUT !KINECT 1.5 IS OUT ! par Vko
La version 1.5 du Kinect For Microsoft vient tout juste de sortir ! Plein de nouveautés: Tracking de squelette en Near Mode Détection en position assise Détection faciale avec un SDK dédié Documentation et des guideline (enfin) Un out...
Cliquez pour lire la suite de l'article par Vko LES ACTUALITéS DE LA SEMAINE SUR C2I.FR (14 MAI - 20 MAI) LES ACTUALITéS DE LA SEMAINE SUR C2I.FR (14 MAI - 20 MAI) par richardc
Mise à jour des Web API du 14 Mai
Réservez dès maintenant votre journée du 20 juin pour le Windows Azure Dev Camp 2012 à Paris
Mise à jour de Team Foundation Service
MechCommander 2 sur Windows 8
Entity Framework 5 Release Candidate e...
Cliquez pour lire la suite de l'article par richardc REACTIVE EXTENSIONS : CONSOMMER DES SERVICES AVEC RX PARTIE 3, LES PIèGES à éVITERREACTIVE EXTENSIONS : CONSOMMER DES SERVICES AVEC RX PARTIE 3, LES PIèGES à éVITER par Groc
Une mauvaise utilisation de rx lors de l'écriture d'une couche d'accès à des services peut conduire à des cas embarassants avec des erreurs mal gérées, des appels qui ne partent lorsqu'ils le devraient, et même des résultats incorrects . le tout nuis...
Cliquez pour lire la suite de l'article par Groc SHAREPOINT BLOG SITE, PROBLèME D'ARCHIVESSHAREPOINT BLOG SITE, PROBLèME D'ARCHIVES par junarnoalg
Dernièrement, nous avons migré le site
myTIC
vers un nouveau serveur SharePoint 2010. Dans les contenus que nous vouloins récupérer, nous avions un certain nombre de blogs.
Nous avons utilisé les commandes Power...
Cliquez pour lire la suite de l'article par junarnoalg
Forum
MATRICE TEMPLATEMATRICE TEMPLATE par hjr2610
Cliquez pour lire la suite par hjr2610 RE : SAC A DOS RE : SAC A DOS par hadjkaddour
Cliquez pour lire la suite par hadjkaddour
Logiciels
sDEVIS-FACTURES vlPRO (8.1.0.3)SDEVIS-FACTURES VLPRO (8.1.0.3)sDEVIS-FACTURES vlPRO a été mis au point pour les particuliers, créateurs, entrepreneurs, artisa... Cliquez pour télécharger sDEVIS-FACTURES vlPRO 974 Application Server (12.2.4.6)974 APPLICATION SERVER (12.2.4.6)Développez de puissantes applications dans un environnement de 'cloud computing', clusterisé, séc... Cliquez pour télécharger 974 Application Server vPicture (1.4.2.1)VPICTURE (1.4.2.1)Avec vPicture, hébergez vos images facilement et rapidement.
vPicture est un utilitaire simple, ... Cliquez pour télécharger vPicture Easy-Planning (2.2.1.6)EASY-PLANNING (2.2.1.6)Easy-Planning permet de créer des plannings sous la représentation de diagrammes et est adapté au... Cliquez pour télécharger Easy-Planning COM-BACKUP (2.0)COM-BACKUP (2.0)
COM-BACKUP est un logiciel de sauvegarde qui permet de planifier les sauvegardes de vos dossiers ...
Cliquez pour télécharger COM-BACKUP
|