CreateProcess Won't Open Default Browser

Posted on 1999-07-10
Medium Priority
Last Modified: 2013-12-03
Anyone give me any info on why this won't work?

sui.cb = sizeof(STARTUPINFO);
sui.dwFlags = 0;
sui.lpDesktop = 0;
if(! CreateProcess(URLLIST,NULL,NULL,NULL,FALSE,0,NULL,NULL,&sui,&pi))
      MessageBox(NULL,"Error while loading page","Error",MB_ICONSTOP|MB_OK);
Question by:goatox
1 Comment
LVL 23

Accepted Solution

chensu earned 40 total points
ID: 1402627
If URLLIST is just a string like "http://www.experts-exchange.com", it won't work because CreateProcess expects an executalbe file name. Use ShellExecute instead because it can open a document file.

::ShellExecute(hWnd, NULL, _T("http://www.experts-exchange.com"), NULL, NULL, SW_SHOWNORMAL);

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

With most software applications trying to cater to multiple user needs nowadays, the focus is to make them as configurable as possible. For e.g., when creating Silverlight applications which will connect to WCF services, the service end point usuall…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Watch the video to know the simple way to remove or recover or reset lost or forgotten passwords of Outlook PST file. With Kernel Outlook Password Recovery tool such operation is very easy to perform. It is a freeware with limitation to use with 500…

587 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question