可以像C#一样运行.bin吗?
C#使用诸如此类的代码
int main(int argc, char* argv[]){
PROCESS_INFORMATION ProcessInfo;
STARTUPINFO StartupInfo;
char cmdArgs[] = "test.bin";
ZeroMemory(&StartupInfo, sizeof(StartupInfo));
StartupInfo.cb = sizeof StartupInfo;
if (CreateProcess("C:\\Users\\username\\Documents\\Visual Studio 2015\\Projects\\runbin\\Release\\test.bin", cmdArgs, NULL, NULL, FALSE, 0, NULL, NULL, &StartupInfo, &ProcessInfo)){
WaitForSingleObject(ProcessInfo.hProcess, INFINITE);
CloseHandle(ProcessInfo.hThread);
CloseHandle(ProcessInfo.hProcess);
printf("work!");
}
else{
printf("The process could not be started...");
}
return 0;
}
在c ++中试过
searchPoint
但不使用.bin