Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
platform
active.directory
adsi
adsi.iis-admin
base
com_ole
complus_mts
component_svcs
database
directx
gdi
graphics_mm
internet.client
internet.server
internet.server.isapi-dev
localization
mapi
messaging
msi
mslayerforunicode
multimedia
networking
networking.ipv6
sdk_install
security
shell
telephony.tapi_2
telephony.tapi_3
telephony.tsp
telephony.wte
tools
ui
ui_shell
win_base_svcs
win16
  
 
date: Sun, 24 Feb 2008 23:51:34 +0100,    group: microsoft.public.platformsdk.shell        back       


Retrieving Security Zone for My Computer   
Hi,

I'm using the following code to retrieve the security zone of shell items:

CComPtr<IInternetSecurityManager> pInternetSecurityManager;
CoInternetCreateSecurityManager(NULL, &pInternetSecurityManager, 0);
CComPtr<IShellItem> pShellItem;
SHCreateShellItem(NULL, NULL, reinterpret_cast<PCUITEMID_CHILD>(pIDL), 
&pShellItem);
LPWSTR pURL = NULL;
pShellItem->GetDisplayName(SIGDN_URL, &pURL);
DWORD zone = 0;
pInternetSecurityManager->MapUrlToZone(pURL, &zone, 0);

This works for items that are part of the file system. For virtual items 
like My Computer, Recycle Bin, Control Panel and so on, the code reports 
zone 3, which is the Internet zone. Windows Explorer reports these items 
as being in the "My Computer" zone.
How do I retrieve the zone correctly? Or is the zone of virtual items 
hard coded?

Timo
-- 
www.TimoSoft-Software.de - Unicode controls for VB6
"Those who sacrifice freedom for safety deserve neither."
date: Sun, 24 Feb 2008 23:51:34 +0100   author:   Timo Kunze

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us