Skip to content

Instantly share code, notes, and snippets.

@yne
Created May 8, 2023 14:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yne/cb09763848cb46f5c2f26e0384d6064a to your computer and use it in GitHub Desktop.
Save yne/cb09763848cb46f5c2f26e0384d6064a to your computer and use it in GitHub Desktop.
Random errors
#include <windows.h>
#define _countof(array) (sizeof(array) / sizeof(array[0]))
struct Bidon
{
char *msg;
char *title;
UINT type;
} messages[] = {
{"Hi, I am Albanian virus but because of poor technology in my country unfortunately I am not able to harm your computer.\nPlease be so kind to delete one of your important files yourself and then forward me to other users.\n\nMany thanks for your cooperation!\n\nBest regards,\n\t\t\tAlbanian virus", "Virus Alert !", MB_USERICON | MB_YESNOCANCEL},
// Windows
{"You have not gotten any error message recently.\nSo here is one.", "We are still watching you", MB_ICONEXCLAMATION | MB_OK},
{"Your PC is now radioactive.", "Congratulation", MB_ICONINFORMATION | MB_OK},
{"Something bad.", "Norton Antivirus", MB_ICONINFORMATION | MB_OK},
{"Unable to display bluescreen.", "Fatal Error", MB_ICONERROR | MB_OK},
{"Could you please stop clicking OK on me godammit!\nIt hurts.\nI swear if you click on me one more time, I'll end you.", "Stop it, Get some help", MB_ICONINFORMATION | MB_OK},
{"Click OK to install a free malware.", "Serious Question", MB_ICONINFORMATION | MB_OK},
{"Thank you for using Windows 95.", "Installation Complete", MB_ICONINFORMATION | MB_OK},
{"An error occured while displaying this error.", "Error of error", MB_ICONWARNING | MB_OK},
{"Task failed successfully.", "Windows XP", MB_ICONINFORMATION | MB_OK},
{"Unexpected Error. Please Investigate", "Microsoft Data Link", MB_ICONWARNING | MB_OKCANCEL},
{"Dude, are you sure?", "Microsoft Internet Explorer", MB_ICONQUESTION | MB_OKCANCEL},
{"Keyboard not found.\nPress any key to continue.", "Keyboard Error", MB_ICONQUESTION | MB_OKCANCEL},
{"Mouse not found.\nPress OK to continue.", "Mouse Error", MB_ICONERROR | MB_OKCANCEL},
{"Windows has detected that your monitor is not plugged in.", "Critical Error", MB_ICONERROR | MB_OKCANCEL},
// Airbus specific
{"Cisco AnyConnect.exe has stopped responding\nTake this opportunity to think about your life priorities.", "CiscoAnyConnect.exe has stopped responding", MB_ICONERROR | MB_OKCANCEL},
{"Airbus has detected that your monitor as not been qualified.\nPlease use only qualified peripherals.", "Conformity Error", MB_ICONERROR | MB_OKCANCEL},
{"Airbus has detected that this computer does not conform to export control policy.\nPlease use another computer.", "Export Control Error", MB_ICONERROR | MB_OKCANCEL},
};
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
int more = 1;
while (more == 1)
{
int i = time(NULL) % _countof(messages);
more = MessageBox(NULL, messages[i].msg, messages[i].title, messages[i].type);
}
return more;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment