Launch WebPage from Console App

Is it possible to launch a webpage from a Console App using the ShellExecute?

ShellExecute(NULL,"open","http://www.trgnet.com/bcb/index.htm", NULL,NULL,SW_SHOWDEFAULT);


Jay
LVL 4
CrossWiredAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

jkrCommented:
Yes, absolutely. What problems are you encountering?
0
CrossWiredAuthor Commented:
The instruction at "0x00401cd0" referencd memory at "0x00000000". The memory could not be "read".

Click n Ok to Terminate...
Click Cancel to debug


0
CrossWiredAuthor Commented:
It compiles fine, bu tdoesn't run fine..

0
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

CrossWiredAuthor Commented:
nevermind its not in that code its elsewherew
0
jkrCommented:
That is not related to the above line of code, this in fact works OK. Speaking of OK, have you tried pressing 'Cancel'? This will take you straight to the line of code that produced that error.
0
CrossWiredAuthor Commented:
it takes me to the assmebly line
0
jkrCommented:
Are you testing a Debug or Release build? For the latter, that could be the problem why you don't seee any source code. BTW, check the call stack to see what function in your code called the faulting instruction.
0
CrossWiredAuthor Commented:
You lost me there, I set it to Debug Mode vice Release, Ran it again, and hit Cancel, it took me to Assembly, not so good with reading that stuff

0
CrossWiredAuthor Commented:
What are some of the common thigns that could do to make "0x?????" reference "0x00000000"?  What should I look for in my code?
0
CrossWiredAuthor Commented:
eitherway, i'll pick this up on Monday, it tis the weekend, I must go play..

Thanks so far

Jay
0
jkrCommented:
>>What should I look for in my code?

Especially uninitialized pointers. Could you post the call stack (Debug|View|Call Stack)?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Member_3480671Commented:
you can use a simple system call or a createprocess call to C:\program file\internet explorer\iexplore.exe <your url>
i suppose you can shellexecute to
0
CrossWiredAuthor Commented:
It turned out to be my command line arguments.  When I didn't have one I was checking the value of argv[1] which was not there, hence giving me an error.  
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C++

From novice to tech pro — start learning today.

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.