6 36 2 C Example

LANSA Open Guide

6.36.2 C Example

BOOL fOK;

int  iSession;

int i;

int iMessageCount;

char strMessageBuf[MESSAGE_LENGTH + 1];

 

fOK = LceGetMessageCount(iSession, &iMessageCount);

if (fOK)

{

         for ( i = 1; i <= iMessageCount; i++)

         {

                  fOK = LceGetMessage(iSession, i, strMessageBuf,

                  sizeof(strMessageBuf));

                          /* Process the Message returned */

         }

}