Windows API
GetFullPathName();
Retrieves the command-line string for the current process.
type:PROCESS_INFORMATION
1 | typedef struct _PROCESS_INFORMATION { |
type : STARTUPINFO
1 | typedef struct _STARTUPINFOW { |
CreateProcess(NULL, cmd, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi)
创建进程,使用 STARTUPINFO 设置窗口属性,指定子进程主窗口的特性。
NTQuerySystemInfomation()
1 | __kernel_entry NTSTATUS NtQuerySystemInformation( |
返回请求的系统信息, SYSTEM_INFOMATION_CLASS 是枚举值。
- [in] SystemInformationClass
One of the values enumerated in SYSTEM_INFORMATION_CLASS, which indicate the kind of system information to be retrieved. These include the following values.
- [in, out] SystemInformation
A pointer to a buffer that receives the requested information. The size and structure of this information varies depending on the value of the SystemInformationClass parameter:
- [in] SystemInformationLength
The size of the buffer pointed to by the SystemInformation parameter, in bytes.
- [out, optional] ReturnLength
An optional pointer to a location where the function writes the actual size of the information requested. If that size is less than or equal to the
SystemInformationLength parameter, the function copies the information into the SystemInformation buffer; otherwise, it returns an NTSTATUS error code and returns in ReturnLength the size of buffer required to receive the requested information.
Return value
Returns an NTSTATUS success or error code.
The forms and significance of NTSTATUS error codes are listed in the Ntstatus.h header file available in the DDK, and are described in the DDK documentation.
Author: 哒琳
Permalink: http://blog.jieis.cn/2022/d3a61888-3381-418c-86e2-1a2791b37cce.html
Comments