Clear IExplorer Cache

  • Thread starter Thread starter Norman Chong
  • Start date Start date
N

Norman Chong

Hi,

I need an application which clears the cache of the internet explorer
and found the code for this on
http://support.microsoft.com/kb/311289/en

Problem: The end of the loop below is never reached so the program is
blocked.
Reason: Marshal.GetLastWin32Error()
always returns code 87 ("The parameter is incorrect.") which doesn't
match the expected code in the constant ERROR_NO_MORE_ITEMS (Code 259
- "No more data
is available")

While(True)
....
If (Not returnValue And ERROR_NO_MORE_ITEMS.Equals
(Marshal.GetLastWin32Error())) Then
Exit While
End If
....
End While

What does "The parameter is incorrect" mean? Why does the function
return this code?
BTW: I tested the program on several machines - sometimes it worked,
sometimes it crashed... :-(

Thanks,
Norman

P.S.: Sorry for my bad english ;-)
 
Back
Top