System Memory Storage Memory Adjust in CF 2.0 or OpenNetCF?

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
 
T

Tomppa

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);

}
 
G

Guest

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
 
T

Tomppa

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....
 
T

Tomppa

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;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top