Home COM GDI+ WebBrowser Data Access

IMAPISession Interface

 

IID_IMAPISession

{00020300-0000-0000-C000-000000000046}

 

 

The IMAPISession interface is used to manage objects associated with a MAPI logon session.

 

 

Methods in VTable order

IUnknown Methods

Description

QueryInterface

Returns pointers to supported interfaces.

AddRef

Increments reference count.

Release

Decrements reference count.

IMAPISession Methods

Description

GetLastError

Returns a MAPIERROR structure containing information about the previous session error.

GetMsgStoresTable

Provides access to the message store table a table with information about all of the message stores in the session profile.

OpenMsgStore

Opens a message store and returns an IMsgStore pointer for further access.

OpenAddressBook

Opens the MAPI integrated address book and returns an IAddrBook pointer for further access.

OpenProfileSection

Opens a section of the current profile and returns an IProfSect pointer for further access.

GetStatusTable

Provides access to the status table a table with information about all of the MAPI resources in the session.

OpenEntry

Opens an object and returns an interface pointer for further access.

CompareEntryIDs

Compares two entry identifiers to determine if they refer to the same object.

Advise

Registers to receive notification of specified events affecting the session.

Unadvise

Cancels the sending of notifications previously set up with a call to the IMAPISession::Advise method.

MessageOptions

Displays a dialog box showing option properties for a particular address type and message.

QueryDefaultMessageOpt

Retrieves the message option properties for a particular address type.

EnumAdrTypes

Returns the address types that can be handled by all of the transport providers in the session.

QueryIdentity

Returns the entry identifier of the object that provides the primary identity for the session.

Logoff

Ends a MAPI session.

SetDefaultStore

Establishes a message store as the default message store for the session.

AdminServices

Returns an IMsgServiceAdmin pointer for making changes to message services.

ShowForm

Displays a form.

PrepareForm

Creates a numeric token to be used by the IMAPISession::ShowForm method to access a message.

 

GetLastError

 

FUNCTION IMAPISession_GetLastError" ( _
  BYVAL pIMAPISession AS DWORD PTR _
, BYVAL hResultCode AS LONG _
, BYVAL ulFlags AS DWORD _
, BYREF lppMAPIError AS DWORD _
  ) AS LONG

  LOCAL HRESULT AS LONG
  CALL DWORD @@pIMAPISession[3] USING IMAPISession_GetLastError (pIMAPISession, hResultCode, ulFlags, lppMAPIError) TO HRESULT
  FUNCTION = HRESULT

END FUNCTION

 

 

GetMsgStoresTable

 

FUNCTION IMAPISession_GetMsgStoresTable ( _
  BYVAL pIMAPISession AS DWORD PTR _
, BYVAL ulFlags AS DWORD _
, BYREF lppTable AS DWORD _
  ) AS LONG

  LOCAL HRESULT AS LONG
  CALL DWORD @@pIMAPISession[4] USING IMAPISession_GetMsgStoresTable (pIMAPISession, ulFlags, lppTable) TO HRESULT
  FUNCTION = HRESULT

END FUNCTION

 

 

OpenMsgStore

 

FUNCTION IMAPISession_OpenMsgStore ( _
  BYVAL pIMAPISession AS DWORD PTR _
, BYVAL ulUIParam AS DWORD _
, BYVAL cbEntryID AS DWORD _
, BYVAL lpEntryID AS ENTRYID PTR _
, BYREF lpInterface AS GUID _
, BYVAL ulFlags AS DWORD _
, BYREF lppMDB AS DWORD _
  ) AS LONG

  LOCAL HRESULT AS LONG
  CALL DWORD @@pIMAPISession[5] USING IMAPISession_OpenMsgStore (pIMAPISession, ulUIParam, cbEntryID, lpEntryID, lpInterface, ulFlags, lppMDB) TO HRESULT
  FUNCTION = HRESULT

END FUNCTION

 

 

OpenAddressBook

 

FUNCTION IMAPISession_OpenAddressBook ( _
  BYVAL pIMAPISession AS DWORD PTR _
, BYVAL ulUIParam AS DWORD _
, BYREF lpInterface AS GUID _
, BYVAL ulFlags AS DWORD _
, BYREF lppAdrBook AS DWORD _
  ) AS LONG

  LOCAL HRESULT AS LONG
  CALL DWORD @@pIMAPISession[6] USING IMAPISession_OpenAddressBook (pIMAPISession, ulUIParam, lpInterface, ulFlags, lppAdrBook) TO HRESULT
  FUNCTION = HRESULT

END FUNCTION

 

 

OpenProfileSection

 

FUNCTION IMAPISession_OpenProfileSection ( _
  BYVAL pIMAPISession AS DWORD PTR _
, BYREF lpUID AS MAPIUID _
, BYREF lpInterface AS GUID _
, BYVAL ulFlags AS DWORD _
, BYREF lppProfSect AS DWORD _
  ) AS LONG

  LOCAL HRESULT AS LONG
  CALL DWORD @@pIMAPISession[7] USING IMAPISession_OpenProfileSection (pIMAPISession, lpUID, lpInterface, ulFlags, lppProfSect) TO HRESULT
  FUNCTION = HRESULT

END FUNCTION

 

 

GetStatusTable

 

FUNCTION IMAPISession_GetStatusTable ( _
  BYVAL pIMAPISession AS DWORD PTR _
, BYVAL ulFlags AS DWORD _
, BYREF lppTable AS DWORD _
  ) AS LONG

  LOCAL HRESULT AS LONG
  CALL DWORD @@pIMAPISession[8] USING IMAPISession_GetStatusTable (pIMAPISession, ulFlags, lppTable) TO HRESULT
  FUNCTION = HRESULT

END FUNCTION

 

 

OpenEntry

 

FUNCTION IMAPISession_OpenEntry ( _
  BYVAL pIMAPISession AS DWORD PTR _
, BYVAL cbEntryID AS DWORD _
, BYVAL lpEntryID AS ENTRYID PTR _
, BYREF lpInterface AS GUID _
, BYVAL ulFlags AS DWORD _
, BYREF lpulObjType AS DWORD _
, BYREF lppUnk AS DWORD _
  ) AS LONG

  LOCAL HRESULT AS LONG
  CALL DWORD @@pIMAPISession[9] USING IMAPISession_OpenEntry (pIMAPISession, cbEntryID, lpEntryID, lpInterface, ulFlags, lpulObjType, lppUnk) TO HRESULT
  FUNCTION = HRESULT

END FUNCTION

 

 

CompareEntryIDs

 

FUNCTION IMAPISession_CompareEntryIDs ( _
  BYVAL pIMAPISession AS DWORD PTR _
, BYVAL cbEntryID1 AS DWORD _
, BYVAL lpEntryID1 AS ENTRYID PTR _
, BYVAL cbEntryID2 AS DWORD _
, BYVAL lpEntryID2 AS ENTRYID PTR _
, BYVAL ulFlags AS DWORD _
, BYREF lpulResult AS DWORD _
  ) AS LONG

  LOCAL HRESULT AS LONG
  CALL DWORD @@pIMAPISession[10] USING IMAPISession_CompareEntryIDs (pIMAPISession, cbEntryID1, lpEntryID1, cbEntryID2, lpEntryID2, ulFlags, lpulResult) TO HRESULT
  FUNCTION = HRESULT

END FUNCTION

 

 

Advise

 

FUNCTION IMAPISession_Advise ( _
  BYVAL pIMAPISession AS DWORD PTR _
, BYVAL cbEntryID AS DWORD _
, BYVAL lpEntryID AS ENTRYID PTR _
, BYVAL ulEventMask AS DWORD _
, BYVAL lpAdviseSink AS DWORD _
, BYREF lpulConnection AS DWORD _
  ) AS LONG

  LOCAL HRESULT AS LONG
  CALL DWORD @@pIMAPISession[11] USING IMAPISession_Advise (pIMAPISession, cbEntryID, lpEntryID, ulEventMask, lpAdviseSink, lpulConnection) TO HRESULT
  FUNCTION = HRESULT

END FUNCTION

 

 

Unadvise

 

FUNCTION IMAPISession_Unadvise ( _
  BYVAL pIMAPISession AS DWORD PTR _
, BYVAL ulConnection AS DWORD _
  ) AS LONG

  LOCAL HRESULT AS LONG
  CALL DWORD @@pIMAPISession[12] USING IMAPISession_Unadvise (pIMAPISession, ulConnection) TO HRESULT
  FUNCTION = HRESULT

END FUNCTION

 

 

MessageOptions

 

FUNCTION IMAPISession_MessageOptions ( _
  BYVAL pIMAPISession AS DWORD PTR _
, BYVAL ulUIParam AS DWORD _
, BYVAL ulFlags AS DWORD _
, BYREF lpszAdrType AS ASCIIZ _
, BYVAL lpMessage AS DWORD _
  ) AS LONG

  LOCAL HRESULT AS LONG
  CALL DWORD @@pIMAPISession[13] USING IMAPISession_MessageOptions (pIMAPISession, ulUIParam, ulFlags, lpszAdrType, lpMessage) TO HRESULT
  FUNCTION = HRESULT

END FUNCTION

 

 

QueryDefaultMessageOpt

 

FUNCTION IMAPISession_QueryDefaultMessageOpt ( _
  BYVAL pIMAPISession AS DWORD PTR _
, BYREF lpszAdrType AS ASCIIZ _
, BYVAL ulFlags AS DWORD _
, BYREF lpcValues AS DWORD _
, BYREF lppOptions AS DWORD _
  ) AS LONG

  LOCAL HRESULT AS LONG
  CALL DWORD @@pIMAPISession[14] USING IMAPISession_QueryDefaultMessageOpt (pIMAPISession, lpszAdrType, ulFlags, lpcValues, lppOptions) TO HRESULT
  FUNCTION = HRESULT

