Type a page name and press Enter. You'll jump to the page if it exists, or you can create it if it doesn't.
To create a page in a module other than msvcrt, prefix the name with the module name and a period.
Declare Function _spawn Lib "msvcrt.dll" (TODO) As TODO
User-Defined Types:
None.
Alternative Managed API:
Do you know one? Please contribute it!
Notes:
None.
Tips & Tricks:
Please add some!
Sample Code:
C# Sample Code
[DllImport("msvcrt.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr _wspawnl(
int mode, // _P_ constant (_P_WAIT=0, _P_NOWAIT=1)
[MarshalAs(UnmanagedType.LPWStr)]string cmdname,
[MarshalAs(UnmanagedType.LPWStr)]string arg0,
[MarshalAs(UnmanagedType.LPWStr)]string arg1,
[MarshalAs(UnmanagedType.LPWStr)]string argNULL);
static int _P_WAIT = 0; // Suspends calling thread until execution of new process
// is complete (synchronous _spawn).
static int _P_NOWAIT = 1; // Continues to execute calling process concurrently with
// new process (asynchronous _spawn).
static int _P_OVERLAY = 2; // Overlays calling process with new process, destroying
// the calling process (same effect as _exec calls).
static int _P_NOWAITO = 3; // Continues to execute calling process concurrently with
// new process (asynchronous _spawn).
static int _P_DETACH = 4; // Continues to execute the calling process; new process
// is run in the background with no access to the console
// or keyboard. Calls to _cwait against the new process will
// fail (asynchronous _spawn).
// start process AppName and destroy the current process
_wspawnl(_P_OVERLAY, AppName, "", "", null);
Please edit this page!
Do you have...
helpful tips or sample code to share for using this API in managed code?
corrections to the existing content?
variations of the signature you want to share?
additional languages you want to include?
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).