Commits

Swyter  committed 37d0155

*finished logic checking for module placement plus messagebox
*returning pid on successful process creation

  • Participants
  • Parent commits 83b7e66

Comments (0)

Files changed (3)

File res/swconquest.rc.o

Binary file modified.

File swconquest-helper.c

 }
 
 
-HANDLE LaunchGame(){
+DWORD LaunchGame(){
 	STARTUPINFO Startup = {0};
 	PROCESS_INFORMATION processInformation = {0};
 	
       processInformation.hProcess,
       INFINITE
     );
-    return processInformation.hProcess;
+    return processInformation.dwProcessId;
     
   }else{
     return 0;

File swconquest-loader.c

 	//checking if the game exists
 	printf("locating mount and blade 1011: ");
 	
-	if(!FileExists("../../mount&blade.exe"))
-		printf("[not found] ");
-	else
-		printf("[found] ");
-	
-	
-	printf("\n");
+  if(!FileExists("../../mount&blade.exe")){
+    printf("[not found] ");
+    MessageBox(NULL,"Please place the Star Wars Conquest folder into the /Modules subdirectory of your Mount&Blade 1.011 installation.",
+               NULL, MB_ICONEXCLAMATION);
+    exit(1);
+  }
+
+	printf("[found]\n");
   
   
 	//selecting default module
   
   
 	//launching the game
-	printf("launching the game: "); LaunchGame();
+	printf("launching the game with PID %d: ", LaunchGame());
 	printf("[done]\n");