Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C++ Win7 IE9
How do you use this...I can't seem to find any examples...
HRESULT SetZoneActionPolicy(
    [in] DWORD dwZone,
    [in] DWORD dwAction,
    [in] BYTE *pPolicy,
    [in] DWORD cbPolicy,
    [in] URLZONEREG urlZoneReg
);
Posted 16-Sep-11 13:51pm
Edited 17-Sep-11 4:16am
v2
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Looking at the documentation[^] it's close to useless I must admit, however sometimes that what we lowly Windows developers have to work with. And it's also here we get to show our worth.
 
I suggest you playing around with IInternetZoneManager[^] especially look at the GetZoneActionPolicy [^] method as it may help you understand what you have to provide to the SetZoneActionPolicy.
 
I wish I could provide you with some better advice. I wish you the best of luck figuring this one out, if you do it would be worth an article I believe.
  Permalink  
Comments
Member 7766180 at 16-Sep-11 19:20pm
   
Yeah, It's a tough one! I'm searching for some examples, it's kind of difficult with what the documentation gives you. Thank you.
Member 7766180 at 16-Sep-11 21:42pm
   
Have more info.....This is what I need to set.
User Key: [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\
Internet Settings\Zones\3]
System Key: [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\
Internet Settings\Zones\3]
Value Name: 1803
Data Type: REG_DWORD (DWORD Value)
Value Data: (0 = downloads enabled, 3 = downloads disabled)
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

I have this that I found, Does it help? Some. I still don't see where to set the value.
 
InternetSecurityZoneManager example;
Creating + getting + setting ZoneActionPolicy
HRESULT hRes = ::CoCreateInstance( CLSID_InternetZoneManager, NULL, CLSCTX_SERVER, IID_IInternetZoneManager,
reinterpret_cast< void ** >( &m_pZone ) );
_ASSERTE( SUCCEEDED( hRes ) );
 
m_pZone->GetZoneActionPolicy( URLZONE_INTERNET, DOWNLOAD_UNSIGNED_ACTIVEX, reinterpret_cast< BYTE * >( &m_dwOldPolicy ),sizeof( DWORD ), URLZONEREG_HKCU );
 
DWORD dwPolicy = URLPOLICY_QUERY;
           
m_pZone->SetZoneActionPolicy( URLZONE_INTERNET, 
DOWNLOAD_UNSIGNED_ACTIVEX, 
reinterpret_cast< BYTE * >( &dwPolicy ),
sizeof( DWORD ), URLZONEREG_HKCU );
 
Maybe someone can make sense of this !!!
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

One of these days, you're going to have to tell us what you're up to. The history of your questions raises suspicions.
 
1) How to get somebody's IP packet sniffer to work.
2) How to pull out the HTML packets from the data sniffed
3) How to check for IP addresses
4) How to get URLs from IP addresses
5) How to supress or modify popup boxes from the browser
6) How to put up your own popup boxes in the browser
7) How to change browser zone policy
 
Are you being naughty? Do you intend to be naughty?
  Permalink  
Comments
Member 7766180 at 17-Sep-11 9:38am
   
Absolutely not! You have got to be kidding! How about some answers to the question! Thank you!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 319
1 Maciej Los 295
2 Sergey Alexandrovich Kryukov 230
3 CPallini 205
4 Sinisa Hajnal 166
0 OriginalGriff 7,760
1 Sergey Alexandrovich Kryukov 7,072
2 DamithSL 5,604
3 Manas Bhardwaj 4,986
4 Maciej Los 4,785


Advertise | Privacy | Mobile
Web03 | 2.8.1411023.1 | Last Updated 17 Sep 2011
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100