How to make my application wait for WinExec to complete?
WinExec is no longer recommended. You can use CreateProcessand WaitForSingleObject, as shown in the example, when creating processes.
CreateProcess
WaitForSingleObject
Strictly speaking, you cannot. WinExecwill return as soon as possible (see the "Notes" section of the WinExec MSDN page ), and, unlike CreateProcess, it will not even return a handle that you can call WaitForSingleObject.
WinExec
WinExec 16- Windows. - system():
#include <stdlib.h> int main() { system( "notepad" ); // only gets to here when the notepad instance is closed }
Source: https://habr.com/ru/post/1732621/More articles:Convert string array to array - ruby-on-railsWhy don't both versions of this code check the -c Perl check? - oopSimple sql table and data generator - sqlClient processor runs almost 100% when stopped - winapiHow to get CodeSignature for Mac OS X app - cocoastatement of the problem of general dynamic programming - algorithmКак я могу отображать информацию отчета поперек, а затем вниз, а не просто несколько страниц? - reporting-servicesPersistent data with javascript - javascriptJQuery with SMARTY and JSON - jsonhttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1732626/how-to-force-two-java-threads-to-run-on-same-processorcore&usg=ALkJrhjDsKiBpdG7z6xrHJKzDQ2n7v7OCwAll Articles