There is an unsaved comment in progress. You will lose your changes if you continue. Are you sure you want to reopen the work item?
Asynchronous Connection not working on Win7
If the device is connected after doing rapi.Connect(false, -1), RapiConnected event is never fired, even if ActiveSync seems to work fine (In VisualStudio's Output window the strings written by ActiveSync events seems Ok to me).
It seems that in RAPI.InitThreadProc() the line
ret = WaitForSingleObject(m_ri.heRapiInit, 250);
always returns WAIT_TIMEOUT and never WAIT_OBJECT_0 even if the device is connected.
In Windows Xp it works just fine.
If the device is connected BEFORE launching the application which does rapi.Connect(false, -1), WAIT_OBJECT_0 is correctly returned and RapiConnected is correctly raised.
Any ideas on how to fix this? Have the WinAPIs so significantly changed in Win7?