PRB: Problems Sending Many Messages Using Multiple Threads

Last reviewed: February 25, 1998
Article ID: Q181697
The information in this article applies to:
  • Collaboration Data Objects (CDO) for NTS, version 1.2

SYMPTOMS

When you use Collaboration Data Objects for Microsoft Windows NT Server (CDONTS) to send a large number of messages using multiple threads, the Send method may return the following Windows NT error code:

   Code: 32L
   Name: ERROR_SHARING_VIOLATION
   Description: The process cannot access the file because it is being
   used by another process.

In addition, one or more messages may not be sent. These problems can occur when you use the Send method with the CDONTS NewMail object or Message object.

CAUSE

When you use CDONTS to send messages, the messages are converted to files. The files are stored in a folder until they are transferred using Simple Mail Transfer Protocol (SMTP). When you use CDONTS to send a large number of messages using multiple threads, more than one thread may create a file with the same name. When this occurs, the Send method returns the error code described above.

Under certain circumstances, creating multiple files with the same name may cause one or more messages to be overwritten. When this occurs, the messages that are overwritten are not delivered.

WORKAROUND

To work around this problem, use a critical section to serialize calls to the Send method.

STATUS

Microsoft has confirmed this to be a problem in Collaboration Data Objects for NTS version 1.2. We are researching this problem and will post additional information here in the Microsoft Knowledge Base as it becomes available.

Keywords          : cdo
Version           : WINDOWS:1.2
Platform          : WINDOWS
Issue type        : kbprb
Solution Type     : kbpending


================================================================================


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: February 25, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.