void __fastcall OpenIE()
{
PROCESS_INFORMATION pi;
STARTUPINFO si;
ZeroMemory(&si, sizeof(si));
si.cb = sizeof(STARTUPINFO);
si.dwFlags = STARTF_USESHOWWINDOW;
si.wShowWindow = SW_MINIMIZE;
TCHAR tszWindows[256];
GetSystemDirectory(tszWindows, 256);
char strExe[256];
sprintf(strExe, "%c:\\Program Files\\Internet Explorer\\IEXPLORE.EXE", tszWindows[0]);
if( CreateProcess(strExe, "open ", NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi) )
{
WaitForSingleObject(pi.hProcess, INFINITE);
CloseHandle(pi.hThread);
CloseHandle(pi.hProcess);
}
else
{
int i = 0;
int b = 0;
}
}
阅读(2172) | 评论(0) | 转发(0) |