sprintf_s(shutdownEventName, sizeof(shutdownEventName), "MySQLShutdown%d", pid);
// Copyright (C) 2007-2010 Kai Seidler, oswald@apachefriends.org, GPL-licensed
int main(int argc, char **argv)
char shutdownEventName[32];
printf("Stopping XAMPP...\n\n");
pidfile="apache\\logs\\httpd.pid";
printf("Can't find %s.\n", pidfile);
sprintf_s(shutdownEventName, sizeof(shutdownEventName), "ap%d_shutdown", pid);
shutdownEvent = OpenEvent(EVENT_MODIFY_STATE, FALSE, shutdownEventName);
if (shutdownEvent != NULL)
printf("Can't find Apache process #%d.\n", pid);