Windows Foundation interface representing an asynchronous operation.
Questions tagged [iasyncoperation]
22 questions
4
votes
0 answers
Does Outlook, as a Drop Target, support IAsyncOperation?
I am playing with Creating something from nothing, asynchronously [Developer-friendly virtual file implementation for .NET improved!].
This brilliant article demonstrates how to create a customized DataObject implementing delayed data extract on…

xiao
- 41
- 2
3
votes
1 answer
IAsyncOperation>' does not contain a definition for 'GetAwaiter'
I am using Visual Studio 2017 Professional.
I have been following this guide:
https://learn.microsoft.com/en-us/windows/uwp/design/shell/tiles-and-notifications/notification-listener
My problem code is as follows:
using…

Thomas Fuzesi
- 33
- 1
- 4
3
votes
1 answer
How to async / await in Renci.SshNet.BeginDownload with Task.Factory.FromAsync
I have access to a Connected Renci.SshNet.SftpClient which I use to get a sequence of the files in the sftp folder. The function used for this is
Renci.SshNet.SftpClient.ListDirectory(string);
Due to the huge amount of files in the directory this…

Harald Coppoolse
- 28,834
- 7
- 67
- 116
1
vote
0 answers
How can I get a progress report from an async write to an output stream?
In my app, I have to write an IBuffer to an IOutputStream. I'd like to show my user the progress of this operation, so I'm trying with the following code:
auto writeOp = strm->WriteAsync(buff);
writeOp->Progress = ref new…
user18901310
1
vote
0 answers
How to await on an IAsyncOperation using C++/COM
I am accessing a WinRT API using C++ and COM.
The following code gives me results == unspecified
ComPtr statics;
RoGetActivationFactory(HString::MakeReference(RuntimeClass_Windows_Devices_Geolocation_Geolocator).Get(),…

Jonathon Simister
- 23
- 3
1
vote
1 answer
How to stop a call resulting in IAsyncOperation?
In my application I notify multiple devices. If a device is not reachable and is not responding within a few seconds, i want to cancel the call.
My code is:
await…

Laurence
- 95
- 11
1
vote
1 answer
Awaiting an IAsyncOperation in F#
I have the following code in F#:
let CreateSampleDataFromJson<'T>(path) =
let uri = new Uri(path)
async {
let file = StorageFile.GetFileFromApplicationUriAsync(uri)
let jsonText = FileIO.ReadTextAsync(file)
…

Andy B
- 541
- 2
- 13
1
vote
0 answers
IAsyncOperation^
Im trying to create a C++ Runtime compoment to use in c# windows store app project;
I Created a new project C++ -> Windows Store App -> Windows Runtime Component.
The new project has default class1.
This is what i m trying to do and i get…

Stamos
- 3,938
- 1
- 22
- 48
1
vote
2 answers
Using multithreaded WinRT component from WinJS
I have a WinJS app that uses WinRT component written in C++/CX. Component spawns a background thread that encapsulates work with a huge legacy thread-unsafe C++ library, which requires all calls to be made from the same thread.
I need to implement…

Dmitry Shkolnik
- 323
- 1
- 3
- 12
0
votes
1 answer
Creating task in C++/UWP
I'm trying to create a task in VS2019 UWP C++. I've got this bit of code:
IAsyncAction ^frame;
auto frame_task = create_task(frame);
frame_task.then([this]()
{
// Noop
});
What I want to do is have an infinite loop that does frame…

Frank Miller
- 499
- 1
- 7
- 19
0
votes
1 answer
Task continuation with IAsyncOperation in UWP
I have a c++ class object which performs some processing in the background of a uwp application.
Its process operation is called by Unity's "Update" method ~60fps through an UWP IAsyncOperation.
The class has a isBusy property which is set to true…

Taylor Frantz
- 1
- 1
0
votes
1 answer
Cannot get an asynchronous operation Result (Windows::Foundation::IAsyncOperation interface) in C++ WinRT
I'm a little bit desperate trying to get the result of a winrt asynchronous method with Windows::Foundation::IAsyncOperation interface. The project is a Visual Studio Community 2017 c++ project with winRT extension enabled.
I've tried using…

l.moreno
- 1
- 1
0
votes
0 answers
Android in app biling Can't start async operation
I am new in android, my first app has finished recently. I want to set an IAB (in app billing) in my app,I tested my app and I had the below problems:
1-when I click on the "buy" button eveything is OK and the pay operation run correctly. but when I…

Farshid Barzegar
- 23
- 2
0
votes
2 answers
AsAsyncAction VS Task.Run
Whenever I have to start a parallel task I usually do this:
public async Task FindPerson(string personId)
{
await Task.Run(() =>
{
//Search the person and write to screen
});
}
However usually I see other coders using…

Fritjof Berggren
- 3,178
- 5
- 35
- 57
0
votes
0 answers
Win10 BLE desktop application IAsyncOperation as collection
I am working on upgrading desktop app to run on windows 10 with BLE support. I modified the app to target to corresponding windows version as described in this question (How can I reference the Windows 8 Runtime in console). Now trying to do step by…

Vladimir Tsykunov
- 810
- 6
- 15