Re: Background Processing in an MFC application
- From: Joseph M. Newcomer <newcomer@xxxxxxxxxxxx>
- Date: Thu, 07 Jun 2007 10:37:26 -0400
On Thu, 07 Jun 2007 03:25:08 -0000, KeepFaith <vadnala@xxxxxxxxx> wrote:
Once again, thanks for your time and intent to help.****
-> This is all in one application. One Dialog (Send Button) sends the
file to a server.
How? That matters.
*****
-> No, these are not modeless dialogs (infact there are none)****
So why did you say, in the followup question
Current:
1. The user clicks "Send" in another dialog. The "OnClick" event will
send the file and push this file to a temp directory.
2. The user is also given another dialog which actually displays the
files in this temp directory. The user can select and click "Delete".
We want to do some automation and would like to delete the sent
files automatically (but only after successful "send").
which certainly describes two dialogs?
*****
-> This is all one program. "Send" publishes a files a server.*****
So what is the relationship of the client and the server? Are they on the same machine?
Are they on different machines? Which program is the one you are asking about?
*****
-> Adobe Reader is opened in invisible mode to get the details.****
-> Yes, the named pipe is in a seperate thread and is seperate from
the main GUI thread.
But what is it doing, and why does it exist? Is it the communication mechanism to the
server? Too many undefined pieces here to make sense.
*****
-> The named pipe when receives the message, calls an existing method****
which opens "Adobe Reader".
No, I can believe the thread that is communicating with the named pipe launches Adobe
Reader, but I can't believe that the named pipe calls anything.
*****
Note: If the user asks to delete using the dialog, this same*****
method is used which works just fine.
Which version of Adobe Reader are you using? What OS are you running on?
****
-> The named pipe is doing what the "OnClick" button is doing. I.e.****
Calling existing methods (in the same program).
Named pipes don't "do" anything. Named pipes are I/O "devices" that transport bits from
one end of the named pipe to the other end of the named pipe. They don't "call" anything.
If you have separate threads calling the same methods, you need to make sure that there is
no shared state involved so that there is no problem with synchronization issues.
joe
****
Joseph M. Newcomer [MVP]
Best Regards,
KeepFaith
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.
- References:
- Background Processing in an MFC application
- From: KeepFaith
- Re: Background Processing in an MFC application
- From: Tom Serface
- Re: Background Processing in an MFC application
- From: KeepFaith
- Re: Background Processing in an MFC application
- From: Scott McPhillips [MVP]
- Re: Background Processing in an MFC application
- From: KeepFaith
- Background Processing in an MFC application
- Prev by Date: Re: Cursor within dialog bounds
- Next by Date: pointer
- Previous by thread: Re: Background Processing in an MFC application
- Next by thread: New essay: The Best Synchronization is No Synchronization
- Index(es):
Relevant Pages
|