我尝试使用库" mobileDevice"。但我得到这个错误: 似乎应用程序找不到文件iTunesMobileDevice.dll。
在我的"注册表编辑器"看起来像这样:
我尝试过但没有工作的事情:
1)。从itunes iTunesMobileDevice.dll获取一个文件 2)。将它放在同一目录应用程序
可能导致错误的行:
private static readonly DirectoryInfo ApplicationSupportDirectory = new DirectoryInfo(Registry.GetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Apple Inc.\Apple Application Support", "InstallDir", Environment.CurrentDirectory).ToString());
private const string DLLPath = "iTunesMobileDevice.dll";
private static readonly FileInfo iTunesMobileDeviceFile = new FileInfo(Registry.GetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Apple Inc.\Apple Mobile Device Support\Shared", "iTunesMobileDeviceDLL", "iTunesMobileDevice.dll").ToString());