How to receive event when network is connected and also when user logs in

前端 未结 6 1600
再見小時候
再見小時候 2021-02-06 02:32

I have a service that runs and I\'d like to receive notification when:

a) the network is connected.

b) when a user logs in to the machine.

How can I do

6条回答
  •  旧时难觅i
    2021-02-06 03:18

    SENS can do this. http://msdn.microsoft.com/en-us/magazine/cc301850.aspx

    Check for both ISensNetwork and ISensLogon.

    Adapt this for C# and you're done.

提交回复
热议问题