<< Click to Display Table of Contents >>

 

zetafax_logo

ZfxGetMsgInfo

 


 

 

Get information about single message.

 

Syntax

 

ZFERR FAR ZfxGetMsgInfo( ZFSESSIONHANDLE hSession, ZFMSGDIR MsgDir, char FAR  *lpszBody, ZFMSGINFO FAR *lpMsgInfo)

 

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

Message body name - NULL to delete all messages for this user lpMsgInfoAddress of a single ZFMSGINFO structure, which is filled with  the details of the message (status 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 ZfxGetMsgList function should be used instead, as this is more efficient than several calls to this routine.  

 

NOTE - this function is supplied for compatibility with version 5 of the Zetafax API  only. Version 6 API applications should use ZfxGetMsgInfoEx .

 

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>

...

ZFMSGINFO MsgInfo;

if (ZfxGetMsgInfo(hSession, ZFDIR_OUT, "~XSND000",  &MsgInfo) == 0

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

{

 /*  ok to delete message */

}

 

Related topics

Alphabetical reference

Function error returns and reference