CreateProcess 与 CreateFile EXE

CreateProcess vs. CreateFile EXE

[已编辑]

这种情况有什么不同吗?我是新手,先谢谢你了!

您对这些功能的描述不正确。它们有完全不同的用途。

  • CreateProcess运行一个可执行文件作为一个进程。它不会创建文件。

    Creates a new process and its primary thread. The new process runs in the security context of the calling process.

    来源:MSDN

  • CreateFile 将打开或创建一个文件。它不会将该文件作为进程执行。

    Creates or opens a file or I/O device. The most commonly used I/O devices are as follows: file, file stream, directory, physical disk, volume, console buffer, tape drive, communications resource, mailslot, and pipe. The function returns a handle that can be used to access the file or device for various types of I/O depending on the file or device and the flags and attributes specified.

    来源:MSDN