tags:

views:

39

answers:

1

Many places I saw that we can use startupinfoex structure in CreateProcess function. But when I checked the signature is only allowing startupinfo structure. Can anybody please give a snippet how startupinfoex can be used with createprocess function. Thanks in advance....

+3  A: 

You need to cast the STARTUPINFOEX* to a STARTUPINFO*.

Be sure to pass the EXTENDED_STARTUPINFO_PRESENT flag to dwCreationFlags and set the StartupInfo.cb member to sizeof(STARTUPINFOEX).

James McNellis