Create Process (Open Game);
Hi;
Create Process = Open Game;
Example;
OpenGame(C:/Game/Dizin.exe); or OpenGame(TextBox1->Text);
Create Process = Open Game;
Code:
void OpenGame(char* Path){
STARTUPINFO si;
PROCESS_INFORMATION pi;
char ProcessPath[MAX_PATH];
sprintf(ProcessPath,"%s",Path);
memset(&si,0,sizeof(si));
memset(&pi,0,sizeof(pi));
si.cb = sizeof(si);
CreateProcess(0,ProcessPath,0,0,TRUE,NORMAL_PRIORITY_CLASS,0,NULL,&si,&pi);
}
OpenGame(C:/Game/Dizin.exe); or OpenGame(TextBox1->Text);