vc++ 设置进程代理

#include <Wininet.h>	
 
#pragma comment(lib, "Wininet.lib")


inf.dwAccessType=INTERNET_OPEN_TYPE_PROXY;
	inf.lpszProxy="http=122.225.107.27:80";
	inf.lpszProxyBypass="";
//	InternetSetOption(0, INTERNET_OPTION_PROXY,inf, sizeof(inf));
//	InternetSetOption(0, INTERNET_OPTION_SETTINGS_CHANGED, "", 0);

	InternetSetOption(NULL, INTERNET_OPTION_PROXY,(LPVOID)&inf, sizeof(inf));
    InternetSetOption(NULL, INTERNET_OPTION_SETTINGS_CHANGED , NULL, 0);//INTERNET_OPTION_REFRESH

vc++ 设置进程代理!

评论