The first flag is a lock bit, indicating whether the entry is currently in use. The second flag is the inheritance designation—that is, it indicates whether processes created by this process will get a copy of this handle in their handle tables. As already noted, handle inheritance can be specified on handle creation or later with the
System components and device drivers often need to open handles to objects that user-mode applications shouldn’t have access to. This is done by creating handles in the
EXPERIMENT: Viewing the Handle Table with the Kernel Debugger
The
The handle index identifies the handle entry in the handle table. (Zero means “display all handles.”) The first handle is index 4, the second 8, and so on. For example, typing !handle 4 will show the first handle for the current process.
The flags you can specify are a bitmask, where bit 0 means “display only the information in the handle entry,” bit 1 means “display free handles (not just used handles),” and bit 2 means “display information about the object that the handle refers to.” The following command displays full details about the handle table for process ID 0x62C:lkd> !handle 0 7 62c processor number 0, process 000000000000062c Searching for Process with Cid == 62c PROCESS fffffa80052a7060 SessionId: 1 Cid: 062c Peb: 7fffffdb000 ParentCid: 0558 DirBase: 7e401000 ObjectTable: fffff8a00381fc80 HandleCount: 111. Image: windbg.exe Handle table at fffff8a0038fa000 with 113 Entries in use 0000: free handle, Entry address fffff8a0038fa000, Next Entry 00000000fffffffe 0004: Object: fffff8a005022b70 GrantedAccess: 00000003 Entry: fffff8a0038fa010 Object: fffff8a005022b70 Type: (fffffa8002778f30) Directory ObjectHeader: fffff8a005022b40fffff8a005022b40 (new version) HandleCount: 25 PointerCount: 63 Directory Object: fffff8a000004980 Name: KnownDlls 0008: Object: fffffa8005226070 GrantedAccess: 00100020 Entry: fffff8a0038fa020 Object: fffffa8005226070 Type: (fffffa80027b3080) File ObjectHeader: fffffa8005226040fffffa8005226040 (new version) HandleCount: 1 PointerCount: 1 Directory Object: 00000000 Name: \Program Files\Debugging Tools for Windows (x64) {HarddiskVolume2}
EXPERIMENT: Searching for Open Files with the Kernel Debugger
Although you can use Process Explorer, Handle, and the OpenFiles.exe utility to search for open file handles, these tools are not available when looking at a crash dump or analyzing a system remotely. You can instead use the
First you need to pick the drive letter you are interested in and obtain the pointer to its
Next use the
Вильям Л Саймон , Вильям Саймон , Наталья Владимировна Макеева , Нора Робертс , Юрий Викторович Щербатых
Зарубежная компьютерная, околокомпьютерная литература / ОС и Сети, интернет / Короткие любовные романы / Психология / Прочая справочная литература / Образование и наука / Книги по IT / Словари и Энциклопедии