//申明windows api
[DllImport(@"wininet",
SetLastError=true,
CharSet=CharSet.Auto,
EntryPoint="InternetSetOption",
CallingConvention=CallingConvention.StdCall)]
public static extern bool InternetSetOption
(
int hInternet,
int dmOption,
IntPtr lpBuffer,
int dwBufferLength
);