IExchangeManageStore::GetPublicFolderTable

The GetPublicFolderTable method obtains information about all of the public folders on a server.

HRESULT GetPublicFolderTable(
  LPTSTR lpszServerName,       
  LPMAPITABLE FAR * lppTable,  
  ULONG ulFlags                
);
 

Parameters

lpszServerName
Input parameter. Points to a string that contains the distinguished name (DN) of the server.
lppTable
Output parameter. Points to a MAPI IMAPITable interface containing the information about all of the public folders on the server specified in lpszServerName.
ulFlags
Input parameter. A defined value that specifies the folder type and whether the server name is Unicode:
MAPI_UNICODE
The server name is in Unicode format.
MDB_IPM
The public folders are interpersonal message (IPM) folders.
MDB_NON_IPM
The public folders are non-IPM folders.

Return Values

See Return Values.

In addition, GetPublicFolderTable can return one of the following values:

SUCCESS_SUCCESS
The method completed successfully.
MAPI_E_CALL_FAILED
An unknown error occurred.
MAPI_E_INVALID_PARAMETER
One of the parameters was not valid.
MAPI_E_LOGON_FAILED
The Microsoft Exchange Server information store is not running on the server.
MAPI_E_NETWORK_ERROR
Cannot connect to the server.
MAPI_E_NO_ACCESS
The user has no permissions on the public folder.
MAPI_E_NOT_ENOUGH_MEMORY
There wasn't enough memory to complete the operation.

Remarks

The following properties are returned for each public folder:

PR_ASSOC_CONTENT_COUNT
A MAPI property containing the total number of associated messages in the public folder.
PR_ASSOC_MESSAGE_SIZE
The size, in bytes, of all the associated messages in the public folder (reserved for internal use).
PR_ASSOC_MESSAGE_SIZE_EXTENDED
This property is reserved for internal use.
PR_ASSOC_MSG_W_ATTACH_COUNT
The total number of associated messages with attachments in the public folder (reserved for internal use).
PR_ATTACH_ON_ASSOC_MSG_COUNT
This property is reserved for internal use.
PR_ATTACH_ON_NORMAL_MSG_COUNT
The total count of attachments on all normal messages in a folder.
PR_CACHED_COLUMN_COUNT
The total number of cached columns on the public folder (reserved for internal use).
PR_CATEG_COUNT
The total number of categorizations on the public folder.
PR_CONTACT_COUNT
The number of contacts in a public folder.
PR_CONTENT_COUNT
A MAPI property that gives the number of messages in a folder, as computed by the message store.
PR_CREATION_TIME
A MAPI property containing the creation date and time for a message.
PR_DISPLAY_NAME
A MAPI property containing the name of the public folder as displayed.
PR_EMAIL_ADDRESS
A MAPI property containing the email address of the public folder.
PR_FOLDER_FLAGS
Various public folder information:
MDB_FOLDER_IPM
The public folder is an IPM folder.
MDB_FOLDER_SEARCH
The public folder is a search folder.
MDB_FOLDER_NORMAL
The public folder is a normal folder.
MDB_FOLDER_RULES
The public folder contains rules.
PR_FOLDER_PATHNAME
The pathname to the public folder.
PR_INSTANCE_KEY
A MAPI property containing a value that uniquely identifies a row in a table.
PR_LAST_ACCESS_TIME
The date that the replica of a public folder was accessed.
PR_LAST_MODIFICATION_TIME
A MAPI property containing the date and time the object or subobject was last modified.
PR_MESSAGE_SIZE
A MAPI property containing the size, in bytes, of all of messages in the public folder.
PR_MESSAGE_SIZE_EXTENDED
The sum (in bytes) of the sizes of all properties on a message object.
PR_NORMAL_MESSAGE_SIZE
The total size, in bytes, of all of the normal messages in the public folder.
PR_NORMAL_MESSAGE_SIZE_EXTENDED
The total size, in bytes, of all of the normal messages in the public folder. This is an 8-byte version of the PR_NORMAL_MESSAGE_SIZE property.
PR_NORMAL_MSG_W_ATTACH_COUNT
The total number of normal messages with attachments in the public folder.
PR_OWNER_COUNT
The PR_OWNER_COUNT property contains the number of owners of a public folder.
PR_RECIPIENT_ON_ASSOC_MSG_COUNT
The total number of recipients on the associated messages in the public folder.
PR_RECIPIENT_ON_NORMAL_MSG_COUNT
The total number of recipients on the normal messages in the public folder.
PR_RESTRICTION_COUNT
The total number of restrictions on the public folder.

See Also

IExchangeManageStore