调用浏览器访问指定网站(C语言)(浏览器调用接口)

/*

功能:调用浏览器访问指定网站

本示例:打开100窗口/标签(要打开多少个自己设定,设置10000个也可以的,自己可以试一下的)

注意:同时打开100000个以上直接卡得无法动

源代码:

——————————————————

*/

//#include<stdio.h>

#include<windows.h>

//使用宽字符要包含graphics.h库

//否则“项目”--“属性”-- “字符集”那里改成使用“多字节”然后去掉下面代码中的“_T”标识符 /vs2013

#include<graphics.h>

#define WED_CT 100

void openwed()

{

int j;

for (j = 0; j<WED_CT; j++)

ShellExecute(NULL,_T("open"), _T("www.xxxxxxxxxxxxx.com"), NULL, NULL, SW_SHOWNORMAL);

return;

}

int main(int arg, wchar_t *argv[])

{

//ShowWindow(FindWindow(_T("ConsoleWindowClass"), argv[0]), 0); //查找窗口隐藏自身

openwed();

//system("pause");

return 0;

}


//程序流程图



原文链接:,转发请注明来源!