branch | RCL_3 |
changeset 24 | 6c1dfe4da5dd |
parent 11 | 780c925249c1 |
child 25 | 63223d4fd956 |
23:e42293e811d8 | 24:6c1dfe4da5dd |
---|---|
124 User::LeaveIfError( sampleFile.Size( size ) ); |
124 User::LeaveIfError( sampleFile.Size( size ) ); |
125 PRINT1( _L( "MM MTP <> EMTPObjectPropCodeRepresentativeSampleData sampleFile.Size() size=%d" ), size ); |
125 PRINT1( _L( "MM MTP <> EMTPObjectPropCodeRepresentativeSampleData sampleFile.Size() size=%d" ), size ); |
126 |
126 |
127 if( size > 0 ) |
127 if( size > 0 ) |
128 { |
128 { |
129 HBufC8* sampleData = HBufC8::NewLC( size * sizeof(TUint8) ); // + sampleData |
129 HBufC8* sampleData = HBufC8::NewLC( size ); // + sampleData |
130 TPtr8 samplePtr = sampleData->Des(); |
130 TPtr8 samplePtr = sampleData->Des(); |
131 User::LeaveIfError( sampleFile.Read( samplePtr ) ); |
131 User::LeaveIfError( sampleFile.Read( samplePtr ) ); |
132 iMTPTypeArray->SetByDesL( samplePtr ); |
132 iMTPTypeArray->SetByDesL( samplePtr ); |
133 CleanupStack::PopAndDestroy( sampleData ); // - sampleData |
133 CleanupStack::PopAndDestroy( sampleData ); // - sampleData |
134 } |
134 } |