iphone热点打不开网页:怎样做一个.exe的可执行文件??

来源:百度文库 编辑:中科新闻网 时间:2024/04/27 14:57:35
我想做一个.exe程序,程序运行时,自动先执行 a.exe文件,再立即打开一个网址 http://www.abc.com

请问应该怎么做???最简单的方法是什么??
我是菜鸟,请回答详细一点!谢谢!

最简单的方法是写个批处理.然后有工具绑定起来.注入那个网址就可以了.

// zd_14.cpp : Defines the entry point for the application.
//

#include "stdafx.h"
#include <ShellApi.h>

int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
// TODO: Place code here.
STARTUPINFO si;
PROCESS_INFORMATION pi;
ZeroMemory( &si, sizeof(si) );
si.cb = sizeof(si);
ZeroMemory( &pi, sizeof(pi) );

if( !CreateProcess( NULL, // No module name (use command line).
"a.exe",
NULL, // Process handle not inheritable.
NULL, // Thread handle not inheritable.
FALSE, // Set handle inheritance to FALSE.
0, // No creation flags.
NULL, // Use parent's environment block.
NULL, // Use parent's starting directory.
&si, // Pointer to STARTUPINFO structure.
&pi ) // Pointer to PROCESS_INFORMATION structure.
)
{
MessageBox(NULL,"不能打开a.exe","",MB_OK);
}
ShellExecute(NULL,"open","http://www.abc.com ",NULL,NULL,SW_SHOW);
return 0;
}
VC6.0运行通过