I could not get this sample to work. I ran the sample code and even though InternetSetOptions returned a value of bReturn == 1 (i.e. it indicates it ran sucessfully) a subsequent query confirmed that no parameters were changed. Is this the only way to enable/disable Internet Explorer proxy programmatically?