diff -r 51a74ef9ed63 -r ae94777fff8f Symbian3/SDK/Source/GUID-D69DD425-5F93-4238-A7E9-915F24A9C9CA.dita --- a/Symbian3/SDK/Source/GUID-D69DD425-5F93-4238-A7E9-915F24A9C9CA.dita Wed Mar 31 11:11:55 2010 +0100 +++ b/Symbian3/SDK/Source/GUID-D69DD425-5F93-4238-A7E9-915F24A9C9CA.dita Fri Jun 11 12:39:03 2010 +0100 @@ -1,56 +1,56 @@ - - - - - -Open -C MessageQueue Library Example -

The Message Queue Library example demonstrates how to use Open C APIs for -developing applications that use Open C standard libraries on Symbian platform. -This example uses the APIs of the message queue library to create/close message -queues and send/receive messages and also get information on created message -queues.

-
Download

Click -on the following link to download the example: opencmessagequeuelibraryex.zip

Click: browse to view the example code.

-
Design and -Implementation

The following sections provide information about -the implementation of the example.

Description

OpenCMessageQueueClientEx -is a C Application that uses the Message Queue library. This application -uses main() as the entry point for the application. This is a simple console -based application. The application uses Message Queue library (OpenCMessageQueueLibrary.dll) -APIs. The Main thread of the application creates two message queues, and -two threads. Thread one will send message to message queue 1 and waits for -messages from message queue 2. Then thread one will send message to message -queue 2 and waits for messages from message queue 1. If a user tries to create -a message queue using OpenCMessageQueueLibrary.dll with the already -existing name, it will just return the existing message queue Id. The application -has its own icon and can be launched from the UI both in the emulator and -in the device.

Capabilities

The program capabilities are -defined in: MessageQueueLibrary.mmp (DLL - library): CAPABILITY -ALL -TCB MessageQueueClient.mmp(EXE - application): CAPABILITY -NONE.

Module hierarchy

This application has 2 modules -as below:

Message Queue Library (DLL) that exports set of apis for the -user.

OpenCMessageQueueLibraryEx\engine : The application (EXE) that -demonstrates the usage of Open C APIs and also those APIs exported by Message -Queue Library.

(OpenCMessageQueueLibraryEx\exe) : This example will -create a DLL which exports set of generic APIs with which the user can do -message queue related operations. To give a rough idea on how to use these -apis, an EXE is provided that creates threads and does send/receive on message -queues using those exported apis.

APIs used

msgget

msgctl -

msgrcv

msgsnd

semget

semctl

semop

-
Building and -Using To build the Message Queue Library example application, go to -the OpenCMessageQueueLibraryEx\group directory and build -the application. The Message Queue Library application consists of two modules, -which should be built in the following order: engine - which builds the -generic message queue library exe - which builds an EXE that demonstrates -the usage of this library The definition for the whole application can be -found in thebld.infin the group subdirectory of the applications -main directory.
+ + + + + +Open +C MessageQueue Library Example +

The Message Queue Library example demonstrates how to use Open C APIs for +developing applications that use Open C standard libraries on Symbian platform. +This example uses the APIs of the message queue library to create/close message +queues and send/receive messages and also get information on created message +queues.

+
Download

Click +on the following link to download the example: opencmessagequeuelibraryex.zip

Click: browse to view the example code.

+
Design and +Implementation

The following sections provide information about +the implementation of the example.

Description

OpenCMessageQueueClientEx +is a C Application that uses the Message Queue library. This application +uses main() as the entry point for the application. This is a simple console +based application. The application uses Message Queue library (OpenCMessageQueueLibrary.dll) +APIs. The Main thread of the application creates two message queues, and +two threads. Thread one will send message to message queue 1 and waits for +messages from message queue 2. Then thread one will send message to message +queue 2 and waits for messages from message queue 1. If a user tries to create +a message queue using OpenCMessageQueueLibrary.dll with the already +existing name, it will just return the existing message queue Id. The application +has its own icon and can be launched from the UI both in the emulator and +in the device.

Capabilities

The program capabilities are +defined in: MessageQueueLibrary.mmp (DLL - library): CAPABILITY +ALL -TCB MessageQueueClient.mmp(EXE - application): CAPABILITY +NONE.

Module hierarchy

This application has 2 modules +as below:

Message Queue Library (DLL) that exports set of apis for the +user.

OpenCMessageQueueLibraryEx\engine : The application (EXE) that +demonstrates the usage of Open C APIs and also those APIs exported by Message +Queue Library.

(OpenCMessageQueueLibraryEx\exe) : This example will +create a DLL which exports set of generic APIs with which the user can do +message queue related operations. To give a rough idea on how to use these +apis, an EXE is provided that creates threads and does send/receive on message +queues using those exported apis.

APIs used

msgget

msgctl +

msgrcv

msgsnd

semget

semctl

semop

+
Building and +Using To build the Message Queue Library example application, go to +the OpenCMessageQueueLibraryEx\group directory and build +the application. The Message Queue Library application consists of two modules, +which should be built in the following order: engine - which builds the +generic message queue library exe - which builds an EXE that demonstrates +the usage of this library The definition for the whole application can be +found in thebld.infin the group subdirectory of the applications +main directory.
\ No newline at end of file