使用ActiveSync连接设备时捕获事件 [英] Catch the event when device connect using ActiveSync
问题描述
我有可以从互联网更新数据的应用程序。我想构建一个新功能 - 当设备使用ActiveSync连接到PC时,应用程序会自动更新数据。我找到了CeRunAppAtEvent函数 - 所以我可以使用此函数和NOTIFICATION_EVENT_RS232_DETECTED标志注册我的应用程序。但是当设备连接并且应用程序没有运行时会发生什么?它启动应用程序?因为我不想在连接时启动应用程序。我只想在我的应用程序运行时捕获事件。感谢
I have the application which can update data from the internet. I want to built a new functionality - application updates data automatically when the device connects to PC using ActiveSync. I found CeRunAppAtEvent function - so I can register my application using this function and NOTIFICATION_EVENT_RS232_DETECTED flag. But what happens when the device connects and the application is not running? It starts the application? Because I don't want to start the application when it connects. I only want to catch the event, when my application is running.
thanks much
推荐答案
你好zbynda,
Hi zbynda,
OpennetCF提供了一种监视activesync连接状态的方法。如下面的代码:
OpennetCF provide a way to monitor activesync connection status. Like the code below:
这篇关于使用ActiveSync连接设备时捕获事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!