By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,903 Members | 1,677 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,903 IT Pros & Developers. It's quick & easy.

Open Application With ShellExecuteEx

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.