473,378 Members | 1,146 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

ShellExecute on MSVC6.0 vs MSVC.NET

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.

Apr 18 '07 #1
2 1447
On Apr 18, 10:12 am, Gary <G...@discussions.microsoft.comwrote:
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?

Apr 18 '07 #2
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.

"Michael Letterle" wrote:
On Apr 18, 10:12 am, Gary <G...@discussions.microsoft.comwrote:
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?

Apr 18 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: John | last post by:
MSVC6 (SP5) gives this error when I try to use a non-pointer type to a class that is forward-referenced: reo.cpp(8) : error C2027: use of undefined type 'B' However Borland's free 5.5 compiler...
2
by: programmer_pete | last post by:
I am trying to switch to STLPort 4.6.2 from the MSVC STL. My project uses Spirit 1.6.0 and MSVC++ 6. I have configured STLPort as follows: #define _STLP_NO_OWN_IOSTREAMS 1 #define...
3
by: Wiktor Zychla | last post by:
I have a problem I cannot solve. My application hosts IE activex control. I follow the standard procedure: I just aximp shdocvw.dll. Note that this gives you two files: axshdocvw.dll and...
5
by: Wayne Gibson | last post by:
Hi, Was wondering if anybody could help. I'm slowly trying to migrate over to the .NET using windows forms, but still have a need to support existing systems developed in MSVC 6 using MFC and...
0
by: the_openFace | last post by:
I'm trying to display the shell's property page for various files and I'm using this code: class Win32Shell { // ... other stuff here public static extern Int32 ShellExecute( Int32 hwnd,...
0
by: the openBack | last post by:
I'm trying to display the shell's property page for various files and I'm using this code: class Win32Shell { // ... other stuff here public static extern Int32 ShellExecute( Int32 hwnd,...
0
by: David | last post by:
We have an mfc application in which we use ShellExecute to launch the browser with an initial web site. {ShellExecute( NULL, "open", "http://www.SomeWebSite.com", NULL, NULL, SW_SHOWNORMAL ) } ...
2
by: Wang Wei | last post by:
Greetings, I am working on win2K professional. I wrote a program and built it by MSVC 6.0. It works fine in command prompt. The same program we need to run it in DOS mode. Is't possible to build...
5
by: christian | last post by:
Hi! I have a problem with a template function im MSVC6 the template function is defined as: template <__Type1, __Type2> int MyFunc(int param1, double param2) {__Type1 var1; __Type2 var2; ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.