program WIN32GUI 'Sample';
//include simple memory manager - required for new, delete
#include 'smm32.zir';
//user32 holds win api functions of user32.dll
#include 'user32.zir';
//declare our struct variables
STARTUPINFOA spInfo;
PROCESS_INFORMATION prInfo;
//set spInfo.cb to the size of the struct
spInfo.cb = sizeof STARTUPINFOA;
//create process notepad.exe
CreateProcess(0, 'notepad.exe', 0, 0, 0, 0, 0, 0, @spInfo, @prInfo);
//close handles to the process
CloseHandle(prInfo.hProcess);
CloseHandle(prInfo.hThread);
//exit our application and notepad will stay open
ExitProcess(0);