Problem with Connect_Events Windows 7

Nov 15, 2011 at 1:28 PM

Hey Guys,

I am working on a project for work using RAPI2.dll.

Everyting is working fine on a Windows XP machine but when using a Win7 machine there are some problems while reconnecting the activesync device.

The first attempt is fine (most of the time) the second time it fails to reconnect, even the wmdc is hanging. But when i close the application everyting is working again.

Does someone knows whats going on here?

Private Shared WithEvents devMgr As New RemoteDeviceManager

Private Shared Sub DeviceConnected() Handles devMgr.DeviceConnected
        WriteStringToConsole("-- Terminal connected --")
        Dim bla As WriteNextStepDelegate = New WriteNextStepDelegate(AddressOf WriteNextStep)
End Sub

Private Shared Sub DeviceDisconnected() Handles devMgr.DeviceDisconnected
        WriteStringToConsole("-- Terminal disconnected --")
End Sub

Thanks for your help.

Nov 16, 2011 at 1:12 AM

I haven't been able to find a way to fix the code to avert this problem. Check the bottomo of the discussion at for info that may help you work around your issue.

Nov 16, 2011 at 8:04 AM

Dear Dahall,

Thx for your fast response.The strange thing is that it works for Win XP perfectly and it seems that the problem only occurs the second time an event is fired.

I'll will try the work around as you mentioned above.


Again, thanks for your help