WEB开发网
开发学院手机开发Symbian 开发 Symbian进程间通信 消息队列 阅读

Symbian进程间通信 消息队列

 2010-07-21 04:17:00 来源:WEB开发网   
核心提示:in the queue._LIT(KGlobalQName, "GlobalMsgQ");RMsgQueue msgqueue;TInt ret = msgqueue.OpenGlobal(KGlobalQName);if (ret == KErrNone){//Using Receive(),
in the queue.

_LIT(KGlobalQName, "GlobalMsgQ");

RMsgQueue msgqueue;

TInt ret = msgqueue.OpenGlobal(KGlobalQName);

if (ret == KErrNone)

{

//Using Receive(), returns "KErrUnderflow" if queue is empty

TInt msgfrmq;

ret = msgqueue.Receive(&msgfrmq);

//Using ReceiveBlocking()

msgqueue.ReceiveBlocking(&msgfrmq);

}

Other Queue Properties

Other member functions inherited from RHandleBase are as follows:

* CancelDataAvailable()

Cancels an outstanding data available notification request.

* CancelSpaceAvailable()

Cancels an outstanding space available notification request.

* KMaxLength

Gets the size of message slots in the queue.

* MessageSize()

Gets the size of message slots in the queue.

* NotifyDataAvailable()

Requests notification when there is at least one message in the queue. A thread can have only one data available notification request outstanding on this message queue. If a second request is made before the first request completes, then the calling thread is panicked.

* NotifySpaceAvailable()

Requests notification when space becomes available in the queue. This is an asynchronous request that completes when there is at least one 'slot'available in the queue.

* Open()

Opens a global message queue using a handle passed in a server message.

* OpenGlobal()

Opens a global message queue using the name of the message queue.

上一页  1 2 3 

Tags:Symbian 进程 通信

编辑录入:coldstar [复制链接] [打 印]
赞助商链接