How to know memory space?

  • Thread starter Thread starter Mark
  • Start date Start date
M

Mark

Hi,
Can anyone please show me a snippet of how to get the
memory space of the Pocket Pc? There have been references
about Winapi, but I don't understand them. A simple but
clear snippet code, eg getting the memory space and
displaying them via a msgbox or something is greatly
appreciated.
Thank you.
 
Hi,
I have noticed this thread and tried the link. I'm confused with the
code given. How can I actually get the memory space? I modified the code
(add in) in the set sub procedure, but the space returned is not same as
the one shown in the pocket pc.

Dim tempstr As String
MsgBox("Physical Memory Available")
tempstr = String.Format("{0}", memStatus.dwAvailPhys.ToString())
MsgBox(tempstr)

MsgBox("PageFile Memory Available")
tempstr = String.Format("{0}",
memStatus.dwAvailPageFile.ToString())
MsgBox(tempstr)

MsgBox("Virtual Memory Available")
tempstr = String.Format("{0}",
memStatus.dwAvailVirtual.ToString())
MsgBox(tempstr)

MsgBox("Memory Length Available")
tempstr = String.Format("{0}", memStatus.dwLength.ToString())
MsgBox(tempstr)

MsgBox("Memory Load Available")
tempstr = String.Format("{0}",
memStatus.dwMemoryLoad.ToString())
MsgBox(tempstr)

MsgBox("TotalPageFile Memory Available")
tempstr = String.Format("{0}",
memStatus.dwTotalPageFile.ToString())
MsgBox(tempstr)

MsgBox("TotalPhysical Memory Available")
tempstr = String.Format("{0}", memStatus.dwTotalPhys.ToString())
MsgBox(tempstr)

MsgBox("TotalVirtual Memory Available")
tempstr = String.Format("{0}",
memStatus.dwTotalVirtual.ToString())
MsgBox(tempstr)


I would like to use this memory space to determine the amount of
data to be downloaded into the pocket pc. Please help.
Thank you.


Butt Chin Chuan
A beginner in .Net Compact Framework development
 
I'm not sure that those pieces of information are going to help you decide
how much data to download. None of them address how much of the free memory
is assigned to the filesystem and none of them have anything to do with how
much memory a single application can use. For the filesystem question, look
at GetDiskFreeSpaceEx(), instead.

Paul T.
 
Back
Top