Nokia N97 SDK
Example Applications Guide

msgqmaxcheck.c

00001 /** 
00002  *  @file MsgQMaxCheck.cpp
00003  *  Description: Source file for MsgQLib's MsgQMaxCheck API
00004  *  Copyright (c) 2007 Nokia Corporation.
00005  *  This material, including documentation and any related
00006  *  computer programs, is protected by copyright controlled by
00007  *  Nokia Corporation.
00008 ********************************************************************************************/
00009 
00010 #include <_ansi.h>
00011 #include "MsgQInternal.h"
00012 
00013 
00014 /**************************************************************************
00015 *  MsgQMaxCheck
00016 *  Function: This function checks the maximum number of messages in a
00017 ***************************************************************************/
00018 
00019 EXPORT_C int MsgQMaxCheck(ULONG qName, int* err) {
00020         MSGQ_INFO* pMsgQInfo = NULL;
00021 
00022         if ((pMsgQInfo = MsgQTableLookup(qName)) != NULL) {
00023                 *err = OK;
00024                 return (pMsgQInfo->maxNumMsgs);
00025         }
00026         else
00027                 *err = KMsgQLibQIdErr;
00028 
00029         return(ERROR);
00030 }
00031 

© Nokia 2009

Back to top