There's not going to be an API/COM interface for "disable ActiveSync" (and
more than there's one for "disable Internet Explorer", etc.) You can kill
and restart ActiveSync, as you said. I'm sure that, when you make a change
to ActiveSync's settings to disable USB connection, it's actually acting on
that immediately to remove itself from being notified about USB device
connections, etc. I think it's unlikely that it's monitoring for some
WM_SETTINGCHANGE message or something to catch other programs changing its
registry settings. You could try WM_SETTINGCHANGE, of course...
Paul T.
"Lisa Pearlson" <> wrote in message
news:...
> That one kills and reruns activesync.
>
> I can accomplish same by running
>
> taskkill /IM wcescomm.exe /T
> And run activesync again by getting wcescomm.exe path from registry.
>
> That's not what I want though. Besides, if I am to use some 3rd party app
> for that, I might as well use ActiveSync's own UI to disable USB
> connections. The whole point is doing it programmatically, disable usb
> connections without killing activesync.
>
> Thanks though.
>
> "Linley Meslier" <> wrote in
> message news:66DF82EA-92C8-4C9A-A831-...
>> Hi Lisa,
>>
>> You may want to try Activesync Toggle from
>> http://micrologics.co.uk/library/ast/
>> --
>> Linley Meslier
>> Microsoft MVP - Mobile Devices
>> Http://PocketpcMauritius.blogspot.com
>> Http://PPCMUDownloads.blogspot.com/
>>
>>
>> "Lisa Pearlson" wrote:
>>
>>> Hi,
>>>
>>> I wish to temporarily disable ActiveSync's ability to connect via USB.
>>> Manually this can be done by unticking the box for allowing USB
>>> connections,
>>> under connection settings.
>>> While this modifies the registry setting
>>> HKEY_CURRENT_USER\Software\Microsoft\Windows CE
>>> Services\ConnectionTypesAllowed, changing this value doesn't seem to
>>> have an
>>> effect (until a reload).
>>>
>>> Sure, I can kill wcescomm.exe and restart it when I'm done, but this is
>>> ugly.. I want an active connection to remain connection, but if
>>> disconnected, I want to disallow reconnect.
>>>
>>> Some COM interface, windows message, or some other way to change the
>>> connection settings programmatically?
>>>
>>> Lisa
>>>
>>>
>>>
>
>