minifiredragon
Programmer
I am trying to open up an Internet Explorer Window from within a program I am writing.
I have tried using WinExec:
WinExec("iexplore", SW_NORMAL);
WinExec("iexplore.exe", SW_NORMAL);
WinExec("C:\Program Files\Internet Explorer\iexplore", SW_NORMAL);
ShellExecute(NULL, "open", "iexplore" , NULL, NULL, SW_SHOWNORMAL);
ShellExecute(NULL, "open", "iexplore.exe" , NULL, NULL, SW_SHOWNORMAL);
ShellExecute(NULL, "open", "C:\Program Files\Internet Explorer\iexplore" , NULL, NULL, SW_SHOWNORMAL);
And finally:
STARTUPINFO si;
PROCESS_INFORMATION pi;
GetStartupInfo(&si);
CreateProcess(NULL, "iexplore", // Name of app to launch
NULL, // Default process security attributes
NULL, // Default thread security attributes
FALSE, // Don't inherit handles from the parent
0, // Normal priority
NULL, // Use the same environment as the parent
NULL, // Launch in the current directory
&si, // Startup Information
&pi); // Process information stored upon return
The thing is it works fine with notepad so I do not know what is wrong with the whole thing. I should mention that I also used SW_SHOW instead of SW_NORMAL thinking it might work.
I finally settled with:
ShellExecute(NULL, "open", " , NULL, NULL, SW_SHOWNORMAL);
to open an IE brower window. Is IE not suppose to be called from within an AP?
I have tried using WinExec:
WinExec("iexplore", SW_NORMAL);
WinExec("iexplore.exe", SW_NORMAL);
WinExec("C:\Program Files\Internet Explorer\iexplore", SW_NORMAL);
ShellExecute(NULL, "open", "iexplore" , NULL, NULL, SW_SHOWNORMAL);
ShellExecute(NULL, "open", "iexplore.exe" , NULL, NULL, SW_SHOWNORMAL);
ShellExecute(NULL, "open", "C:\Program Files\Internet Explorer\iexplore" , NULL, NULL, SW_SHOWNORMAL);
And finally:
STARTUPINFO si;
PROCESS_INFORMATION pi;
GetStartupInfo(&si);
CreateProcess(NULL, "iexplore", // Name of app to launch
NULL, // Default process security attributes
NULL, // Default thread security attributes
FALSE, // Don't inherit handles from the parent
0, // Normal priority
NULL, // Use the same environment as the parent
NULL, // Launch in the current directory
&si, // Startup Information
&pi); // Process information stored upon return
The thing is it works fine with notepad so I do not know what is wrong with the whole thing. I should mention that I also used SW_SHOW instead of SW_NORMAL thinking it might work.
I finally settled with:
ShellExecute(NULL, "open", " , NULL, NULL, SW_SHOWNORMAL);
to open an IE brower window. Is IE not suppose to be called from within an AP?