Hi,

I have this code to copy text from a´regular listbox to clipboard:

RFs theFs;
User::LeaveIfError(theFs.Connect());

CClipboard* cb = CClipboard::NewForWritingLC(theFs);

RStoreWriteStream stream;
TStreamId stid = stream.CreateLC(cb->Store());

stream << iContainer->GetListboxModel()->ItemText( iContainer->GetIndexInListBox() );
stream.CommitL();
(cb->StreamDictionary()).AssignL( KClipboardUidTypePlainText /*KUidMobileSearch*/,stid);
CleanupStack::PopAndDestroy(); // stream
cb->CommitL();
CleanupStack::PopAndDestroy(); // cb

theFs.Close();

When I then switch to another application to paste the text, I get a System error 25. What I am doing wrong, whats the correct way to copy a string/text/descriptor to the clipboard?

Best regards
lkz633