Quote from "fs-support_ZU"
Hello,
so if i understand you right, the notification is send when you get connected but it is not send when you get disconnected.
And the main problem is that the sdcard isn't mounted again.
That's right. I can get a notification when the NetDCU device is connected to the PC because of the unmounted sdcard. But I don't get any notification when the device is disconnected from the PC.
What I tried so far: catching any windows message (like WM_DEVICECHANGE), CeRunAppAtEvent, your EnumDev sample. We also take a look at the registry and at the storage manager, but there seems to be no "hint" when the device is disconnected.
Quote
this value can in general specified under "HKLM\drivers\builtin\<driver>" for each driver. In our case i would set the value for SDHC and SBBus.
We tried these values too, but we got no relevant debug output.
Some more explanations what we tried to achieve: we use the sdcard as mass storage in order to gain a simple access of the device data (without installing any drivers like ActiveSync on the PC). There is no problem to remount the sdcard when it was unmounted while connecting the NetDCU device to a PC. But the problem is the shared access to the sdcard from both sides at the same time which seems to end up in corrupted data from time to time. Therefore we are searching for a method to detect if the NetDCU device is connected to a PC.
Another possible solution could be to turn off the mass storage access from the PC for a short time. We tried so far IOCTL_UFN_CHANGE_CURRENT_CLIENT (switching to ActiveSync and back) and SetDevicePower (to turn USB port off), without success.