END FUNCTION

 

 

EnumAdrTypes

 

FUNCTION IMAPISession_EnumAdrTypes ( _
  BYVAL pIMAPISession AS DWORD PTR _
, BYVAL ulFlags AS DWORD _
, BYREF lpcAdrTypes AS DWORD _
, BYREF lpppszAdrTypes AS DWORD _
  ) AS LONG

  LOCAL HRESULT AS LONG
  CALL DWORD @@pIMAPISession[15] USING IMAPISession_EnumAdrTypes (pIMAPISession, ulFlags, lpcAdrTypes, lpppszAdrTypes) TO HRESULT
  FUNCTION = HRESULT

END FUNCTION

 

 

QueryIdentity

 

FUNCTION IMAPISession_QueryIdentity ( _
  BYVAL pIMAPISession AS DWORD PTR _
, BYREF lpcbEntryID AS DWORD _
, BYREF lppEntryID AS DWORD _
  ) AS LONG

  LOCAL HRESULT AS LONG
  CALL DWORD @@pIMAPISession[16] USING IMAPISession_QueryIdentity (pIMAPISession, lpcbEntryID, lppEntryID) TO HRESULT
  FUNCTION = HRESULT

END FUNCTION

 

 

Logoff

 

FUNCTION IMAPISession_Logoff ( _
  BYVAL pIMAPISession AS DWORD PTR _
, BYVAL ulUIParam AS DWORD _
, BYVAL ulFlags AS DWORD _
, BYVAL ulReserved AS DWORD _
  ) AS LONG

  LOCAL HRESULT AS LONG
  CALL DWORD @@pIMAPISession[17] USING IMAPISession_Logoff (pIMAPISession, ulUIParam, ulFlags, ulReserved) TO HRESULT
  FUNCTION = HRESULT

END FUNCTION

 

 

SetDefaultStore

 

FUNCTION IMAPISession_SetDefaultStore ( _
  BYVAL pIMAPISession AS DWORD PTR _
, BYVAL ulFlags AS DWORD _
, BYVAL cbEntryID AS DWORD _
, BYVAL lpEntryID AS ENTRYID PTR _
  ) AS LONG

  LOCAL HRESULT AS LONG
  CALL DWORD @@pIMAPISession[18] USING IMAPISession_SetDefaultStore (pIMAPISession, ulFlags, cbEntryID, lpEntryID) TO HRESULT
  FUNCTION = HRESULT

END FUNCTION

 

 

AdminServices

 

FUNCTION IMAPISession_AdminServices ( _
  BYVAL pIMAPISession AS DWORD PTR _
, BYVAL ulFlags AS DWORD _
, BYREF lppServiceAdmin AS DWORD _
  ) AS LONG

  LOCAL HRESULT AS LONG
  CALL DWORD @@pIMAPISession[19] USING IMAPISession_AdminServices (pIMAPISession, ulFlags, lppServiceAdmin) TO HRESULT
  FUNCTION = HRESULT

END FUNCTION

 

 

ShowForm

 

FUNCTION IMAPISession_ShowForm ( _
  BYVAL pIMAPISession AS DWORD PTR _
, BYVAL ulUIParam AS DWORD _
, BYVAL lpMsgStore AS DWORD _
, BYVAL lpParentFolder AS DWORD _
, BYREF lpInterface AS GUID _
, BYVAL ulMessageToken AS DWORD _
, BYVAL lpMessageSent AS DWORD _
, BYVAL ulFlags AS DWORD _
, BYVAL ulMessageStatus AS DWORD _
, BYVAL ulMessageFlags AS DWORD _
, BYVAL ulAccess AS DWORD _
, BYVAL lpszMessageClass AS DWORD _
  ) AS LONG

  LOCAL HRESULT AS LONG
  CALL DWORD @@pIMAPISession[20] USING IMAPISession_ShowForm (pIMAPISession, ulUIParam, lpMsgStore, lpParentFolder, lpInterface, ulMessageToken, lpMessageSent, ulFlags, ulMessageStatus, ulMessageFlags, ulAccess, lpszMessageClass) TO HRESULT
  FUNCTION = HRESULT

END FUNCTION

 

 

PrepareForm

 

FUNCTION IMAPISession_PrepareForm ( _
  BYVAL pIMAPISession AS DWORD PTR _
, BYREF lpInterface AS GUID _
, BYVAL lpMessage AS DWORD _
, BYREF lpulMessageToken AS DWORD _
  ) AS LONG

  LOCAL HRESULT AS LONG
  CALL DWORD @@pIMAPISession[21] USING IMAPISession_PrepareForm (pIMAPISession, lpInterface, lpMessage, lpulMessageToken) TO HRESULT
  FUNCTION = HRESULT

END FUNCTION

 

 

Page last updated on Monday, 03 April 2006 20:15:57 +0200