Skip to content

Instantly share code, notes, and snippets.

@anzz1
Created February 24, 2025 04:44
Show Gist options
  • Save anzz1/fd20b7a23d7ebc1457513bc5474a29f3 to your computer and use it in GitHub Desktop.
Save anzz1/fd20b7a23d7ebc1457513bc5474a29f3 to your computer and use it in GitHub Desktop.
tada.c
// tada.c
// compile (msvc):
// cl /MD /O2 /Zl /GS- /kernel /D "WIN32" /D "NDEBUG" /D "_WINDOWS" tada.c /link kernel32.lib winmm.lib /entry:main /subsystem:windows /pdb:none /machine:I386 /nodefaultlib /incremental:no /manifest:no /safeseh:no /emitpogophaseinfo /RELEASE /OPT:REF /OPT:ICF
#define WINVER 0x0501
#define _WIN32_WINNT 0x0501
#include <windows.h>
int main(void)
{
PlaySoundA("C:\\Windows\\Media\\tada.wav", NULL, SND_FILENAME | SND_NODEFAULT | SND_NOSTOP);
ExitProcess(0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment