You Are Here:

Community: Developer Discussion Boards

#1 Old memory full problem - 2004-10-18, 11:57

Join Date: Feb 2004
Posts: 130
Rx-lee
Offline
Regular Contributor
hi there,

i have a problem in sending a file over BT which i code in my apps. for information i use nokia 3660.

when i send the file which size is 987KB, it goes OK,
but i goes fail when the size of the file is 1.207MB. (both file are in drive E)

what memory did the phone use?

i have check it by using FExplorer and here is the information
C<flash> 1.743MB free
D<ram> 440.5KB free
E<disk> 8.816MB free
Z<rom> 0 free

my questions are
1. how to send a file which size is big enough? can i partial it? (below i post some of the code)
2. how to capture when an error of memory full is showed?
(the error pretty much looks like this
MyApp: memory full. close some applications and try again.)


my code:

RFs fs;
RFile file;
fs.Connect();

file.Open(fs, aFileName, EFileRead);
// Returns code checking removed to brevity

TInt size;
TUint8 *filedata;

file.Size(size);
filedata = new TUint8[size];

// read data
TPtr8 ptr( filedata, size, size);
file.Read(ptr);

file.Close();
fs.Close();

// construct a CBufFlat and then an OBEX bufObject from it
iBufFlat = CBufFlat::NewL(size);
iBufFlat->SetReserveL(size);
iBufFlat->InsertL(0, filedata, size);

iCurrObject = CObexBufObject::NewL(iBufFlat);
delete filedata;

// Set the filename in the OBEX object
TParse f;
f.Set(aFileName,NULL,NULL);
TBuf<256> name;
name.Copy(f.NameAndExt());
iCurrObject->SetNameL(name);

iClient->Put(*iCurrObject, iStatus);
SetActive();



thanks in advance,

Rx-lee
Last edited by Rx-lee : 2004-10-18 at 12:00.
Reply With Quote

#2 Old 2004-12-23, 12:34

Join Date: Feb 2004
Posts: 14
Krank
Offline
Registered User
How about...

....
iCurrObject = CObexFileObject::NewL(aFilename);
iCurrObject->InitFromFileL(aFilename);
iClient->Put(*iCurrObject, iStatus);
.....
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia