网站首页  词典首页

请输入您要查询的函数:

 

术语 createprocess
释义 CreateProcess
语法:
C++
BOOL WINAPI CreateProcess(
__in_opt LPCTSTR lpApplicationName,
__inout_opt LPTSTR lpCommandLine,
__in_opt LPSECURITY_ATTRIBUTES lpProcessAttributes,
__in_opt LPSECURITY_ATTRIBUTES lpThreadAttributes,
__in BOOL bInheritHandles,
__in DWORD dwCreationFlags,
__in_opt LPVOID lpEnvironment,
__in_opt LPCTSTR lpCurrentDirectory,
__in LPSTARTUPINFO lpStartupInfo,
__out LPPROCESS_INFORMATION lpProcessInformation
);
CreateProcess函数
创建一个新的进程和主线程。这种新工艺运行在调用进程的安全上下文。
如果调用进程是假冒其他用户,新工艺使用调用进程的令牌,而不是模拟令牌。要运行在由模拟令牌,代表使用的CreateProcessAsUser或CreateProcessWithLogonW功能的用户的安全上下文的新工艺。
参数
lpApplicationName [中,可选]
该模块的名称被执行。这个模块可以是一个基于Windows的应用程序。它可以有一些模块(例如,MS - DOS或OS / 2)如果适当的子系统是在本地计算机上提供的其他类型。
该字符串可以指定完整路径和文件模块的名称来执行,也可以指定部分名称。在部分名称的情况下,函数使用当前驱动器和当前目录,即完成规范。该函数将不使用搜索路径。此参数必须包括文件扩展名;没有默认的扩展名则假定。
在lpApplicationName参数可以为NULL。在这种情况下,该模块的名称必须是第一个空格分隔在lpCommandLine字符串标记。如果您使用长文件名包含空格,请使用引号的字符串,以指示该文件名称结尾,争论开始,否则,文件名是模糊的。例如,考虑字符串的“C:\\程序文件\\副署长\\程序名”。该字符串可以被解释在许多方面。该系统试图解释下列顺序的可能性:
?:\\ Program.exe的文件\\副署长\\程序名
?:\\程序文件\\ sub.exe迪尔\\程序名
?:\\程序文件\\副署长\\ Program.exe的名称
?:\\程序文件\\副署长\\程序name.exe
如果可执行模块是一个16位应用程序,lpApplicationName应该是NULL,和字符串指向lpCommandLine应指定可执行模块,以及它的参数。
要运行一个批处理文件,您必须启动命令解释器,设置lpApplicationName的cmd.exe和设置lpCommandLine以下参数:/荤加上批处理文件的名称。
lpCommandLine [中,指出,可选]
命令行执行。这个字符串的最大长度为32,768个字符,包括终止空字符的Unicode。如果lpApplicationName为NULL,则是lpCommandLine模块的名称部分仅限于MAX_PATH字符。
这个函数的Unicode版本,CreateProcessW,可以修改这个字符串的内容。因此,这个参数不能指向只读存储器(如一个const变量或字符串)。如果该参数是一个字符串常量,该函数可能会导致访问冲突。
在lpCommandLine参数可以为NULL。在这种情况下,该函数使用字符串指出,作为命令行lpApplicationName。
如果同时lpApplicationName和lpCommandLine都是非空,空结尾的字符串指向lpApplicationName指定模块执行和空结尾的字符串指向lpCommandLine指定命令行。新进程可以使用GetCommandLine检索整个命令行。控制台C编写的程序可以使用argc和argv参数解析命令行。由于argv [0]是模块名,C程序员通常重复模块名作为第一个在命令行标记。
如果lpApplicationName为NULL,则第一空格分隔的命令行标记指定的模块名称。如果您使用长文件名包含空格,请使用引号的字符串,以指示该文件名称结尾,争论开始(请参阅该lpApplicationName参数说明)。如果文件名不包含扩展名,。exe是附加。因此,如果文件扩展名。com,此参数必须包括。com扩展名。如果文件名中一期结束(。)不带扩展名,或者如果文件名包含路径。exe是不附加。如果文件名不包含目录的路径,在下面的顺序可执行文件的系统搜索:
该目录由该应用程序加载。
对于父进程的当前目录。
32位Windows系统目录。使用GetSystemDirectory函数获得这个目录的路径。
16位Windows系统目录。没有函数获得这个目录的路径,但它是搜索。该目录的名称是系统。
Windows目录。使用GetWindowsDirectory函数获得这个目录的路径。
即是在PATH环境变量中列出的目录。请注意,此功能不会搜索的每应用程序路径的应用程序路径注册表项中指定。如果要在搜索序列这个每个应用程序的路径,请使用ShellExecute函数。
该系统增加了一个终止空字符的命令行字符串分开参数的文件名。这分为两个内部处理字符串的原始字符串。
lpProcessAttributes [中,可选]
一个 SECURITY_ATTRIBUTES结构,决定是否返回的句柄新的进程对象可以被继承的子进程的指针。如果lpProcessAttributes为NULL,则句柄不能被继承。
结构的lpSecurityDescriptor成员指定为新进程的安全描述符。如果lpProcessAttributes为NULL或lpSecurityDescriptor为NULL,则进程获取默认的安全描述。在对来自一个进程默认安全描述符的ACL的主要创造者的象征。
Windows XP/2000操作系统:在对来自一个进程默认安全描述符的ACL或模拟的主要创造者的象征。与Windows SP2和Windows Server 2003的XP的改变了这种行为。
lpThreadAttributes [中,可选]
一个 SECURITY_ATTRIBUTES结构,决定是否返回的句柄新线程对象可以被继承的子进程的指针。如果lpThreadAttributes为NULL,则句柄不能被继承。
结构的lpSecurityDescriptor成员指定一个主线程安全描述符。如果lpThreadAttributes为NULL或lpSecurityDescriptor是NULL,线程获得一个默认的安全描述符。在从进程令牌来一个线程默认安全描述符的ACL。
Windows XP/2000操作系统:在对来自线程默认安全描述符的ACL或模拟的主要创造者的象征。与Windows SP2和Windows Server 2003的XP的改变了这种行为。
bInheritHandles [in]
如果该参数为TRUE,每个继承处理调用进程是由新的进程继承。如果该参数为FALSE,处理不继承。请注意,继承的处理具有相同的价值和使用权原始处理。
dwCreationFlags [in]
这些标志控制的优先级和创造的过程。对于一个值列表,请参阅进程创建标志。
此参数也控制了新的进程的优先级,这是用来确定该进程的线程调度优先级。对于一个值列表,请参见GetPriorityClass。如果优先级标志都没有指定,默认为优先级NORMAL_PRIORITY_CLASS,除非创建进程的优先级是IDLE_PRIORITY_CLASS或BELOW_NORMAL_PRIORITY_CLASS。在这种情况下,子进程收到调用进程的默认优先级。
lpEnvironment [中,可选]
向新进程环境块的指针。如果该参数为NULL,则新进程使用调用进程的环境。
一个环境块包含一个空终止块空终止字符串。每个字符串的形式如下:
名称=值\\ 0
由于等号作为分隔符,它不能用在一个环境变量的名称。
一个环境块可以包含Unicode或ANSI字符。如果环境块指向lpEnvironment包含Unicode字符,请务必dwCreationFlags包括CREATE_UNICODE_ENVIRONMENT。如果此参数为NULL和父进程环境块包含Unicode字符,您还必须确保dwCreationFlags包括CREATE_UNICODE_ENVIRONMENT。
这个函数的ANSI版本,CreateProcessA失败,如果这一进程环境块总面积超过32,767个字符。
请注意一个ANSI环境块是由两个零字节:在过去的字符串之一终止,终止多块。一个Unicode环境块终止四个零字节:在过去的字符串2,两个终止块。
lpCurrentDirectory [中,可选]
完整路径的进程的当前目录。该字符串也可以指定一个UNC路径。
如果该参数为NULL,则新的进程将具有相同的电流驱动器和调用进程的目录。 (此功能是提供了炮弹,主要需要启动一个应用程序,并指定其最初的驱动器和工作目录。)
lpStartupInfo [in]
一个 STARTUPINFO或STARTUPINFOEX结构的指针。
要设置扩展属性,使用STARTUPINFOEX结构,并指定在dwCreationFlags参数EXTENDED_STARTUPINFO_PRESENT。
lpProcessInformation [out]
一个 PROCESS_INFORMATION结构鉴定接收有关新的进程信息的指针。
在PROCESS_INFORMATION把手,必须关闭与CloseHandle当他们不再需要。
返回值
如果函数成功,返回值为非零。
如果函数失败,返回值是零。为了获得更多错误信息,调用GetLastError。
请注意,该函数返回之前,该进程已完成初始化。如果所需的DLL无法找到或未能初始化的进程将终止。要获得一个进程的终止状态,调用GetExitCodeProcess。
备注
这个过程被分配一个进程标识符。标识符有效,直到该进程终止。它可以用来识别过程中,或在OpenProcess函数中指定打开的句柄的进程。在这个过程中的初始线程也是分配一个线程标识符。它可以指定在OpenThread函数打开的句柄线程。标识符有效期至线程终止,可用于唯一标识系统内的线程。这些标识符返回PROCESS_INFORMATION结构。
对在命令行可执行程序的名称,操作系统提供的进程并不一定是相同的命令行,该调用程序使CreateProcess函数。操作系统可能前面加上一个完全合格的路径,可执行文件的名称,在没有提供完全合格的路径。
调用线程可以使用WaitForInputIdle函数等待,直到新的进程已经完成了它的初始化并等待没有输入用户输入悬而未决。这可能是有益的父母和孩子之间的进程同步,因为没有新的进程等待完成它的初始化CreateProcess的回报。例如,在创建过程中会使用WaitForInputIdle在试图寻找新的进程有关的一个窗口。
的首选方法关闭一个进程是通过使用ExitProcess函数,因为这个函数发送接近终止连接到该进程的所有DLL的通知。在关闭过程不通知所附的DLL的其他手段。请注意,当一个线程调用PRB:ExitProcess期间,该进程的其他线程都没有机会执行任何额外的代码终止(包括附加DLL的线程终止代码)。有关更多信息,请参阅终止一个进程。
父进程中,可以直接改变进程创建一个子进程的环境变量。这是唯一一个进程时的情况,可以直接改变另一个进程的环境设置。有关更多信息,请参阅更改环境变量。
如果应用程序提供了一个环境块,该系统的驱动器当前目录信息不会自动传播到新的进程。例如,有一个环境变量=荤:其值为驱动器当前目录长的应用程序必须通过手动当前目录信息的新的进程。为此,该应用程序必须显式地创建这些环境变量字符串,他们按字母顺序排序(因为系统使用排序环境),并进入环境阻止他们。通常情况下,他们将在环境块前,由于环境块的排序顺序。
一个办法可以获取一个驱动器X的当前目录信息,提出以下要求:GetFullPathName(的“X:”,...).这避免了一个应用程序不必扫描环境块。如果返回的完整路径为X:\\,没有必要把这些经验传授价值的环境数据,因为根目录,是默认驱动器的一个新的过程X当前目录。
当一个进程与指定CREATE_NEW_PROCESS_GROUP,隐式调用SetConsoleCtrlHandler(空,创造了真)是就新的进程所作的,这意味着新的进程已禁用CTRL + C键。这让炮弹处理自己的CTRL + C键,并有选择地传给子的信号处理。按Ctrl + Break没有禁用,可以用来中断进程/进程组。
安全备注
第一个参数,lpApplicationName,可以为NULL,在这种情况下可执行文件的名称必须在空格分隔的字符串指向lpCommandLine。如果可执行文件或路径名中有一个空间,有一个风险,就是一个不同的可执行文件可以运行,因为这样的函数解析空间。下面的示例是危险的,因为该函数将试图运行“Program.exe的”,如果它存在,而不是“MyApp.exe将”。
LPTSTR szCmdline = _tcsdup(文本(的“C:\\ \\ Program Files文件\\ \\ MyApp的-的L - S”));
CreateProcess的(空,szCmdline,/ * ... * /);
如果恶意用户创建“Program.exe的”在一个系统的应用程序调用,任何程序错误地调用CreateProcess使用Program Files目录将运行此应用程序而不是预定的应用领域。
若要避免此问题,不要为lpApplicationName通过空。如果您为lpApplicationName通过空,周围lpCommandLine可执行文件路径用引号,如在下面的例子。
LPTSTR szCmdline [] = _tcsdup(文本(“\\的”C:\\ \\ Program Files文件\\ \\ MyApp的\\“-的L - S”));
CreateProcess的(空,szCmdline,/*...*/);
实例
有关示例,请参阅创建过程。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinbase.h(头文件:winuser.h)
LibraryKernel32.lib
DLLKernel32.dll
Unicode和ANSI namesCreateProcessW(Unicode)和CreateProcessA(ANSI)的
参见
CloseHandle
CreateProcessAsUser
CreateProcessWithLogonW
PRB:ExitProcess期间
GetCommandLine
GetEnvironmentStrings
GetExitCodeProcess
GetFullPathName
GetStartupInfo
OpenProcess
进程和线程函数
PROCESS_INFORMATION
过程
SECURITY_ATTRIBUTES
SetErrorMode
STARTUPINFO
STARTUPINFOEX
TerminateProcess
WaitForInputIdle
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年8月27日
==英文原文==CreateProcess Function
Creates a new process and its primary thread. The new process runs in the security context of the calling process.
If the calling process is impersonating another user, the new process uses the token for the calling process, not the impersonation token. To run the new process in the security context of the user represented by the impersonation token, use the CreateProcessAsUser or CreateProcessWithLogonW function.
Syntax
C++
BOOL WINAPI CreateProcess(
__in_opt LPCTSTR lpApplicationName,
__inout_opt LPTSTR lpCommandLine,
__in_opt LPSECURITY_ATTRIBUTES lpProcessAttributes,
__in_opt LPSECURITY_ATTRIBUTES lpThreadAttributes,
__in BOOL bInheritHandles,
__in DWORD dwCreationFlags,
__in_opt LPVOID lpEnvironment,
__in_opt LPCTSTR lpCurrentDirectory,
__in LPSTARTUPINFO lpStartupInfo,
__out LPPROCESS_INFORMATION lpProcessInformation
);
Parameters
lpApplicationName [in, optional]
The name of the module to be executed. This module can be a Windows-based application. It can be some other type of module (for example, MS-DOS or OS/2) if the appropriate subsystem is available on the local computer.
The string can specify the full path and file name of the module to execute or it can specify a partial name. In the case of a partial name, the function uses the current drive and current directory to complete the specification. The function will not use the search path. This parameter must include the file name extension; no default extension is assumed.
The lpApplicationName parameter can be NULL. In that case, the module name must be the first white space–delimited token in the lpCommandLine string. If you are using a long file name that contains a space, use quoted strings to indicate where the file name ends and the arguments begin; otherwise, the file name is ambiguous. For example, consider the string "c:\\program files\\sub dir\\program name". This string can be interpreted in a number of ways. The system tries to interpret the possibilities in the following order:
c:\\program.exe files\\sub dir\\program name
c:\\program files\\sub.exe dir\\program name
c:\\program files\\sub dir\\program.exe name
c:\\program files\\sub dir\\program name.exe
If the executable module is a 16-bit application, lpApplicationName should be NULL, and the string pointed to by lpCommandLine should specify the executable module as well as its arguments.
To run a batch file, you must start the command interpreter; set lpApplicationName to cmd.exe and set lpCommandLine to the following arguments: /c plus the name of the batch file.
lpCommandLine [in, out, optional]
The command line to be executed. The maximum length of this string is 32,768 characters, including the Unicode terminating null character. If lpApplicationName is NULL, the module name portion of lpCommandLine is limited to MAX_PATH characters.
The Unicode version of this function, CreateProcessW, can modify the contents of this string. Therefore, this parameter cannot be a pointer to read-only memory (such as a const variable or a literal string). If this parameter is a constant string, the function may cause an access violation.
The lpCommandLine parameter can be NULL. In that case, the function uses the string pointed to by lpApplicationName as the command line.
If both lpApplicationName and lpCommandLine are non-NULL, the null-terminated string pointed to by lpApplicationName specifies the module to execute, and the null-terminated string pointed to by lpCommandLine specifies the command line. The new process can use GetCommandLine to retrieve the entire command line. Console processes written in C can use the argc and argv arguments to parse the command line. Because argv[0] is the module name, C programmers generally repeat the module name as the first token in the command line.
If lpApplicationName is NULL, the first white space–delimited token of the command line specifies the module name. If you are using a long file name that contains a space, use quoted strings to indicate where the file name ends and the arguments begin (see the explanation for the lpApplicationName parameter). If the file name does not contain an extension, .exe is appended. Therefore, if the file name extension is .com, this parameter must include the .com extension. If the file name ends in a period (.) with no extension, or if the file name contains a path, .exe is not appended. If the file name does not contain a directory path, the system searches for the executable file in the following sequence:
The directory from which the application loaded.
The current directory for the parent process.
The 32-bit Windows system directory. Use the GetSystemDirectory function to get the path of this directory.
The 16-bit Windows system directory. There is no function that obtains the path of this directory, but it is searched. The name of this directory is System.
The Windows directory. Use the GetWindowsDirectory function to get the path of this directory.
The directories that are listed in the PATH environment variable. Note that this function does not search the per-application path specified by the App Paths registry key. To include this per-application path in the search sequence, use the ShellExecute function.
The system adds a terminating null character to the command-line string to separate the file name from the arguments. This divides the original string into two strings for internal processing.
lpProcessAttributes [in, optional]
A pointer to a SECURITY_ATTRIBUTES structure that determines whether the returned handle to the new process object can be inherited by child processes. If lpProcessAttributes is NULL, the handle cannot be inherited.
The lpSecurityDescriptor member of the structure specifies a security descriptor for the new process. If lpProcessAttributes is NULL or lpSecurityDescriptor is NULL, the process gets a default security descriptor. The ACLs in the default security descriptor for a process come from the primary token of the creator.
Windows XP/2000: The ACLs in the default security descriptor for a process come from the primary or impersonation token of the creator. This behavior changed with Windows XP with SP2 and Windows Server 2003.
lpThreadAttributes [in, optional]
A pointer to a SECURITY_ATTRIBUTES structure that determines whether the returned handle to the new thread object can be inherited by child processes. If lpThreadAttributes is NULL, the handle cannot be inherited.
The lpSecurityDescriptor member of the structure specifies a security descriptor for the main thread. If lpThreadAttributes is NULL or lpSecurityDescriptor is NULL, the thread gets a default security descriptor. The ACLs in the default security descriptor for a thread come from the process token.
Windows XP/2000: The ACLs in the default security descriptor for a thread come from the primary or impersonation token of the creator. This behavior changed with Windows XP with SP2 and Windows Server 2003.
bInheritHandles [in]
If this parameter TRUE, each inheritable handle in the calling process is inherited by the new process. If the parameter is FALSE, the handles are not inherited. Note that inherited handles have the same value and access rights as the original handles.
dwCreationFlags [in]
The flags that control the priority class and the creation of the process. For a list of values, see Process Creation Flags .
This parameter also controls the new process's priority class, which is used to determine the scheduling priorities of the process's threads. For a list of values, see GetPriorityClass . If none of the priority class flags is specified, the priority class defaults to NORMAL_PRIORITY_CLASS unless the priority class of the creating process is IDLE_PRIORITY_CLASS or BELOW_NORMAL_PRIORITY_CLASS. In this case, the child process receives the default priority class of the calling process.
lpEnvironment [in, optional]
A pointer to the environment block for the new process. If this parameter is NULL, the new process uses the environment of the calling process.
An environment block consists of a null-terminated block of null-terminated strings. Each string is in the following form:
name=value\\0
Because the equal sign is used as a separator, it must not be used in the name of an environment variable.
An environment block can contain either Unicode or ANSI characters. If the environment block pointed to by lpEnvironment contains Unicode characters, be sure that dwCreationFlags includes CREATE_UNICODE_ENVIRONMENT. If this parameter is NULL and the environment block of the parent process contains Unicode characters, you must also ensure that dwCreationFlags includes CREATE_UNICODE_ENVIRONMENT.
The ANSI version of this function, CreateProcessA fails if the total size of the environment block for the process exceeds 32,767 characters.
Note that an ANSI environment block is terminated by two zero bytes: one for the last string, one more to terminate the block. A Unicode environment block is terminated by four zero bytes: two for the last string, two more to terminate the block.
lpCurrentDirectory [in, optional]
The full path to the current directory for the process. The string can also specify a UNC path.
If this parameter is NULL, the new process will have the same current drive and directory as the calling process. (This feature is provided primarily for shells that need to start an application and specify its initial drive and working directory.)
lpStartupInfo [in]
A pointer to a STARTUPINFO or STARTUPINFOEX structure.
To set extended attributes, use a STARTUPINFOEX structure and specify EXTENDED_STARTUPINFO_PRESENT in the dwCreationFlags parameter.
lpProcessInformation [out]
A pointer to a PROCESS_INFORMATION structure that receives identification information about the new process.
Handles in PROCESS_INFORMATION must be closed with CloseHandle when they are no longer needed.
Return Value
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError .
Note that the function returns before the process has finished initialization. If a required DLL cannot be located or fails to initialize, the process is terminated. To get the termination status of a process, call GetExitCodeProcess .
Remarks
The process is assigned a process identifier. The identifier is valid until the process terminates. It can be used to identify the process, or specified in the OpenProcess function to open a handle to the process. The initial thread in the process is also assigned a thread identifier. It can be specified in the OpenThread function to open a handle to the thread. The identifier is valid until the thread terminates and can be used to uniquely identify the thread within the system. These identifiers are returned in the PROCESS_INFORMATION structure.
The name of the executable in the command line that the operating system provides to a process is not necessarily identical to that in the command line that the calling process gives to the CreateProcess function. The operating system may prepend a fully qualified path to an executable name that is provided without a fully qualified path.
The calling thread can use the WaitForInputIdle function to wait until the new process has finished its initialization and is waiting for user input with no input pending. This can be useful for synchronization between parent and child processes, because CreateProcess returns without waiting for the new process to finish its initialization. For example, the creating process would use WaitForInputIdle before trying to find a window associated with the new process.
The preferred way to shut down a process is by using the ExitProcess function, because this function sends notification of approaching termination to all DLLs attached to the process. Other means of shutting down a process do not notify the attached DLLs. Note that when a thread calls ExitProcess, other threads of the process are terminated without an opportunity to execute any additional code (including the thread termination code of attached DLLs). For more information, see Terminating a Process .
A parent process can directly alter the environment variables of a child process during process creation. This is the only situation when a process can directly change the environment settings of another process. For more information, see Changing Environment Variables .
If an application provides an environment block, the current directory information of the system drives is not automatically propagated to the new process. For example, there is an environment variable named =C: whose value is the current directory on drive C. An application must manually pass the current directory information to the new process. To do so, the application must explicitly create these environment variable strings, sort them alphabetically (because the system uses a sorted environment), and put them into the environment block. Typically, they will go at the front of the environment block, due to the environment block sort order.
One way to obtain the current directory information for a drive X is to make the following call: GetFullPathName("X:", ...). That avoids an application having to scan the environment block. If the full path returned is X:\\, there is no need to pass that value on as environment data, since the root directory is the default current directory for drive X of a new process.
When a process is created with CREATE_NEW_PROCESS_GROUP specified, an implicit call to SetConsoleCtrlHandler (NULL,TRUE) is made on behalf of the new process; this means that the new process has CTRL+C disabled. This lets shells handle CTRL+C themselves, and selectively pass that signal on to sub-processes. CTRL+BREAK is not disabled, and may be used to interrupt the process/process group.
Security Remarks
The first parameter, lpApplicationName, can be NULL, in which case the executable name must be in the white space–delimited string pointed to by lpCommandLine. If the executable or path name has a space in it, there is a risk that a different executable could be run because of the way the function parses spaces. The following example is dangerous because the function will attempt to run "Program.exe", if it exists, instead of "MyApp.exe".
 LPTSTR szCmdline = _tcsdup(TEXT("C:\\\\Program Files\\\\MyApp -L -S"));
 CreateProcess(NULL, szCmdline, /* ... */);
