原文链接:http://laokaddk.blog.51cto.com/368606/125553/
MSDN:https://msdn.microsoft.com/library/windows/hardware/ff548630%28v=vs.85%29.aspx/
The I/O Manager sends the IRP_MJ_CREATE request when a new file or directory is being created, or when an existing file, device, directory, or volume is being opened. Normally this IRP is sent on behalf of a user-mode application that has called a Microsoft Win32 function such as CreateFile or on behalf of a kernel-mode component that has called IoCreateFile, IoCreateFileSpecifyDeviceObjectHint, ZwCreateFile, or ZwOpenFile. If the create request is completed successfully, the application or kernel-mode component receives a handle to the file object.
IRP_MJ_CREATE
发送时机:
IO管理器在一个文件或目录创建时,
或一个已存在的文件,设备,目录,Volume被打开时
发送此IRP.
通常在应用层调用CreateFile,或内核层调用:
IoCreateFile
ZwCreateFile
ZwOpenFile
引发此IRP的发送.
若创建成功,则应用层或内核组件会收到一个此文件对象的句柄.