Add SDP service record
| Tue, 2005-04-19 04:44 | |
|
Hi all,
I want to add a my own SPP to the SDP record, but I don't know why it is not success. I have read through some and the UIQ documentation, but still can't find the solution. Could anyone tell me what I have done wrong? Following is my code, // 1. Create and open session to the database //RSdp sdp; User::LeaveIfError(sdp.Connect()); // 2. Create and open a subsession //RSdpDatabase sdpSubSession; User::LeaveIfError(sdpSubSession.Open(sdp)); // Assumes sdpSession is an open session to the database // 1. Create blank record handle recordHandle = 0; // 2. Create the service class UUIDs TUUID uuid(0x1101); // 3. Enter record into the database sdpSubSession.CreateServiceRecordL(uuid, recordHandle); // Assumes sdpSubSession is an open subsession to the database, // and recordHandle is the service record _LIT8(KProvName,"Vincent SPP."); CSdpAttrValueString* attrVal = CSdpAttrValueString::NewStringL(KProvName); CleanupStack::PushL(attrVal); sdpSubSession.UpdateAttributeL(recordHandle, 0x0102, *attrVal); CleanupStack::PopAndDestroy(); Thank you very much for any help! Thanks, Vincent |
|





