Thread & COM interaction problem
- From: "Yury Peskin" <ypeskin@xxxxxxxxxxxxxxxxx>
- Date: Fri, 28 Oct 2005 11:46:33 -0500
I'm working on using the Background Intelligent Transfer Service to upload
files.
I have a UI Thread in which I have a COM object that uses notifications to
pass the progress information. I use callbacks to get the progress info and
display it. The problem I'm having is how do I know when the UI Thread has
completed. I've tried setting an event, but the event never gets set. I
tried doing the following:
UI Thread gets created, I initliaze the COM object in the InitInstance which
is where I create the Shutdown Event (it's actually a HANDLE), I then pass
the HANDLE to the constructor of the notification object and I set the event
in the Release method of the COM object when the count reaches 0. In the
mean time, I'm waiting on the event in one of the functions in the UI
Thread, the problem is I always get WAIT_TIMEOUT from the
WaitForSingleObject function, even though the file gets uploaded and I would
expect the Release method to get called.
Any ideas?
Thanks,
Yury
.
- Prev by Date: Advice needed binary configuration files
- Next by Date: HELP ! Problema con OCX in DLL
- Previous by thread: Advice needed binary configuration files
- Next by thread: HELP ! Problema con OCX in DLL
- Index(es):