/* validate_dir(ANGBAND_DIR_XTRA_HELP); */
}
+bool is_already_running()
+{
+ bool result = FALSE;
+ HANDLE hMutex;
+
+ hMutex = CreateMutex(NULL, TRUE, VERSION_NAME);
+ if (GetLastError() == ERROR_ALREADY_EXISTS)
+ {
+ result = TRUE;
+ }
+ return result;
+}
+
int FAR PASCAL WinMain(HINSTANCE hInst, HINSTANCE hPrevInst,
LPSTR lpCmdLine, int nCmdShow)
/* Save globally */
hInstance = hInst;
+
+
+ /* Prevent multiple run */
+ if (is_already_running())
+ {
+ MessageBox(NULL,
+ _("ÊѶòÈÚÅܤϤ¹¤Ç¤Ëµ¯Æ°¤·¤Æ¤¤¤Þ¤¹¡£", "Hengband is already running."),
+ _("¥¨¥é¡¼¡ª", "Error") ,
+ MB_ICONEXCLAMATION | MB_OK | MB_ICONSTOP);
+ return FALSE;
+ }
/* Initialize */
if (hPrevInst == NULL)