Platform SDK: MAPI

ScMAPIXFromCMC

The ScMAPIXFromCMC function enables a client application to pass in a CMC session handle and get back a pointer to a MAPI session object.

Quick Info

Header file: MAPI.H
Implemented by: MAPI
Called by: Client applications

SCODE ScMAPIXFromCMC(
  CMC_SESSION cmcsession,             
  ULONG ulFlags,                      
  LPCIID lpInterface,                 
  LPMAPISESSION FAR * lppMAPISession  
);
 

Parameters

cmcsession
[in] Pointer to the CMC session in use.
ulFlags
Reserved; must be zero.
lpInterface
[in] The MAPI interface being returned.
lppMAPISession
[out] Pointer to the pointer to the MAPI session in use.

Return Values

S_OK
The call succeeded and converted the CMC session to a MAPI session.

Remarks

There are no inverse functions for either the ScMAPIXFromCMC or ScMAPIXFromSMAPI function, that is, a client cannot convert to a CMC session or Simple MAPI session from a MAPI session. Also, a client cannot convert from a CMC session to a Simple MAPI session.

For more information on this function, see Using Multiple Client Interfaces and Explicit Logon with Simple MAPI.