#define STRICT
#include <Windows.h>
#include <tchar.h>
#include <assert.h>
const TCHAR szOperation[]=_T("open");
const TCHAR szAddress[]=_T("www.google.com.hk");
int WINAPI WinMain( __in HINSTANCE hInstance, __in_opt HINSTANCE hPrevInstance, __in_opt LPSTR lpCmdLine, __in int nShowCmd )
{
HINSTANCE hRslt=ShellExecute(NULL,szOperation,szAddress,NULL,NULL,SW_SHOWNORMAL);
assert(hRslt>(HINSTANCE)HINSTANCE_ERROR);
return 0;
}
运行效果