If a malicious user were to create an application called "Program.exe" on a system, any program that incorrectly calls CreateProcess using the Program Files directory will run this application instead of the intended application.
To avoid this problem, do not pass NULL for lpApplicationName. If you do pass NULL for lpApplicationName, use quotation marks around the executable path in lpCommandLine, as shown in the example below.
 LPTSTR szCmdline[] = _tcsdup(TEXT("\\"C:\\\\Program Files\\\\MyApp\\" -L -S"));
 CreateProcess(NULL, szCmdline, /*...*/);
Examples
For an example, see Creating Processes .
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinbase.h (include Windows.h)
LibraryKernel32.lib
DLLKernel32.dll
Unicode and ANSI namesCreateProcessW (Unicode) and CreateProcessA (ANSI)
See Also
CloseHandle
CreateProcessAsUser
CreateProcessWithLogonW
ExitProcess
GetCommandLine
GetEnvironmentStrings
GetExitCodeProcess
GetFullPathName
GetStartupInfo
OpenProcess
Process and Thread Functions
PROCESS_INFORMATION
Processes
SECURITY_ATTRIBUTES
SetErrorMode
STARTUPINFO
STARTUPINFOEX
TerminateProcess
WaitForInputIdle
Send comments about this topic to Microsoft
Build date: 8/27/2009
==原始网址==http://msdn.microsoft.com/en-us/library/ms682425(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 13:19:44