• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 359
  • Last Modified:

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
0
CrossWired
Asked:
CrossWired
  • 8
  • 4
2 Solutions
 
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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
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
 
stuartdehaanCommented:
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

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

  • 8
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now