저는 winRT C++를 사용하여 Windows 스토어 앱을 개발하고 있습니다. 이메일을 통해 파일을 공유 할 수는 있지만 수신자 이메일 주소를 구체적으로 지정할 수는 없습니다. 벨로는 파일을 공유하는 내 코드의 일부이다 : - 내가 수동으로 이메일 주소를 입력하지 않고 특정 전자 메일 수신자에게 첨부 파일을 보낼 수있는 방법파일을 특정 이메일 주소로 공유
DataRequest^ request = e->Request;
request->Data->Properties->Title = "Testing";
request->Data->Properties->Description = "Email With Attachment";
DataRequestDeferral^ deferral = request->GetDeferral();
create_task(Windows::ApplicationModel::Package::Current->InstalledLocation->GetFileAsync("testing.pdf")).then([this, request, deferral](task<StorageFile^> getFileTask)
{
try
{
auto pdfFile = getFileTask.get();
auto storageItems = ref new Platform::Collections::Vector<IStorageItem^>();
storageItems->Append(pdfFile);
request->Data->SetStorageItems(storageItems);
deferral->Complete();
}
catch (Exception^ ex)
{
// Calling FailWithDisplayText() also calls Complete on the deferral.
request->FailWithDisplayText(ex->Message);
}
});
.
답변 해 주셔서 감사합니다. 하지만 왜 우리는 Windows 스토어 앱에서 둘 다 할 수 없습니까? – user3227056
API가 없습니다. Windows Phone 8.1 (Windows 8.1 이후에 출시 된)에는 이러한 API가 있습니다. –
요즘까지도 같은 시간에 두 가지 작업을 모두 수행 할 수 없거나 다른 작업을 수행 할 생각이 없다는 것을 의미합니까? – user3227056