ShellExecute on MSVC6.0 vs MSVC.NET

G

Guest

I'm ported several existing projects from VC++6.0
to .NET2003. I seem to have a problem with ShellExecute() however, as
in:

// Opens a browser
HINSTANCE rc;
rc = ShellExecute (NULL, "open", "http://123.456.789.001", NULL, NULL,
SW_SHOWMAXIMIZED);


This works as expected when executing the app built under 6.0 but it
fails w/ SE_ERR_ACCESSDENIED when executing the app built
with .NET2003.


Any thoughts?


Any input will be greatly appreciated.
 
M

Michael Letterle

I'm ported several existing projects from VC++6.0
to .NET2003. I seem to have a problem with ShellExecute() however, as
in:

// Opens a browser
HINSTANCE rc;
rc = ShellExecute (NULL, "open", "http://123.456.789.001", NULL, NULL,
SW_SHOWMAXIMIZED);

This works as expected when executing the app built under 6.0 but it
fails w/ SE_ERR_ACCESSDENIED when executing the app built
with .NET2003.

Any thoughts?

Any input will be greatly appreciated.

Any reason not to be using the System.Diagnostics.Process class
in .NET?
 
G

Guest

Hi Mr Letterle,

Thank you for the recommendation. I am not familiar with the new .NET
constructs. In fact I'm considered a newbie. I'm simply maintaining existing
code. And have been tasked to migrate to the new development suite. Any
reason why the following code will no longer work under .NET? And how would
I resolve this w/out having to rewrite (hopefully not) existing code?

Thank you very much.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top