HrStringToAction

The HrStringToAction function produces an ACTION structure from a string.

Quick Info

Header file: RULECLS.H
Library: RULECLS.LIB

HRESULT HrStringToAction(
  LPMAPISESSION lpSession,  
  LPMAPIFOLDER lpFolder,  
  LPSTR lpszString,       
  LPVOID lpObject,        
  LPACTION lpAction       
);
 

Parameters

lpSession
Input parameter. Points to a MAPI IMAPISession interface containing the MAPI session.
lpFolder
Input parameter. Points to a MAPI IMAPIFolder interface containing the folder. You must open this folder with MAPI_MODIFY access.
lpszString
Input parameter. Points to the string containing the action.
lpObject
Input parameter. Points to an existing buffer allocated by the MAPI MAPIAllocateBuffer function. You must release this buffer when you are finished with it with a call to the MAPI MAPIFreeBuffer function.
lpAction
Input/output parameter. Points to the ACTION structure that holds the action to which the string (lpszString) is converted.

Return Values

See Return Values.

Remarks

You must allocate the space for the lpAction parameter. The best method of allocating this space is to call the MAPI MAPIAllocateMore function with a reference to the parent object's ACTION structure.

For information about the IMAPIFolder and IMAPISession interfaces, and the MAPIAllocateBuffer, MAPIAllocateMore, and MAPIFreeBuffer functions, see the MAPI Programmer's Reference.

For more information on this function, see Creating a Rule.

See Also

HrActionToString