Join Now
Quality Rating:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)
Expertise Level:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)

This page was last modified 10:14, 26 November 2007.

How to check if device has memory card or not

From Forum Nokia Wiki

The following simple code tells if a device has a memory card or not.

TBool CMyContainer::HasMMC()
{
	TBool iHasMMC;
	iHasMMC=EFalse;
	
	RFs fileSession;
	fileSession.Connect();
 
	TDriveInfo i;
	if (fileSession.Drive(i, EDriveE)==KErrNone) {
		if (i.iType!=EMediaNotPresent &&
			i.iType!=EMediaUnknown &&
			i.iType!=EMediaCdRom &&
			i.iType!=EMediaRom) {
			// memory card
			iHasMMC=ETrue;
		}
	}
	fileSession.Close();
	return iHasMMC;
}

Thanks to Mika Raento for this code.

Related Discussions
Thread Thread Starter Forum Replies Last Post
phone memory and memory card sis1987 Mobile Java General 1 2008-06-12 16:57
6682 Gallery app crashes on startup mmoorr General Discussion 1 2006-09-13 16:24
Saving games and transfer on a new Memory Card? karokorn General Discussion 2 2007-12-01 16:07
Midlet refuse to run on 5700 after a few days jasonchtai Mobile Java General 23 2008-04-09 16:34
Can i recover the Deleted number from phone memory neeraj_ji PC Suite API and PC Connectivity SDK 7 2008-01-31 22:11
 
Powered by MediaWiki
     
     RDF Facets:
     
     
     qfnZtopicQUqfnTopicZhardwareQ
     qfnZtopicQUqfnTopicZmediaQ
     qfnZtypeQUqfnTypeZCommunityContentQ
     qfnZtypeQUqfnTypeZWebpageQ
     qfnZtypeQUqfnTypeZWikiContentQ
     qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX