ShellExecute on MSVC6.0 vs MSVC.NET

  • Thread starter Thread starter Guest
  • Start date Start date
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.
 
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?
 
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.
 
Back
Top