I noticed that there is a system service can let applications to register a
notification event when a full device data restore completes via calling
CeRunAppAtEvent with NOTIFICATION_EVENT_RESTORE_END. This is very useful for
my application to be re-started after restore.

But here comes my question is that how can I get notification when data
backup action intend to be started? I had a resident monitor program needed
to know this situation for some reason.

Thanks for any help in advance.

Re: How to be notified when ActiveSync will intend to start data backup? by r_z_aret

r_z_aret
Mon Nov 24 10:30:49 CST 2003

On Mon, 24 Nov 2003 22:51:34 +0800, "Sbin Lin" <sbin@iastyle.com>
wrote:

>I noticed that there is a system service can let applications to register a
>notification event when a full device data restore completes via calling
>CeRunAppAtEvent with NOTIFICATION_EVENT_RESTORE_END. This is very useful for
>my application to be re-started after restore.
>
>But here comes my question is that how can I get notification when data
>backup action intend to be started? I had a resident monitor program needed
>to know this situation for some reason.

I gather from your reference to CeRunAppAtEvent, so I assume you want
a solution that works with RAPI. If so, then I know two ways to
determine when a _connection_ is started. Not quite what you asked,
but perhaps close enough.

a) Call CeRapiInit. According to my copy of on-line help, this
function won't return until a connection is made or an error occurs.
I've been recommending this for a while, but recently realized that my
code returns very quickly with an error. The behavior works well for
my purposes, so I haven't explored further

b) An application will be started automatically if the path to its
executable is provided as a string value for the registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows CE
Services\AutoStartOnConnect
The name of the value doesn't matter, so I've used the name of the
executable.

>
>Thanks for any help in advance.
>
>

-----------------------------------------
To reply to me, remove the underscores (_) from my email address (and please indicate which newsgroup and message).

Robert E. Zaret
PenFact, Inc.
500 Harrison Ave., Suite 3R
Boston, MA 02118
www.penfact.com