CDefView::_InitViewMenuWhenBarrierNotDisplayed函数分析之删除自定义文件夹
CDefView::_InitViewMenuWhenBarrierNotDisplayed函数分析之删除自定义文件夹
// Remove "Customize This Folder..." if folder is not customizable.
if (!_CachedIsCustomizable())
{
// The Folder Option "Classic style" and the shell restriction WIN95CLASSIC
// should be the same. (Per ChristoB, otherwise admin's never understand what
// the restriction means.) Since we want this to change DEFAULTs, and still
// allow the user to turn on Web View, we don't remove the customize wizard here.
int iIndex = MenuIndexFromID(hmenuView, SFVIDM_VIEW_CUSTOMWIZARD);
if (iIndex != -1)
{
DeleteMenu(hmenuView, iIndex + 1, MF_BYPOSITION); // Remove Menu seperator
DeleteMenu(hmenuView, iIndex, MF_BYPOSITION); // Remove Customize
}
}
1: kd> p
SHELL32!CDefView::_InitViewMenuWhenBarrierNotDisplayed+0x166:
001b:7730be1c ff7508 push dword ptr [ebp+8]
1: kd> p
SHELL32!CDefView::_InitViewMenuWhenBarrierNotDisplayed+0x169:
001b:7730be1f ff1500182077 call dword ptr [SHELL32!_imp__SHMenuIndexFromID (77201800)]
1: kd> p
SHELL32!CDefView::_InitViewMenuWhenBarrierNotDisplayed+0x16f:
001b:7730be25 8bf8 mov edi,eax
1: kd> r
eax=00000005 ebx=00007054 ecx=bb40e64e edx=00000002 esi=77d0cba9 edi=00115e40
eip=7730be25 esp=00faf070 ebp=00faf088 iopl=0 nv up ei pl zr na pe nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000246
SHELL32!CDefView::_InitViewMenuWhenBarrierNotDisplayed+0x16f:
001b:7730be25 8bf8 mov edi,eax
1: kd> dt win32k!tagITEM 0xbc692e94+0x4c*5
+0x000 fType : 0
+0x004 fState : 0
+0x008 wID : 0x7032
+0x00c spSubMenu : (null)
+0x010 hbmpChecked : (null)
+0x014 hbmpUnchecked : (null)
+0x018 lpstr : 0xbc692d94 -> 0x43
+0x01c cch : 0x19
+0x020 dwItemData : 0
+0x024 xItem : 0
+0x028 yItem : 0
+0x02c cxItem : 0
+0x030 cyItem : 0
+0x034 dxTab : 0
+0x038 ulX : 0x7fffffff
+0x03c ulWidth : 0
+0x040 hbmp : (null)
+0x044 cxBmp : 0n-1
+0x048 cyBmp : 0n0
1: kd> db 0xbc692d94
bc692d94 43 00 75 00 73 00 74 00-6f 00 6d 00 69 00 7a 00 C.u.s.t.o.m.i.z.
bc692da4 65 00 20 00 54 00 68 00-69 00 73 00 20 00 26 00 e. .T.h.i.s. .&.
bc692db4 46 00 6f 00 6c 00 64 00-65 00 72 00 2e 00 2e 00 F.o.l.d.e.r.....
bc692dc4 2e 00 00 00 55 48 5f 54-41 49 4c 00 ab ab ab ab ....UH_TAIL.....
bc692dd4 ab ab ab ab 00 00 00 00-00 00 00 00 0e 00 12 00 ................
bc692de4 00 07 1e 00 55 48 5f 48-45 41 44 00 da da da da ....UH_HEAD.....
bc692df4 08 00 00 00 dc 28 a7 bf-0e 00 00 00 e4 00 00 00 .....(..........
bc692e04 60 2e 69 bc 60 2d 69 bc-45 f1 8a bf 67 68 8d bf `.i.`-i.E...gh..
1: kd> dt win32k!tagITEM 0xbc692e94+0x4c*6
+0x000 fType : 0x800
+0x004 fState : 3
+0x008 wID : 0xffffffff
+0x00c spSubMenu : (null)
+0x010 hbmpChecked : (null)
+0x014 hbmpUnchecked : (null)
+0x018 lpstr : (null)
+0x01c cch : 0
+0x020 dwItemData : 0
+0x024 xItem : 0
+0x028 yItem : 0
+0x02c cxItem : 0
+0x030 cyItem : 0
+0x034 dxTab : 0
+0x038 ulX : 0x7fffffff
+0x03c ulWidth : 0
+0x040 hbmp : (null)
+0x044 cxBmp : 0n-1
+0x048 cyBmp : 0n0