ダウンロード機能を書いたが、ファイルが自分のPCに書き込まれたときに空のファイル(ゼロバイトの長さ) 誰かが理由を教えてくれますか?UWP VB.Netでファイルをダウンロード
これは
Public Shared Async Function StartDownload(ByVal InputUrl As String, ByVal FileName As String) As Task
Dim MioPicker As FolderPicker = New FolderPicker()
MioPicker.SuggestedStartLocation = PickerLocationId.Desktop
MioPicker.ViewMode = PickerViewMode.Thumbnail
MioPicker.FileTypeFilter.Add("*")
Dim MioFolder As StorageFolder = Await MioPicker.PickSingleFolderAsync
Dim source As New Uri(InputUrl)
Dim destinationFile As StorageFile = Await MioFolder.CreateFileAsync(FileName, CreationCollisionOption.GenerateUniqueName)
Dim downloader As New BackgroundDownloader()
Dim download As DownloadOperation = downloader.CreateDownload(source, destinationFile)
End Function
感謝がたくさんあります
ありがとうございます。私の間違いは、StartAsync行を残していた... :-( –