HighTechTalks DotNet Forums  

programatically stop and start ActiveSync service.

Dotnet Framework (Compact Framework) microsoft.public.dotnet.framework.compactframework


Discuss programatically stop and start ActiveSync service. in the Dotnet Framework (Compact Framework) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Empi
 
Posts: n/a

Default programatically stop and start ActiveSync service. - 10-01-2007 , 03:40 AM






Hi,

I need to stop the activesync in some sections of my projects.
Any clue on how to do it?

Thanks.




Reply With Quote
  #2  
Old   
Peter Foot [MVP]
 
Posts: n/a

Default Re: programatically stop and start ActiveSync service. - 10-01-2007 , 07:05 AM






On Windows Mobile 5.0 and above you can call the ActiveSyncStart and
ActiveSyncStop methods in aygshell.dll e.g.
[DllImport("aygshell.dll", SetLastError = true)]
internal static extern int ActiveSyncStart();

[DllImport("aygshell.dll", SetLastError = true)]
internal static extern int ActiveSyncStop();

See the SDK documentation for a description of these functions.

Peter

--
Peter Foot
Microsoft Device Application Development MVP
www.peterfoot.net | www.inthehand.com
In The Hand Ltd - .NET Solutions for Mobility

"Empi" <mpeleg (AT) softstart (DOT) co.il> wrote

Quote:
Hi,

I need to stop the activesync in some sections of my projects.
Any clue on how to do it?

Thanks.





Reply With Quote
  #3  
Old   
Empi
 
Posts: n/a

Default Re: programatically stop and start ActiveSync service. - 10-01-2007 , 09:11 AM



TY very much !



"Peter Foot [MVP]" <feedback (AT) nospam-inthehand (DOT) com> wrote

Quote:
On Windows Mobile 5.0 and above you can call the ActiveSyncStart and
ActiveSyncStop methods in aygshell.dll e.g.
[DllImport("aygshell.dll", SetLastError = true)]
internal static extern int ActiveSyncStart();

[DllImport("aygshell.dll", SetLastError = true)]
internal static extern int ActiveSyncStop();

See the SDK documentation for a description of these functions.

Peter

--
Peter Foot
Microsoft Device Application Development MVP
www.peterfoot.net | www.inthehand.com
In The Hand Ltd - .NET Solutions for Mobility

"Empi" <mpeleg (AT) softstart (DOT) co.il> wrote in message
news:OHQ5V5$AIHA.4584 (AT) TK2MSFTNGP03 (DOT) phx.gbl...
Hi,

I need to stop the activesync in some sections of my projects.
Any clue on how to do it?

Thanks.







Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.