diff -r f345bda72bc4 -r 43e37759235e Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/msgqdelete_8c_source.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/msgqdelete_8c_source.html Tue Mar 30 16:16:55 2010 +0100 @@ -0,0 +1,56 @@ + + + + +TB9.2 Example Applications: examples/PIPS/opencmessagequeuelibraryex/engine/src/msgqdelete.c Source File + + + + + +

examples/PIPS/opencmessagequeuelibraryex/engine/src/msgqdelete.c

00001 
+00010 #include <errno.h>
+00011 #include <sys/msg.h>
+00012 #include <sys/sem.h>
+00013 #include "MsgQInternal.h"
+00014 
+00015 
+00016 /*******************************************************************************
+00017 * MsgQDelete (qName, err)
+00018 * Description: Function for deleting a message queue
+00019 ********************************************************************************/
+00020 
+00021 EXPORT_C int MsgQDelete(ULONG qName, int* err)
+00022 {
+00023         MSGQ_INFO*               pMsgQInfo;
+00024         int              hashRmErr;
+00025 
+00026         if ((pMsgQInfo = MsgQTableLookup(qName)) != NULL) {
+00027                 if (semctl(pMsgQInfo->semId,0,IPC_RMID,0) == 0) {
+00028                         if (msgctl(pMsgQInfo->qId,IPC_RMID,0) == 0) {
+00029                                 if (RemoveFromMsqQTable(pMsgQInfo->qName, &hashRmErr) == OK) {
+00030                                         DeleteFromMsgQTable(qName);
+00031                                         *err = OK;
+00032                                         return (OK);
+00033                                 }
+00034                                 else
+00035                                         *err = hashRmErr;
+00036                         }
+00037                         else 
+00038                                 *err = errno;
+00039                 }
+00040                 else
+00041                         *err = errno;
+00042         }
+00043         else
+00044                 *err = KMsgQLibQIdErr;
+00045 
+00046         return(ERROR);
+00047 }
+00048 
+
+
Generated by  + +doxygen 1.6.2
+ +