Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


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
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial is about how to put some of your C++ program's functionality into a standard DLL, and how to make working with the EXE and the DLL simple and seamless.   We'll be using Microsoft Visual Studio 2008 and we will cut out the noise; that i…
What my article will show is if you ever had to do processing to a listbox without being able to just select all the items in it. My software Visual Studio 2008 crystal report v11 My issue was I wanted to add crystal report to a form and show…
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…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

730 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