Check out example codes for "how to run a c++ program in the background". It will help you in understanding the concepts better.

Code Example 1

HWND window;
AllocConsole();
window = FindWindowA("ConsoleWindowClass", NULL);
ShowWindow(window,0);

Learn ReactJs, React Native from akashmittal.com