Use the Windows documentation
https://msdn.microsoft.com/en-us/library/windows/desktop/ms682425(v=vs.85). aspx
BOOL WINAPI CreateProcess(
_In_opt_ LPCTSTR lpApplicationName,
_Inout_opt_ LPTSTR lpCommandLine,
_In_opt_ LPSECURITY_ATTRIBUTES lpProcessAttributes,
_In_opt_ LPSECURITY_ATTRIBUTES lpThreadAttributes,
_In_ BOOL bInheritHandles,
_In_ DWORD dwCreationFlags,
_In_opt_ LPVOID lpEnvironment,
_In_opt_ LPCTSTR lpCurrentDirectory,
_In_ LPSTARTUPINFO lpStartupInfo,
_Out_ LPPROCESS_INFORMATION lpProcessInformation
);
or
https://msdn.microsoft.com/en-us/library/windows/desktop/ms682453(v=vs.85). aspx
HANDLE WINAPI CreateThread(
_In_opt_ LPSECURITY_ATTRIBUTES lpThreadAttributes,
_In_ SIZE_T dwStackSize,
_In_ LPTHREAD_START_ROUTINE lpStartAddress,
_In_opt_ LPVOID lpParameter,
_In_ DWORD dwCreationFlags,
_Out_opt_ LPDWORD lpThreadId
);
Note the parameter of the two functions whose type is LPSECURITY_ATTRIBUTES. According to Microsoft documentation, if the value is NULL the process or thread is created without inheritance to child processes. But if you want to do something more secure, study about the SECURITY_ATTRIBUTES.