Access ActiveSync functionality in VB.NET or C#

  • Thread starter Thread starter John Lee
  • Start date Start date
J

John Lee

Hi,

I want to develop a solution like this:

data flow:
PPC app <---> ActiveSync <---> Desktop app <---> Database

Usage:
PPC will update data offline and want to sync back to DB when connected

Upon Sync:
1. PPC will move a xml file (DataSet Diffgrams) to desktop computer
2. ActiveSync will CALL(?) Desktop app to process the xml file (if any
change, apply it then get new dataset from DB and send back to PPC

I will use VS.NET 2003 SmartDeviceApp template with .NET Compact framework,
I am new with PPC development and esp. need help on HOW TO write app and
REGISTER it with ActiveSync and my Desktop app will be launched upon Sync
time. Can anyone point me a sample that use VB.NET or C#? Is it possible to
do this without using C++?

Thanks very much!

John
 
You cannot create a full-blown ActiveSync provider with manager code,
however I don't think you need one for these requirements. Simply create a
desktop app that run when ActiveSync makes a connection (simple registry key
registration). That app can use RAPI to copy the XML files from the
connected device to the PC and to send data back to the PPC.

Check out www.opennetcf.org/communication.asp
 
Thanks a lot, Chris!!!

Sounds great solution - Could you please tell me which registry key needed
to be set so when ActiveSync makes a connection my Desktop app will be
called?

Again, thanks a lot - you are my life saver!

John
 
That article indiates it is for CE .NET 4.2. That's the version that PPC
2003 usees, right? Will the same registry keys work with PPC 2002?

- Mark
 
The registry keys (these are desktop registry keys) are specific to
ActiveSync rather than a particular version of attached device. They should
work with all versions of ActiveSync from at least 3.0 onwards (possibly
earlier versions too).

Peter

--
Peter Foot
Windows Embedded MVP

In The Hand
http://www.inthehand.com
 
Yes, it's important to note these are DESKTOP registry keys, not device
keys. The version of CE is irrelevant (I used it with CE 2.0 devices using
ActiveSync 3.1)
 
Is there a similar way to do this on the device side? I'm currently using
RDA to sync from SQLCE to desktop SQL and it'd be great if I could
automatically start this process when they sync. Hmm...can I do RDA from a
desktop app to the PPC?

- Mark

Chris Tacke said:
Yes, it's important to note these are DESKTOP registry keys, not device
keys. The version of CE is irrelevant (I used it with CE 2.0 devices using
ActiveSync 3.1)

--
Chris Tacke, eMVP
Advisory Board Member
www.OpenNETCF.org
---
Windows CE Product Manager
Applied Data Systems
www.applieddata.net

Peter Foot said:
The registry keys (these are desktop registry keys) are specific to
ActiveSync rather than a particular version of attached device. They should
work with all versions of ActiveSync from at least 3.0 onwards (possibly
earlier versions too).

Peter

--
Peter Foot
Windows Embedded MVP

In The Hand
http://www.inthehand.com
http://msdn.microsoft.com/library/d...ctsy/html/ceconRegistry-BasedNotification.asp will
be write
app launched
upon
 
Thanks Peter!!!

Another question, Because my desktop app is not an ActiveSync service
provider, the activeSync has no idea how when my desktop will finish the job
so while my desktop application is busy doing the job, the activeSync
connection could be closed before the desktop app copy back the updated
results back to PPC, Is there a way to either keep the connection open or
re-instaniate the connection from desktop app (C# code)?

Thanks!

John
 
Back
Top