navNoHistory in CWebBrowser2

COleVariant noArgs;
m_Browser.Navigate2((COleVariant)m_szURL,(COleVariant)(long)navNoHistory, &noArgs,&noArgs,&noArgs);      

is not working (items are still inserted into the IE history list)
How do I convert the navNoHistory to a COleVariant successfully?
       
sluffaAsked:
Who is Participating?
 
chensuConnect With a Mentor Commented:
COleVariant noArgs;
COleVariant vaURL(m_szURL);
COleVariant vaFlags(navNoHistory, VT_I4);
m_Browser.Navigate2(&vaURL, &vaFlags, &noArgs, &noArgs, &noArgs);
0
 
sluffaAuthor Commented:
Edited text of question.
0
 
sluffaAuthor Commented:
Thanks!!
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
sluffaAuthor Commented:
but, my compiler (VC6) errors out with an ambiguous call to overloaded function for the vaFlags declaration...
0
 
sluffaAuthor Commented:
fixed it with COleVariant vaFlags((long)navNoHistory,VT_I4)... I think
0
 
sluffaAuthor Commented:
Hmm... darn... items still showing up in history (IE5)
0
 
chensuCommented:
Try

COleVariant vaFlags((long)(navNoHistory | navNoWriteToCache), VT_I4);
0
 
sluffaAuthor Commented:
the problem is, I _do_ want to write to the cache.. is this impossible to do then?
0
 
chensuCommented:
I think navNoHistory should work. Anyway, you might want to have a look at the Persistent URL Cache Functions.

http://msdn.microsoft.com/workshop/c-frame.htm?942613546955#/workshop/networking/wininet/overview/cache.asp 
 
You can use the GetUrlCacheEntryInfo function to see if they are History entries (URLHISTORY_CACHE_ENTRY) and use DeleteUrlCacheEntry to delete them.
0
All Courses

From novice to tech pro — start learning today.