#include <windows.h>
#ifdef MSC_VER
#include <afxdb.h>
#include <atlstr.h>
#include <commctrl.h>
#endif
#include <stdio.h>
#include <algorithm>
#include <string>
#include <vector>
#include <map>
#include <assert.h>
#include <time.h>
#include <iostream>
#include <stdlib.h>
#pragma comment(lib, "ws2_32.lib")
#pragma comment(lib, "user32.lib")
#pragma comment(lib, "strmiids.lib")
#pragma comment(lib, "Ole32.lib")
#pragma comment(lib, "gdi32.lib")
#pragma comment(lib, "ddraw.lib")
#pragma comment(lib, "dxguid.lib")
#pragma comment(lib, "shell32.lib")
using namespace std;


#include <stdio.h>

int __stdcall WinMain(HINSTANCE, HINSTANCE, LPSTR lpCmdLine, int){
	HWND hWnd = FindWindow("SDL_app", "QEMU [Stopped]");
	if(hWnd == NULL){
		hWnd = FindWindow("SDL_app", "QEMU");
	}
	SendMessage(hWnd, WM_CLOSE, 0, 0);
	
	SetCurrentDirectory("G:\\c\\os\\z_tools\\qemu\\");
	system("G:\\c\\os\\z_tools\\qemu\\qemu-aa.bat");
}
