<< Click to Display Table of Contents >>

 

zetafax_logo

ZfxGetMsgInfoEx

 


 

Get information about single message.

 

Syntax

 

ZFERR FAR ZfxGetMsgInfoEx( ZFSESSIONHANDLE hSession, ZFMSGDIR MsgDir, char FAR  *lpszBody, short MsgInfoExSize, ZFMSGINFOEX FAR *lpMsgInfoEx)

 

Parameters

 

Parameter

Description

hSession

API session handle, as returned by ZfxAPIInit  call MsgDirMessage type - ZFDIR_OUT for sent messages, or ZFDIR_IN for  received messages

lpszBody

Body of message file to retrieve MsgInfoExSizeSize of the ZFMSGINFOEX structure. Should be set to  sizeof(ZFMSGINFOEX)

lpMsgInfoEx

Address of a single ZFMSGINFOEX structure, which is filled with the details of  the message (status, comment, subject etc) on return.

 

Description

 

This routine gets information about a message in the user's OUT or IN  directories. Note that if the status of several messages is required the  ZfxGetMsgListEx function should be used instead, as this is more efficient than  several calls to this routine.

 

Return value

 

The routine returns 0 if successful, otherwise one of the following:  

ZFERR_NOT_INITIALISED

ZFERR_INVALID_PARAMETERS

ZFERR_INFO_OPEN_FILE_ERROR

ZFERR_INFO_FILE_ERROR

ZFERR_INFO_FILE_INVALID

ZFERR_UNKNOWN_MESSAGE

 

Example

 

#include  <stdio.h>

#include <zfapi.h>

...

ZFMSGINFOEX MsgInfoEx;

if (ZfxGetMsgInfoEx(hSession, ZFDIR_OUT, "~XSND000", sizeof(ZFMSGINFOEX), &MsgInfoEx) == 0

&& (MsgInfoEx.Status == ZFMSG_OK || MsgInfoEx.Status == ZFMSG_FAILED))

{

       /* ok to delete message */

}

 

Related topics

Alphabetical reference

Function error returns and reference