Yea I was thinking of a way Khaled could implement MULTIPLE mapped files instead of one that would be shared by all processes. Using the lParam of the SendMessage() call never came to mind, but that's a great idea.

Code:
int mapNumber;
char *lpMapFile;
srand();
mapNumber = rand();
sprintf(lpMapFile, "mIRC%d", mapNumber);
// Open the map file with lpMapFile
SendMessage(WM_COMMAND, mapNumber, 0);
// Close the mapfile


That won't stop incompetent coders from deadlocking certain mIRC mapfiles i suppose, but it will allow people to work around it. Though, this is definitely not the best solution. The best solution was mentioned in my first post imho-- this is just an easier one (if Khaled is watching :P)