>Hi,
>
>I just want to create a Process in a Hidden Window. Actually I use the following code to create a process :
>
>Instance = "c:\dev\Instance.exe "+This.Name+ CHR(0)
>Ret = CreateProcess(0, Instance, 0, 0, 1, HIGH_PRIORITY_CLASS, 0, 0, @start, @process_info)
>
>How to tell I want no windows ?
>Does anybody have some example of code using Win32_ProcessStartup API function in VFP ?
>
>Roman
I don't have example of Win32_ProcessStartup. But if you only want to hide the windows, CreateProcess has the ability to do that.
Set the STARTUP_INFO structure with this
c0 = chr(0)
lpStartupInfo = Num2DWord(68) + replicate(c0, 40)
lpStartupInfo = lpStartupInfo + Num2DWord(1)
lpStartupInfo = lpStartupInfo + replicate(c0, 20)
Ret = CreateProcess(0, Instance, 0, 0, 1, HIGH_PRIORITY_CLASS, 0, 0, @lpStartupInfo, @process_info)
Herman