MSDN의 정의를 따르면 다음과 같다. IRP_MJ_CLOSE가 응용 프로그램에서 파일을 Close할 때에 발생할 것으로 착각하기 쉽게 이름이 지어져 있지만, 사실 응용 프로그램에서 파일을 모두 Close하면, IRP_MJ_CLEANUP가 보내진다. 커널 공간의 여러 컴포넌트들이 마저 모든 오프젝트 레퍼런스를 반납하면 IRP_MJ_CLOSE가 발생하는 것이다.
따라서 무엇인가 파일의 내용을 추적하는 드라이버라면 IRP_MJ_CLEANUP 시점에 항상 파일의 내용을 체크하도록 해야 한다.
Receipt of the IRP_MJ_CLOSE request indicates that the reference count on a file object has reached zero, usually because a file system driver or other kernel-mode component has called ObDereferenceObject on the file object. This request normally follows a cleanup request. However, this does not necessarily mean that the close request will be received immediately after the cleanup request.
Receipt of the IRP_MJ_CLEANUP request indicates that the handle reference count on a file object has reached zero. (In other words, all handles to the file object have been closed.) Often it is sent when a user-mode application has called the Microsoft Win32 CloseHandle function (or when a kernel-mode driver has called ZwClose) on the last outstanding handle to a file object.
태터데스크 관리자


태터데스크 메시지
'엔지니어링' 카테고리의 다른 글
| 비스타(Windows Vista)의 레지스트리 가상화 (0) | 2008/03/17 |
|---|---|
| Windows Vista x64 에디션의 드라이버 싸이닝 문제 (0) | 2008/03/17 |
| IRP_MJ_CLEANUP과 IRP_MJ_CLOSE의 차이점 (0) | 2008/03/12 |
| Windows Vista SP1의 Object Manager Filtering으로 할 수 있는 일 (0) | 2007/10/31 |
| Windows Vista SP1의 Object Manager Filtering (0) | 2007/10/30 |
| 윈도우즈 비스타(Vista) 커널 자료 구조 정리 사이트 (0) | 2007/10/29 |

