System Memory Storage Memory Adjust in CF 2.0 or OpenNetCF?

  • Thread starter Thread starter Tomppa
  • Start date Start date
T

Tomppa

Can I programmatically adjust this memory usage option?

I want more System Memory and only 5MB of storage Memory

CE 5.0 CF 2.0

Thanks
 
Thanks for the url.

I got this far but it does not aseem to work.

Also SystemInfo is not returning expected results.

Any suggestions???

[DllImport("coredll", SetLastError = true)]

private static extern bool GetSystemMemoryDivision(ref int storage, ref int

ram, ref int pageSize);

[DllImport("coredll", SetLastError = true)]

private static extern bool SetSystemMemoryDivision(int pages);

public bool SetMinStorage()

{

OpenNETCF.WindowsCE.SystemInfo si = new OpenNETCF.WindowsCE.SystemInfo();

int test = si.NumberOfProcessors;

int pageSize = si.PageSize;

return SetSystemMemoryDivision(pageSize * 4);

}
 
It's not going to allow you to set it to 16k (4 pages at 4k per page). Try
maybe 0x400 or something more reasonable.

-Chris
 
OK this works

return SetSystemMemoryDivision(1024); //set to 1024K Storage

Be sure to not have the System Info window open when setting the value.
Open it after to chek to see if it works :)

OpenNETCF.WindowsCE.SystemInfo() still not working though....
 
Version 2.0

The following 2 calls return 0

OpenNETCF.WindowsCE.SystemInfo si = new OpenNETCF.WindowsCE.SystemInfo();

int test = si.NumberOfProcessors;

int pageSize = si.PageSize;
 
Back
Top