Network and RPC Error Codes for Directory Operations

The following table lists error codes returned because of network or RPC-related errors when using MAPI to access the directory. These types of errors are usually encountered when the server is low on resources such as memory.

RPC-Related MAPI Error Codes

RPC Error MAPI Error Returned
RPC_S_OUT_OF_MEMORY MAPI_E_NOT_ENOUGH_MEMORY
RPC_S_OUT_OF_RESOURCES MAPI_E_NOT_ENOUGH_RESOURCES
RPC_S_SERVER_TOO_BUSY MAPI_E_BUSY
RPC_S_CALL_CANCELLED MAPI_E_USER_CANCEL
Other errors MAPI_E_NETWORK_ERROR

Most calls to MAPI methods can return these types of errors. You can handle the errors by placing the individual MAPI call into a retry loop that repeats the function call until the error is no longer encountered. You can also place all the code for working with a given message (including individual MAPI calls) into a retry loop. This process differs from that in use by the information store. See Network and RPC Error Codes for Information Store Operations.

In a call to the IAddrBook::PrepareRecips function, several address book service providers may be used. If one of the RPC errors listed in the preceding table occurs, this call may fail for some of the service providers — but not necessarily for all. MAPI discards errors from each service provider, which means that the expected list of properties in each ADRENTRY structure may not be present, or may be incomplete.

WaitForCompletion Not Implemented

The Microsoft Exchange Server address book provider does not implement the MAPI method IMAPITable::WaitForCompletion. This means that your applications should not call this method, nor should they call the methods IMAPITable::SortTable or IMAPITable::Restrict with the flag TBL_ASYNC set.