Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
This function is used to run a new program. It creates a new process and its primary thread. The new process executes the specified executable file.
CeCreateProcessis a remote application interface (RAPI), which enables an application running on a desktop computer to make function calls on a Windows CE–based device.
BOOL CeCreateProcess( LPCWSTR lpApplicationName , LPCWSTR lpCommandLine , LPSECURITY_ATTRIBUTES lpProcessAttributes , LPSECURITY_ATTRIBUTES lpThreadAttributes , BOOL bInheritHandles , DWORD dwCreationFlags , LPVOID lpEnvironment , LPWSTR lpCurrentDirectory , LPSTARTUPINFO lpStartupInfo , LPPROCESS_INFORMATION lpProcessInformation );
Parameters
The string can specify the full path and filename of the module to execute to execute or it can specify a partial name.
The lpCommandLineparameter can be NULL. In that case, the function uses the string pointed to by lpApplicationNameas the command line.
If lpCommandLineis non-NULL, lpApplicationNamespecifies the module to execute, and lpCommandLinespecifies the command line. C runtime processes can use the argcand argvarguments.
If lpApplicationNamedoes not contain an extension, .EXE is assumed. If the filename ends in a period (.) with no extension, or the filename contains a path, .EXE is not appended.
If the filename does not contain a directory path, Windows CE versions 2.10 and later search for the executable file in the following sequence:
Windows CE versions 1.0 through 2.01 search for the executable file in the following sequence:
Value | Description |
---|---|
CREATE_SUSPENDED | The primary thread of the new process is created in a suspended state, and does not run until the ResumeThreadfunction is called. |
For Windows CE versions 2.0 and later, you can specify one of the following flags in addition to CREATE_SUSPENDED:
Value | Description |
---|---|
DEBUG_PROCESS | If this flag is set, the calling process is treated as a debugger, and the new process is a process being debugged. Child processes of the new process are also debugged. The system notifies the debugger of all debug events that occur in the process being debugged. |
If you create a process with this flag set, only the calling thread — the thread that called CreateProcess—can call the WaitForDebugEventfunction. | |
DEBUG_ONLY_THIS_PROCESS | If this flag is set, the calling process is treated as a debugger, and the new process is a process being debugged. No child processes of the new process are debugged. The system notifies the debugger of all debug events that occur in the process being debugged. |
Return Values
Nonzero indicates success. Zero indicates failure. To determine if a function failed because of RAPI errors, call CeRapiGetError. To determine if a function failed because of non-RAPI errors, call CeGetLastError.
Remarks
When writing applications for Windows CE versions 1.0 and 1.01, use the PegCreateProcessfunction.
Requirements
Runs On | Versions | Defined in | Include | Link to |
---|---|---|---|---|
Windows CE OS | 2.0 and later | Rapi.h |
See Also
CeGetLastError, CeRapiGetError, CreateProcess, ResumeThread, WaitForDebugEvent, PROCESS_INFORMATION