PC Review


Reply
Thread Tools Rate Thread

How to determine Available memory

 
 
Ole
Guest
Posts: n/a
 
      8th Nov 2007
How do I determine the available amount of memory in a Pocket PC (code
example)? I need to check if there is space enough for saving data before
doing it.

Thanks
Ole


 
Reply With Quote
 
 
 
 
Paul G. Tobey [eMVP]
Guest
Posts: n/a
 
      8th Nov 2007
So, you don't want to know the amount of available memory, but the amount of
available disk space? I'm not sure that you will ever be able to reliably
predict ahead of time whether X is enough memory to save a file of size Y or
not. You have to deal with cluster sizes, just like you do on the desktop
when saving to disk. You can take a look at GetDiskFreeSpaceEx() in the C
SDK. You should be able to P/Invoke to that. Probably the 'right' way is
to just try to save and, if you get a disk-full exception, report that to
the user or take suitable automatic action as a result. I don't see
DriveInfo in .NET Compact Framework, so I think that P/Invoking is probably
going to be necessary.

Paul T.

"Ole" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> How do I determine the available amount of memory in a Pocket PC (code
> example)? I need to check if there is space enough for saving data before
> doing it.
>
> Thanks
> Ole
>



 
Reply With Quote
 
nabeelfarid@gmail.com
Guest
Posts: n/a
 
      8th Nov 2007
On Nov 8, 2:10 pm, "Ole" <o...@blabla.com> wrote:
> How do I determine the available amount of memory in a Pocket PC (code
> example)? I need to check if there is space enough for saving data before
> doing it.
>
> Thanks
> Ole


Try OpenNETCF.IO.DriveInfo.AvailableFreeSpace in OpenNETCF 2.1
Framework. Its free if you are not aware of it

http://www.opennetcf.com/library/sdf/
http://www.opennetcf.com/Products/Sm...7/Default.aspx

Regards,
Nabeel

 
Reply With Quote
 
Ole
Guest
Posts: n/a
 
      9th Nov 2007
Thanks - GetDiskFreeSpaceEx does the job for me.

Ole


"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam DOT
com> wrote in message news:(E-Mail Removed)...
> So, you don't want to know the amount of available memory, but the amount
> of available disk space? I'm not sure that you will ever be able to
> reliably predict ahead of time whether X is enough memory to save a file
> of size Y or not. You have to deal with cluster sizes, just like you do
> on the desktop when saving to disk. You can take a look at
> GetDiskFreeSpaceEx() in the C SDK. You should be able to P/Invoke to
> that. Probably the 'right' way is to just try to save and, if you get a
> disk-full exception, report that to the user or take suitable automatic
> action as a result. I don't see DriveInfo in .NET Compact Framework, so I
> think that P/Invoking is probably going to be necessary.
>
> Paul T.
>
> "Ole" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> How do I determine the available amount of memory in a Pocket PC (code
>> example)? I need to check if there is space enough for saving data before
>> doing it.
>>
>> Thanks
>> Ole
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to determine memory usage? =?Utf-8?B?SjE1MA==?= Windows XP General 25 20th Jun 2008 04:15 PM
Determine how much video memory you need John Doe DIY PC 15 21st Oct 2006 03:58 PM
How do I determine amount of memory I can have? Terry Olsen Microsoft VB .NET 0 22nd Jul 2005 07:47 PM
Determine Memory Speed Glenn Windows XP General 1 27th Sep 2004 04:26 PM
How to determine SDRAM memory speed? Dennis Savatski DIY PC 7 26th Jan 2004 08:50 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:22 PM.