×
Namespaces

Variants
Actions

Open file with its corresponding handler

From Nokia Developer Wiki
Jump to: navigation, search
Article Metadata
Article
Created: giridharn (17 May 2007)
Last edited: hamishwillee (25 Jul 2012)
Reviewer Approved    Thumbs up icon sm.jpg

We can open a file with its corresponding handlers this way:

TDataType dataType;
 
// You can set this dataType to NULL ,to make framework select the
// corresponding handler for this file,depending on its MIME type.
CDocumentHandler* docHandler = CDocumentHandler::NewLC(iEikonEnv->Process());
 
// Here fileName can be of any file types, say .txt, .jpg etc., and not a
// user defined file types.
TFileName fileName;
fileName.Copy(_L("c:\\nokia\\images\\abc.jpg"));
 
docHandler->OpenFileL(fileName, dataType);
CleanupStack::PopAndDestroy(docHandler);

This page was last modified on 25 July 2012, at 09:18.
38 page views in the last 30 days.
×