Hi all,

Is it possible for me to programmtically adjust the program/storage
memory slider from within my application? Are there any PInvokes to the
coredll that would allow me to do this? You can easily change this in
'Start->Settings->Memory', so it is possible to do I would have
thought.

I am using an MC50 device that is running PocketPC 2003.

Thanks

Tryst

Re: Porgammatically adjusting the program/storage memory slider in an application. by Michael

Michael
Wed Jun 21 07:25:14 CDT 2006

You need SetSystemMemoryDivision - which is not in the SDK. A few problems
using it: 1) you might destabilize the system, 2) Pocket PC OS monitors the
memory division and may change it (I think that, at some threshold, it makes
it a 50-50 split) and 3) I don't think it will be supported in future
versions of the OS.

You can see the Pocket PC OS change it by using the slider in the Memory
applet and watch it jump back to where it was (or, at least 50-50). Just
drag the slider far to the left or right and give it a few seconds /
minutes.

Why do you think you need to do this?

--
Michael Salamone [eMVP]
Entrek Software, Inc.
www.entrek.com


"Tryst" <trystano@gmail.com> wrote in message
news:1150888930.051129.199810@m73g2000cwd.googlegroups.com...
> Hi all,
>
> Is it possible for me to programmtically adjust the program/storage
> memory slider from within my application? Are there any PInvokes to the
> coredll that would allow me to do this? You can easily change this in
> 'Start->Settings->Memory', so it is possible to do I would have
> thought.
>
> I am using an MC50 device that is running PocketPC 2003.
>
> Thanks
>
> Tryst
>



Re: Porgammatically adjusting the program/storage memory slider in an application. by ctacke/>

ctacke/>
Wed Jun 21 07:25:20 CDT 2006

P/Invoke SetSystemMemoryDivision.

-Chris


"Tryst" <trystano@gmail.com> wrote in message
news:1150888930.051129.199810@m73g2000cwd.googlegroups.com...
> Hi all,
>
> Is it possible for me to programmtically adjust the program/storage
> memory slider from within my application? Are there any PInvokes to the
> coredll that would allow me to do this? You can easily change this in
> 'Start->Settings->Memory', so it is possible to do I would have
> thought.
>
> I am using an MC50 device that is running PocketPC 2003.
>
> Thanks
>
> Tryst
>



Re: Porgammatically adjusting the program/storage memory slider in an application. by Tryst

Tryst
Wed Jun 21 09:54:24 CDT 2006

Hi, and thanks for the replies.

I am getting some memory shortage issues when my application wants to
use the scanner on the MC50. It seems that if there is less than around
7.50 MB free for the Program memory, then the scanner will not open,
and the devices needs to be soft-reset inorder to get the scanner
resources freed up.

If I could check to see the free Program memory size, and then if it is
quite low, then use some of the free/available storage memory.

So it seems I can set the memory, but can I also get the amount of
memory consumed by the Program memory, and get the amount free for the
storage memory?

Thanks

Tryst


Re: Porgammatically adjusting the program/storage memory slider in an application. by Tryst

Tryst
Thu Jun 22 17:28:05 CDT 2006

Hi Chris,

I know about this PINnvoke call, but ideally I need to be aware of how
much space is available before I set set the memory.

Tryst


Re: Porgammatically adjusting the program/storage memory slider in an application. by ctacke/>

ctacke/>
Thu Jun 22 17:55:46 CDT 2006

Then use its complement - GetSystemMemoryDivision. Of course pay heed to
Michael's note - Pocket PC/ Windows Mobile adjusts this itself dynamically,
so adjusting it might not do much - you could end up fighting the platform.

-Chris


"Tryst" <trystano@gmail.com> wrote in message
news:1151015285.558092.242710@u72g2000cwu.googlegroups.com...
> Hi Chris,
>
> I know about this PINnvoke call, but ideally I need to be aware of how
> much space is available before I set set the memory.
>
> Tryst
>