Last modified: July 23, 2011
Applies to: Outlook
Notifies the MAPI spooler of a change in status or a request for service.
The IMAPISupport::SpoolerNotify method is implemented for message store and transport provider support objects. These providers call SpoolerNotify to notify the MAPI spooler of a change in status or a request for service. SpoolerNotify is called primarily by transport providers and may be called at any time during the session.
If you have changed your transport provider configuration, call SpoolerNotify and set ulFlags to NOTIFY_CONFIG_CHANGED. SpoolerNotify responds by calling the IXPLogon::AddressTypes method to query for a change in supported address types.
If you need a critical section to ensure uninterrupted processing, call SpoolerNotify with ulFlags set to NOTIFY_CRITSEC. Setting this flag informs the MAPI spooler that it should not call the IXPLogon::Idle and IXPLogon::Poll methods. While you have a critical section open, return MAPI_E_BUSY whenever the IMAPIStatus::ValidateState method is called. When you are finished with the critical section, make another call to SpoolerNotify with ulFlags set to NOTIFY_NONCRIT.
For example, if your remote transport provider is in the process of uploading messages, you might need to allow a user to enter a telephone number to establish the remote connection. Before you loop through the dialog box procedure, you should declare a critical section. When the user closes the dialog box, terminating the dialog box procedure, you should release the critical section.
When you set ulFlags to NOTIFY_CRITICAL_ERROR, the MAPI spooler makes no further calls to the provider except to release it. If you call SpoolerNotify with NOTIFY_CRITICAL_ERROR set from the IXPLogon::StartMessage or IXPLogon::SubmitMessage methods, return with an appropriate error value from the StartMessage or SubmitMessage call immediately after the SpoolerNotify call.
If your transport provider recovered from a condition that previously caused it to fail, call SpoolerNotify with ulFlags set to NOTIFY_READYTOSEND. This flag indicates that the provider is again ready to handle messages.
Call SpoolerNotify, passing the NOTIFY_READYTOSEND flag in ulFlags, before you make your first call to IMAPISupport::PrepareSubmit in IMessage::SubmitMessage. This call to SpoolerNotify needs to be made only once per session.
If your message store provider is tightly coupled with a transport provider and you call SpoolerNotify with ulFlags set to NOTIFY_NEWMAIL_RECEIVED, the MAPI spooler opens the new message and begins processing the new message hook function. When processing is complete, the MAPI spooler calls the IMsgStore::NotifyNewMail method to inform you of your own new message.
For more information about calling SpoolerNotify, see any of the following topics: