PC Review


Reply
Thread Tools Rate Thread

Activesync service

 
 
Robert Camsky
Guest
Posts: n/a
 
      31st Dec 2004
Hi,
does anyone know how to write an own activesync service in .NET C#?

Thanks for any advice.

Regards,
Robert


 
Reply With Quote
 
 
 
 
Dan Bass
Guest
Posts: n/a
 
      31st Dec 2004

You'd like to rewrite activesync?

Why not just distribute activesync with your solution, and use opennetcf's
desktop class to access the device? (http://www.opennetcf.org)

Perhaps if you describe a little more about what you want to do, we'll be
able to point you in the right direction. =o)

Hope that helps.

Daniel.


"Robert Camsky" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi,
> does anyone know how to write an own activesync service in .NET C#?
>
> Thanks for any advice.
>
> Regards,
> Robert
>
>



 
Reply With Quote
 
Robert Camsky
Guest
Posts: n/a
 
      31st Dec 2004
Sorry for my explanation,

you wrote what I exactly want to do. I don't want to rewrite ActiveSync, but
just to create my own synch. item for AS. But I don't really don't know how
to do this.


The goal
when I put device into a cradle, I need to update SqlCe sdf file in it.

Thanks.
R.

"Dan Bass" <danielbass [at] postmaster [dot] co [dot] uk> pí¹e v diskusním
pøíspìvku news:(E-Mail Removed)...
>
> You'd like to rewrite activesync?
>
> Why not just distribute activesync with your solution, and use opennetcf's
> desktop class to access the device? (http://www.opennetcf.org)
>
> Perhaps if you describe a little more about what you want to do, we'll be
> able to point you in the right direction. =o)
>
> Hope that helps.
>
> Daniel.
>
>
> "Robert Camsky" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Hi,
> > does anyone know how to write an own activesync service in .NET C#?
> >
> > Thanks for any advice.
> >
> > Regards,
> > Robert
> >
> >

>
>



 
Reply With Quote
 
Guest
Posts: n/a
 
      31st Dec 2004
Unfortunately AS Providers can only be written in C++.

-Chris


"Robert Camsky" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Sorry for my explanation,
>
> you wrote what I exactly want to do. I don't want to rewrite ActiveSync,
> but
> just to create my own synch. item for AS. But I don't really don't know
> how
> to do this.
>
>
> The goal
> when I put device into a cradle, I need to update SqlCe sdf file in it.
>
> Thanks.
> R.
>
> "Dan Bass" <danielbass [at] postmaster [dot] co [dot] uk> pí¹e v diskusním
> pøíspìvku news:(E-Mail Removed)...
>>
>> You'd like to rewrite activesync?
>>
>> Why not just distribute activesync with your solution, and use
>> opennetcf's
>> desktop class to access the device? (http://www.opennetcf.org)
>>
>> Perhaps if you describe a little more about what you want to do, we'll be
>> able to point you in the right direction. =o)
>>
>> Hope that helps.
>>
>> Daniel.
>>
>>
>> "Robert Camsky" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>> > Hi,
>> > does anyone know how to write an own activesync service in .NET C#?
>> >
>> > Thanks for any advice.
>> >
>> > Regards,
>> > Robert
>> >
>> >

>>
>>

>
>



 
Reply With Quote
 
Dan Bass
Guest
Posts: n/a
 
      31st Dec 2004
> The goal when I put device into a cradle, I need to update SqlCe sdf file
> in it.


Automatically (as soon as you're docked and connected) or manually (with the
click of a button or something to that affect)?


 
Reply With Quote
 
Robert Camsky
Guest
Posts: n/a
 
      31st Dec 2004
> > The goal when I put device into a cradle, I need to update SqlCe sdf
file
> > in it.

>
> Automatically (as soon as you're docked and connected) or manually (with

the
> click of a button or something to that affect)?
>

Automatically would be better. But manually is also possible.


 
Reply With Quote
 
Dan Bass
Guest
Posts: n/a
 
      31st Dec 2004
The problem with automatic that I've had is the library's (opennetcf)
inability to determine whether a device is connected or not. You first have
to try to establish a connection, then check for whether that connection
worked...

As follows:

OpenNETCF.Desktop.Communication.RAPI desktopComm = new
OpenNETCF.Desktop.Communication.RAPI();
desktopComm.Connect ();
if ( !desktopComm.DevicePresent )
{
// do your synchronisation here
}
desktopComm.Disconnect();


The catch is, if you call Connect(), and there's no device present, it just
hangs. The timeout option that comes with the method doesn't seem to work. I
suppose if you were running a windows service that checked every few seconds
for a connection then you could spawn a thread to check, and have the main
thread abort this new thread should with your own time out mechanism. I'm
not sure how reliable this would be though.


The manual part of this is easy, simply ask the user to ensure a device is
connected, and that active sync has established a connection, then perform
your synchronisation. This is better as it also allows you the oppurtunity
to ask the user to insure the database file isn't locked or currently in
use...

Good luck.
Dan.

"Robert Camsky" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>> > The goal when I put device into a cradle, I need to update SqlCe sdf

> file
>> > in it.

>>
>> Automatically (as soon as you're docked and connected) or manually (with

> the
>> click of a button or something to that affect)?
>>

> Automatically would be better. But manually is also possible.
>
>



 
Reply With Quote
 
Jan Yeh_eMVP
Guest
Posts: n/a
 
      1st Jan 2005
Hi, Robert

You can try to use AutoStartOnConnect registry in pc, which will
launch your own application when a device is cradled.
Then use Dan's code to do your SQLCE update operation.

For your reference,
http://www.opennetcf.org/forums/topi...startonconnect
--

Best Regards,

Jan Yeh
MVP - Windows CE.NET, MCSD.NET, .NETcf consultant
Web - http://www.mobilemind.com.tw , Blog - http://blog.mvpcn.net/janyeh


"Dan Bass" <danielbass [at] postmaster [dot] co [dot] uk> ¼¶¼g©ó¶l¥ó·s»D:(E-Mail Removed)...
> The problem with automatic that I've had is the library's (opennetcf)
> inability to determine whether a device is connected or not. You first
> have to try to establish a connection, then check for whether that
> connection worked...
>
> As follows:
>
> OpenNETCF.Desktop.Communication.RAPI desktopComm = new
> OpenNETCF.Desktop.Communication.RAPI();
> desktopComm.Connect ();
> if ( !desktopComm.DevicePresent )
> {
> // do your synchronisation here
> }
> desktopComm.Disconnect();
>
>
> The catch is, if you call Connect(), and there's no device present, it
> just hangs. The timeout option that comes with the method doesn't seem to
> work. I suppose if you were running a windows service that checked every
> few seconds for a connection then you could spawn a thread to check, and
> have the main thread abort this new thread should with your own time out
> mechanism. I'm not sure how reliable this would be though.
>
>
> The manual part of this is easy, simply ask the user to ensure a device is
> connected, and that active sync has established a connection, then perform
> your synchronisation. This is better as it also allows you the oppurtunity
> to ask the user to insure the database file isn't locked or currently in
> use...
>
> Good luck.
> Dan.
>
> "Robert Camsky" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>>> > The goal when I put device into a cradle, I need to update SqlCe sdf

>> file
>>> > in it.
>>>
>>> Automatically (as soon as you're docked and connected) or manually (with

>> the
>>> click of a button or something to that affect)?
>>>

>> Automatically would be better. But manually is also possible.
>>
>>

>
>



 
Reply With Quote
 
Robert Camsky
Guest
Posts: n/a
 
      2nd Jan 2005
I would really thanks to Jan and Dan. I tried it and it works. But I get
stucked on followig:
when AS connection is established, I download the .sdf file contains SqlCe
data. I have discovered no classes to work with SqlCe database file on
"normal" .NET framework. Is there any way to modify them outside PPC?

Regards
Robert


> You can try to use AutoStartOnConnect registry in pc, which will
> launch your own application when a device is cradled.
> Then use Dan's code to do your SQLCE update operation.
>
> For your reference,
>

http://www.opennetcf.org/forums/topi...erms=autostart
onconnect
> --
>
> Best Regards,
>
> Jan Yeh
> MVP - Windows CE.NET, MCSD.NET, .NETcf consultant
> Web - http://www.mobilemind.com.tw , Blog - http://blog.mvpcn.net/janyeh
>
>
> "Dan Bass" <danielbass [at] postmaster [dot] co [dot] uk>

¼¶¼g©ó¶l¥ó·s»D:(E-Mail Removed)...
> > The problem with automatic that I've had is the library's (opennetcf)
> > inability to determine whether a device is connected or not. You first
> > have to try to establish a connection, then check for whether that
> > connection worked...
> >
> > As follows:
> >
> > OpenNETCF.Desktop.Communication.RAPI desktopComm = new
> > OpenNETCF.Desktop.Communication.RAPI();
> > desktopComm.Connect ();
> > if ( !desktopComm.DevicePresent )
> > {
> > // do your synchronisation here
> > }
> > desktopComm.Disconnect();
> >
> >
> > The catch is, if you call Connect(), and there's no device present, it
> > just hangs. The timeout option that comes with the method doesn't seem

to
> > work. I suppose if you were running a windows service that checked every
> > few seconds for a connection then you could spawn a thread to check, and
> > have the main thread abort this new thread should with your own time out
> > mechanism. I'm not sure how reliable this would be though.
> >
> >
> > The manual part of this is easy, simply ask the user to ensure a device

is
> > connected, and that active sync has established a connection, then

perform
> > your synchronisation. This is better as it also allows you the

oppurtunity
> > to ask the user to insure the database file isn't locked or currently in
> > use...
> >
> > Good luck.
> > Dan.
> >
> > "Robert Camsky" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> >>> > The goal when I put device into a cradle, I need to update SqlCe sdf
> >> file
> >>> > in it.
> >>>
> >>> Automatically (as soon as you're docked and connected) or manually

(with
> >> the
> >>> click of a button or something to that affect)?
> >>>
> >> Automatically would be better. But manually is also possible.
> >>
> >>

> >
> >

>
>



 
Reply With Quote
 
Dan Bass
Guest
Posts: n/a
 
      4th Jan 2005
Have you looked into using System.Data.SqlServerCe?

http://msdn.microsoft.com/library/de...qlserverce.asp


Good luck!
Thanks for that tip Jan, never knew about that!

Dan


"Robert Camsky" <(E-Mail Removed)> wrote in message
news:eh%(E-Mail Removed)...
>I would really thanks to Jan and Dan. I tried it and it works. But I get
> stucked on followig:
> when AS connection is established, I download the .sdf file contains SqlCe
> data. I have discovered no classes to work with SqlCe database file on
> "normal" .NET framework. Is there any way to modify them outside PPC?
>
> Regards
> Robert
>
>
>> You can try to use AutoStartOnConnect registry in pc, which will
>> launch your own application when a device is cradled.
>> Then use Dan's code to do your SQLCE update operation.
>>
>> For your reference,
>>

> http://www.opennetcf.org/forums/topi...erms=autostart
> onconnect
>> --
>>
>> Best Regards,
>>
>> Jan Yeh
>> MVP - Windows CE.NET, MCSD.NET, .NETcf consultant
>> Web - http://www.mobilemind.com.tw , Blog - http://blog.mvpcn.net/janyeh
>>
>>
>> "Dan Bass" <danielbass [at] postmaster [dot] co [dot] uk>

> ¼¶¼g©ó¶l¥ó·s»D:(E-Mail Removed)...
>> > The problem with automatic that I've had is the library's (opennetcf)
>> > inability to determine whether a device is connected or not. You first
>> > have to try to establish a connection, then check for whether that
>> > connection worked...
>> >
>> > As follows:
>> >
>> > OpenNETCF.Desktop.Communication.RAPI desktopComm = new
>> > OpenNETCF.Desktop.Communication.RAPI();
>> > desktopComm.Connect ();
>> > if ( !desktopComm.DevicePresent )
>> > {
>> > // do your synchronisation here
>> > }
>> > desktopComm.Disconnect();
>> >
>> >
>> > The catch is, if you call Connect(), and there's no device present, it
>> > just hangs. The timeout option that comes with the method doesn't seem

> to
>> > work. I suppose if you were running a windows service that checked
>> > every
>> > few seconds for a connection then you could spawn a thread to check,
>> > and
>> > have the main thread abort this new thread should with your own time
>> > out
>> > mechanism. I'm not sure how reliable this would be though.
>> >
>> >
>> > The manual part of this is easy, simply ask the user to ensure a device

> is
>> > connected, and that active sync has established a connection, then

> perform
>> > your synchronisation. This is better as it also allows you the

> oppurtunity
>> > to ask the user to insure the database file isn't locked or currently
>> > in
>> > use...
>> >
>> > Good luck.
>> > Dan.
>> >
>> > "Robert Camsky" <(E-Mail Removed)> wrote in message
>> > news:(E-Mail Removed)...
>> >>> > The goal when I put device into a cradle, I need to update SqlCe
>> >>> > sdf
>> >> file
>> >>> > in it.
>> >>>
>> >>> Automatically (as soon as you're docked and connected) or manually

> (with
>> >> the
>> >>> click of a button or something to that affect)?
>> >>>
>> >> Automatically would be better. But manually is also possible.
>> >>
>> >>
>> >
>> >

>>
>>

>
>



 
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
Debug VS.Net Web service from PocketPC via Activesync Arne Microsoft Dot NET Compact Framework 0 31st May 2006 12:16 PM
Managed ActiveSync Service Provider khelb_007@hotmail.com.invalid Microsoft Dot NET Compact Framework 1 23rd Feb 2006 03:19 PM
ActiveSync and Web service Harry Simpson Microsoft Dot NET Compact Framework 1 14th Apr 2004 02:31 PM
ActiveSync service provider (Guid - Oid) Philippe Requilé Microsoft Dot NET Compact Framework 0 24th Mar 2004 10:33 AM
ActiveSync Service Provider Joe Audette Microsoft Dot NET Compact Framework 1 13th Nov 2003 08:37 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:05 PM.