在结束的地方加2行代码试试
1 HANDLE hself = GetCurrentProcess(); 2 TerminateProcess(hself, 0);
参考地址
https://blog.csdn.net/christianson136/article/details/7698600?utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-1.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-1.no_search_link