Share via


DropDirectory CoClass

Topic Last Modified: 2006-06-13

Defines an object used to access a file system that contains messages, such as the SMTP service drop directory, on a Microsoft® Windows® server operating systems server.

Because DropDirectory is used only for accessing messages on a file system, it is not useful in CDO for Exchange 2000 Server (CDOEX) where messages are saved in the mailbox stores.

CLSID

CD000004-8B95-11D1-82DB-00C04FB1625D

ProgID

CDO.DropDirectory

Type Library

Microsoft CDO for Windows 2000 Library

Microsoft CDO for Exchange 2000 Library

Inproc Server

CDOSYS.DLL, CDOEX.DLL

Threading Model

Both

Implemented Interfaces

Examples


Dim iDropDir as new CDO.DropDirectory
Dim iMsgs as CDO.IMessages

' Get from the SMTP drop directory.
Set iMessages = iDropDir.GetMessages
Dim iMsg as CDO.Message

For Each iMessage in iMsgs
  Debug.Print iMsg .From
  Debug.Print iMsg .To
  Debug.Print iMsg .Subject
  Debug.Print iMsg .TextBody
Next iMessage



#import "c:\program files\common files\system\ado\msado15.dll" no_namespace
#import "c:\winnt\system32\cdosys.dll" no_namespace
#include <iostream.h>

main() {
  CoInitialize();
  {
    IDropDirectoryPtr iDropDir(__uuidof(DropDirectory));
    IMessagesPtr iMessages;
    iMessages = iDropDir->GetMessages("");
    long Count = iMessages->Count;
    for(long i=1;i<=Count;i++) {
      IMessagePtr iMsg;
      iMsg = iMessages->item[i];
      cout << iMsg->To << endl;
      cout << iMsg->From << endl;
      cout << iMsg->Subject << endl;
      cout << iMsg->TextBody << endl;
    }
  }
  CoUninitialize();

}