RESOLUTION
To resolve this problem, manually upgrade the dual-mode device to MTP. Or, enable automatic dual-mode device driver upgrades when you set up an application.
Manually upgrade the dual-mode device to MTP
To manually upgrade a specific dual-mode device to MTP, you must first uninstall the device by using Device Manager. After you uninstall the device, you can click
Scan for new devices on the
Action menu in Device Manager.
Enable automatic driver upgrades for dual-mode devices
Applications may support automatic dual-mode device driver upgrades by implementing device migration support in their setup packages. The Wpd_ci.dll file is the Windows Portable Devices class installer. This installer supports two functions that can be used to upgrade drivers on dual-mode devices:
- The RescanBus() function will trigger a scan for new devices.
- The MigrateMTPDevicesInstalledAsMSC() function can search for dual-mode devices that are installed as MSC storage volumes. Depending on the option that you select, the function will return a count of the devices, perform the uninstall operation, or perform an automatic rescan.
There is no static library in Windows Media Format software development kit (SDK) 9.5 that supports these functions. You must retrieve the address for these functions by using the
GetProcAddress() function. For more information about the
GetProcAddress() function, visit the following Microsoft Developer Network (MSDN) Web site:
You can call the
MigrateMTPDevicesInstalledAsMSC() function by using flags. The following is the function prototype:
MigrateMTPDevicesInstalledAsMSC(IN BOOL fRemove, IN BOOL fRescan, OUT UINT* pcRemoved)
These flags have the following effect on the behavior of the function.
fRemove
| fRescan | Result |
T | T | The flag uninstalls all MTPInstalledAsMSC devices and then rescans the bus to reinstall all USB devices. If the pcRemoved value is non-NULL, the flag returns the number of devices that were migrated.
|
T | F | The flag uninstalls all MTPInstalledAsMSC devices but defers the rescan until either the RescanBus() function or the MigrateMTPDevicesInstalledAsMSC(FALSE, FALSE, NULL) function is called. If the pcRemoved value is non-NULL, the flag returns the number of devices that were removed. |
F | T | This flag performs a rescan of the bus.
|
F | F | This flag has no effect. If the pcRemoved value is non-NULL, the flag returns the number of devices that would be uninstalled if the fRemove flag were TRUE.
|
If fRemove = TRUE, the
MigrateMTPDevicesInstalledAsMSC function uninstalls all dual-mode devices that are currently installed as MSC storage volumes. If fRescan = TRUE, the USB bus is immediately rescanned, and PlaysForSure devices that are connected are installed as MTP devices. If fRescan = FALSE, the rescan operation is delayed. The setup application may then look for a non-zero *pcRemoved result and explicitly call the
RescanBus() function, accordingly.
Migration may be disabled for specific devices. To do so, create a "DisableMtpMigration" DWORD value as a registry device parameter that is set not equal to zero. By using this parameter DWORD value, device companies can selectively prevent their devices from being migrated.
Call the
MigrateMTPDevicesInstalledAsMSC() function during application setup immediately after you install the Windows Format SDK redistributable components but before you start the UMWDF service.