Thread: \\.\pipe\WinUAE
View Single Post
Old 22 October 2015, 20:17   #14
boir
Registered User
 
Join Date: Aug 2015
Location: europe
Posts: 17
I added a single line (" Sleep(400); ") and haven't seen the issue in any test after that, even when running the exe multiple times in sequence.

Code:
if (argc >= 2) {

	int i;
	for (i=1;i<argc;i++) {
	DWORD ret;
	if (strlen(argv[i]) == 0)
	    return 0;
	threadmode_in = 0;
	while (threadmode_out)
	    Sleep(10);
	if (!WriteFile(p, argv[i], strlen (argv[i]) + 1, &ret, NULL)) {
	    printf("WriteFile() failed, err=%d\n", GetLastError());
	    return 0;
	}
	Sleep(400);  		//avoids pipe inaccessible issue
	threadmode_in = 1;
  }
  return 0;
  }
chaos: thanks, now there are multiple options for anyone who wants to do IPC with WinUAE then.
boir is offline  
 
Page generated in 0.09571 seconds with 9 queries