PC Review


Reply
Thread Tools Rate Thread

Application Close by OS

 
 
Paul Kay
Guest
Posts: n/a
 
      22nd Sep 2003
I'm guessing that when the PocketPC OS needs to close a running application
to free memory for a new application, that it sends a Close Message of some
sort to the application it wishes to close.

Could someone point me in the right direction as to what message is sent (or
if I've got it wrong, what the actual mechanics of this process are) and
advise me as to how to capture this message (or whatever) in order to
prevent a particular application from being closed by the OS.

If such a refusal to close were to be coded within an application, would the
OS then select a different application to close or would it continue trying
to close the first application it selected for closing?

Regards

Paul K.


 
Reply With Quote
 
 
 
 
Yaroslav Goncharov
Guest
Posts: n/a
 
      22nd Sep 2003
Hi

An application can attempt to release as many resources as possible in
response to the WM_HIBERNATE message. It should exist in response to the
WM_CLOSE message.

See "Responding to Low Memory States" article in the PPC 2002 SDK
documentation for details.

--
Yaroslav Goncharov
Microsoft MVP - Mobile Devices
Smartphone Developer Network
www.smartphonedn.com


"Paul Kay" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I'm guessing that when the PocketPC OS needs to close a running

application
> to free memory for a new application, that it sends a Close Message of

some
> sort to the application it wishes to close.
>
> Could someone point me in the right direction as to what message is sent

(or
> if I've got it wrong, what the actual mechanics of this process are) and
> advise me as to how to capture this message (or whatever) in order to
> prevent a particular application from being closed by the OS.
>
> If such a refusal to close were to be coded within an application, would

the
> OS then select a different application to close or would it continue

trying
> to close the first application it selected for closing?
>
> Regards
>
> Paul K.
>
>



 
Reply With Quote
 
Paul Kay
Guest
Posts: n/a
 
      22nd Sep 2003
Yaroslav,

Many thanks, that has got me headed in the right direction.

Do you by any chance recall a similar document or discussion outlining the
best way to handle (and ignore) the receipt of a WM_CLOSE and/or
WM_HIBERNATE message in a Compact Framework VB.Net or C# application.

I've googled to no avail.

Regards

Paul K.

"Yaroslav Goncharov" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi
>
> An application can attempt to release as many resources as possible in
> response to the WM_HIBERNATE message. It should exist in response to the
> WM_CLOSE message.
>
> See "Responding to Low Memory States" article in the PPC 2002 SDK
> documentation for details.
>
> --
> Yaroslav Goncharov
> Microsoft MVP - Mobile Devices
> Smartphone Developer Network
> www.smartphonedn.com
>
>
> "Paul Kay" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > I'm guessing that when the PocketPC OS needs to close a running

> application
> > to free memory for a new application, that it sends a Close Message of

> some
> > sort to the application it wishes to close.
> >
> > Could someone point me in the right direction as to what message is sent

> (or
> > if I've got it wrong, what the actual mechanics of this process are) and
> > advise me as to how to capture this message (or whatever) in order to
> > prevent a particular application from being closed by the OS.
> >
> > If such a refusal to close were to be coded within an application, would

> the
> > OS then select a different application to close or would it continue

> trying
> > to close the first application it selected for closing?
> >
> > Regards
> >
> > Paul K.
> >
> >

>
>



 
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
Launch External Application and Close main UI Application - VS 200 Ryan Microsoft VB .NET 2 11th Feb 2010 09:34 PM
Before Close Event Hide all Worksheets then Close Application RyanH Microsoft Excel Programming 0 24th Jan 2008 03:15 PM
How to make javascript close to work in c# windows application (Custom IE Application) Ashok Microsoft C# .NET 0 4th Jun 2004 04:55 PM
How to close an application when a button is clicked even when the application is running another process? Anderson Takemitsu Kubota Microsoft Dot NET Compact Framework 2 19th Aug 2003 12:47 AM
Windows application does not close when i press the close button Umut Tezduyar Microsoft Dot NET Framework Forms 7 14th Aug 2003 08:57 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:45 AM.