Archive for July, 2008

Happy Fourth of July!

Friday, July 4th, 2008

Woke up early so I’ve been working on fixing the problem in IE Script Debugging Toggler where it doesn’t always change the script debugging state in open Internet Explorer Windows. Have been trying to use InternetSetOption() from WinInet.dll to force open windows to update their settings. I’m using the following code:

public static class WinInet
{
 
#region Public Constants
 
public const int INTERNET_OPTION_REFRESH = 37;
 
public const int INTERNET_OPTION_SETTINGS_CHANGED = 39;
 
#endregion

  [DllImport("wininet.dll", SetLastError = true, CharSet = CharSet.Auto)]
 
public static extern bool InternetSetOption(IntPtr hInternet, int dwOption, IntPtr lpBuffer, int dwBufferLength);
}

WinInet.InternetSetOption(IntPtr.Zero, WinInet.INTERNET_OPTION_SETTINGS_CHANGED, IntPtr.Zero, 0);
WinInet.InternetSetOption(IntPtr.Zero, WinInet.INTERNET_OPTION_REFRESH, IntPtr.Zero, 0);

But it doesn’t seem to be working. Reading up on INTERNET_OPTION_SETTINGS_CHANGED and INTERNET_OPTION_REFRESH at MSDN it looks like INTERNET_OPTION_REFRESH only refreshes the proxy data so I problably don’t need to be calling it. As far as INTERNET_OPTION_SETTINGS_CHANGED is concerned they mention “on the next call to InternetConnect” so I’m not clear when that would occur in an open browser. My other thought is that since I can’t find a was to set the script debugging settings using InternetSetOption then maybe an INTERNET_OPTION_SETTINGS_CHANGED won’t refresh those values.

IE Script Debugging Toggler 1.0.8.702

Wednesday, July 2nd, 2008

I’ve been doing a lot more AJAX development recently and was frustrated by how many steps (4-5 heh) it took to enable/disable script debugging in Internet Explorer. After a quick search I wasn’t able to find a tool to make enabling/disabling script debugging in IE simpler so I wrote IE Script Debugging Toggler. Follow the link for more details.