RMessage2 message; message.Create(0); //create an empty message message.Write(0, &myData, sizeof(TMyData)); //fill the message with data message.Complete(KErrNone); //send the message to the destination process
RMessage2 message; iServerMessage = message; TPtr8 dataBuf(iMessage.Ptr0(), iMessage.GetDesLengthL(0)); //get the data in the message TMyData* myData = reinterpret_castIn these examples, RMessage2 is used to create, send, and receive messages between two processes. It is a crucial component of the Symbian OS Communication Framework and is used extensively in inter-process communication in the Symbian OS.(dataBuf.Ptr()); //cast the data to the correct type