473,396 Members | 2,033 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,396 software developers and data experts.

Open Application With ShellExecuteEx

Jay
Hello,
I have an issue and I don't know if this is the correct group to post
to. If it isn't, just tell me the correct group, and I will post there.
I wrote a Visual C++ application that will open a Word doc using
ShellExecuteEx based on the filename. When a user tries to close the
word doc it hangs and then gives a message which says "This application
is taking longer than expected to ..." . When a user opens Word
independently, then it can close normally. What would cause Word to
have this issue when being opened from ShellExecuteEx?

-Jay
(patelj27b at gmail dot com)

Jun 1 '06 #1
2 1945
You may want to try to use the following flags with th fMask member of the
SHELLEXECUTEINFO structure:
SEE_MASK_NOCLOSEPROCESS | SEE_MASK_FLAG_DDEWAIT.

Using these flags will provide you with a handle to the launched process
which you can use with WaitForSingleObject to test for closure.

You are responsible for closing the process handle returned in the hProcess
structure member.

"Jay" <pa*******@gmail.com> wrote in message
news:11**********************@f6g2000cwb.googlegro ups.com...
Hello,
I have an issue and I don't know if this is the correct group to post
to. If it isn't, just tell me the correct group, and I will post there.
I wrote a Visual C++ application that will open a Word doc using
ShellExecuteEx based on the filename. When a user tries to close the
word doc it hangs and then gives a message which says "This application
is taking longer than expected to ..." . When a user opens Word
independently, then it can close normally. What would cause Word to
have this issue when being opened from ShellExecuteEx?

-Jay
(patelj27b at gmail dot com)

Jun 1 '06 #2
Have you tried just using ShellExecute() instead. I think that would work
for what you're trying to do since there is no connection needed between
your program and Word.

Tom

"Jay" <pa*******@gmail.com> wrote in message
news:11**********************@f6g2000cwb.googlegro ups.com...
Hello,
I have an issue and I don't know if this is the correct group to post
to. If it isn't, just tell me the correct group, and I will post there.
I wrote a Visual C++ application that will open a Word doc using
ShellExecuteEx based on the filename. When a user tries to close the
word doc it hangs and then gives a message which says "This application
is taking longer than expected to ..." . When a user opens Word
independently, then it can close normally. What would cause Word to
have this issue when being opened from ShellExecuteEx?

-Jay
(patelj27b at gmail dot com)

Jun 1 '06 #3

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

Similar topics

1
by: Gabi | last post by:
Hi All, how can i open a *.chm file programically? not using "system" command because it open a dos window. Thanks
2
by: preetish | last post by:
Hi, I am a total novice to VC++..I have a dialog based application developed using MFC...my requirement is to open a file (with .dat or ..txt ext) invoking Notepad from my application. The user...
6
by: B B | last post by:
Okay, here is what's happening: I have a reasonably fast laptop (1.4 GHz Mobile M, so comparable to 2.5GHz P4) doing .net development. Running Windows XP pro, SP2 IIS is installed and running...
0
by: Niyazi | last post by:
Hi, I created application that store the data in SQL SERVER that reside on network. The client also use this application to access the resources provided with application. But is the client want...
5
by: Ryan Liu | last post by:
Hi, Both way works, I'd just ask some experts which way is better? My application creates a log file daily. Now each time when I write a log, I will open the file and append to the end....
3
by: DaveP | last post by:
is there a Equivelent of ShellExecuteEx in c# thanks Dave
5
by: Usman Jamil | last post by:
Hi I've a class that creates a connection to a database, gets and loop on a dataset given a query and then close the connection. When I use netstat viewer to see if there is any connection open...
2
by: babakandme | last post by:
How can I Run( Execute ) another application( Calc.exe ) from another application in VC++? I mean, is there any API or Function to do it? Appreciate...
22
by: robertgregson | last post by:
Using C#, .NET3.5, Visual Studio 2008 and WCF on Windows VISTA SP1, I have written a service, service host (as a C# console application) and a client. The service uses...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.