Threading issue

  • Thread starter Thread starter Chuck Hecht
  • Start date Start date
C

Chuck Hecht

I have a application that will create a XML file, when the user is finished.
They place the device back into the cradle and active sync pulls the XML
file back to the active sync partnership "My documents" folder on the pc.

Issue: If they exit the program active sync will not move the file also if
you browse on the pda and try to delete the file you get a "Sharing
Violation". If you stay in the program you can either delete the file or
active sync moves it with no problem.

I have been told that I most likely have a worker thread that was not shut
down correctly. In all of the documentation that I have read I still have no
idea how to stop something that I did not start.

Any help or direction would be appreicated

chuck
 
It sounds to me like there is a control path through your code that does not
close the XML. So, just as would be the case in any system where a file
writer opened a file for exclusive access, there's an error when someone
else tries to read it (to copy it to the PC). Make sure that you're closing
all files, streams, etc.

Paul T.
 
Back
Top