Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
61 views

I'm using bleak and winRT to write a python application. In this application the device should be paired and connected to a Windows Pc automatically after providing mac address and PIN. The connection ...
newuser's user avatar
0 votes
1 answer
427 views

I'm trying to use the MediaPlayer API in the most simple way. All I want to do is play back an audio file (and possibly get a notification when it's done). Unfortunately, this forces me to use winRT ...
Simpleton's user avatar
  • 713
-1 votes
1 answer
394 views

I'm currently facing an issue where i am unable to create a C#/WinRT component that returns any complex types acceptable by WinRT, like IAsyncOperation<>., IAsyncAction or IList<>. I have ...
Vanilson Nogueira's user avatar
2 votes
1 answer
209 views

The IAsyncOperation<TResult> interface exposes a Completed property, which users can attach methods to that are invoked when the operation completes. MS has example code online that illustrates ...
Charles Nicholson's user avatar
1 vote
0 answers
250 views

I have written a short C++ program that uses the WinRT Geolocation API to print the user's location to the console. Here's a minimal working excerpt: #include <winrt/Windows.Devices.Geolocation.h&...
Nnnes's user avatar
  • 292
0 votes
0 answers
365 views

I was reading the following documentation - https://learn.microsoft.com/en-us/windows/uwp/cpp-and-winrt-apis/weak-references#safely-accessing-the-this-pointer-in-a-class-member-coroutine I understand ...
rsp's user avatar
  • 669
0 votes
0 answers
120 views

I have following code structure: winrt::Windows::Foundation::IAsyncOperationWithProgress<Transfer::TransferStatus, Transfer::TransferProgress> Windows:: TransferClient::TransferAsync(winrt::...
rsp's user avatar
  • 669
0 votes
1 answer
286 views

I am new in UWP/WinRT! I have this code: void MainPage::processButton_Click(winrt::Windows::Foundation::IInspectable const& sender, winrt::Windows::UI::Xaml::RoutedEventArgs const& e) { ...
mans's user avatar
  • 18.4k
0 votes
1 answer
189 views

Is CoreDispatcher.RunIdleAsync the correct method call to replace the apartment_context, resume_background combination in the main_async function below? If this was correct, would it then follow that ...
MRahilly's user avatar
2 votes
1 answer
2k views

The Task I'm trying to make a tool that auto recognizes playback from a non Spotify source and pauses Spotify for the duration of the other audio. I've been using Microsoft's WinRT projection for ...
Wintermute's user avatar
0 votes
0 answers
77 views

I have UWP page and it is using data binding to set content on xaml elements (texts, buttons, image). I am setting the content using async calls (getting content from internet). In the page's c'tor, I ...
rsp's user avatar
  • 669
0 votes
1 answer
123 views

Probably a dumb question (WinRT noob), but, here is goes... The code from "App.xaml.h" is: namespace winrt::Precog::implementation { struct App : AppT<App> { App(); ...
Renato Prado's user avatar
2 votes
0 answers
579 views

After studying std::thread, I know that a function can be run on a different thread than the main thread, which is similar to the concept of winrt::resume_background() which will continue executing ...
Donny Andrian's user avatar
1 vote
1 answer
791 views

What I know is that apartment_context is used to capture UI Thread and return to the UI Thread when it is in the background ThreadPool. So, what is apartment_context actually in WinRT/C++? And how to ...
Donny Andrian's user avatar
0 votes
0 answers
428 views

What causes the try_as() runtime error to occur when calling co_await resume_foreground(Dispatcher()) in the LoadOverallStatisticsAsync() function. Note: using resume_foreground(Dispatcher()) is only ...
Donny Andrian's user avatar
0 votes
0 answers
375 views

I have following code IAsyncOperation<bool> trythiswork() { bool contentFound{ false }; try { auto result = co_await someAsyncFunc(); if (...
rsp's user avatar
  • 669
0 votes
1 answer
775 views

Can you co_await in a C++/WinRT TimerElapsedHandler (or any other lambda in C++/WinRT)? When I try to compile code like this: auto pointerExitedTimerHandler = winrt::TimerElapsedHandler([](const winrt:...
citelao's user avatar
  • 6,382
4 votes
1 answer
296 views

I've got a Windows Store app that's a WinRT Phone/Desktop app (i.e. not a UWP app), targeting Windows 8.1 and up. It's been on the store for several years now, but recently it stopped being able to ...
Kyle Humfeld's user avatar
  • 1,897
1 vote
1 answer
970 views

How do I capture the progress of an IAsyncOperationWithProgress and send it to a ProgressBar? var packageManager = new PackageManager(); var packageUri = new Uri("https://example.com/"); var ...
Vinderguy's user avatar
  • 103
0 votes
1 answer
2k views

How can I wait a specific amount of time without blocking the UI thread? I'm looking for await Task.Delay() equivalent in C++/WinRT. IAsyncAction MainPage::ClickHandler(IInspectable const&, ...
Vinderguy's user avatar
  • 103
1 vote
0 answers
2k views

I am developing a Windows app, that reads values from a characteristic. Its a very simple task, and i managed to write working code. Everything does what it should - but only on my development PC. I ...
Static's user avatar
  • 87
0 votes
0 answers
304 views

I'm using UWP API from C++ via WinRT and want to check if a camera is in use (before trying to access or open it): using namespace winrt; using namespace Windows::Devices::Enumeration; auto cameras =...
Person.Junkie's user avatar
1 vote
1 answer
519 views

I'm getting "the arguments to the parameterized interface are not valid" error when trying to write IDL file for my Windows Runtime Component class. The RunAsync() function returns winrt::Windows::...
smsware's user avatar
  • 489
2 votes
1 answer
100 views

The Windows Runtime heavily uses asynchronous patterns, offloading long(-er) running tasks to the thread pool. I've read through all articles in Threading and async programming, but couldn't find an ...
IInspectable's user avatar
0 votes
1 answer
473 views

I am implementing OCR functionality and need to use softwarebitmap to call the function, in case I have the file path there is no issue with creating a softwarebitmap object, but in some cases there ...
MO1988's user avatar
  • 57
1 vote
1 answer
323 views

I want to dispatch a job to the UI thread, then wait for the result and use it from another thread. Like this, but co_await does not work inside the lambda: dispatcher.RunAsync(CoreDispatcherPriority:...
Rolle's user avatar
  • 3,010
0 votes
2 answers
480 views

I am trying to get current location for WinRT application. But PositionChanged event never gets fired. Any help is highly appreciated ! In Package.appxmanifest, I have enabled Location. My code is ...
Mamta's user avatar
  • 39
0 votes
2 answers
943 views

I have a function to send an e-mail: public async Task<bool> ComposeEmail(string email, string subject) { var emailMessage = new Windows.ApplicationModel.Email.EmailMessage(); emailMessage....
Moha the almighty camel's user avatar
1 vote
2 answers
916 views

Related to this question, I am trying to implement a procedure that uses the WinRT API to set the desktop wallpaper. To mimic the await functionality in C#, I am using TTask.Future (link) as outlined ...
Rohit's user avatar
  • 939
0 votes
0 answers
2k views

I am writing code to consume WinRT API on Windows 10 using C++ WRL (i.e. without using either C++/CX or C++/CLI). I am using GetAppListEntriesAsync() from Package class to get names of UWP ...
Sahil Singh's user avatar
  • 3,887
0 votes
1 answer
578 views

I'm writing a UWP (WinRT) solution that downloads a file from a server and saves to disc while indicating progress. For this purposes I extended the IAsyncOperationWithProgress method. My problem is ...
nico van vuuren's user avatar
1 vote
1 answer
1k views

As I couldn't find any way to peek for data (read data without consuming the buffer) as asked at How to peek StreamSocket for data in UWP apps I'm now trying to make my own "peek" but still no luck. ...
Alex's user avatar
  • 2,639
0 votes
1 answer
72 views

I'm trying to clear the application data when user logout of the application & I found ApplicationData.ClearAsync() which fits my requirement which is similar to IsolatedStorageSettings....
Nikhil Shirgaonkar's user avatar
0 votes
1 answer
32 views

On the App.xaml.cs I have the following code private async void OnCommandsRequested(SettingsPane settingsPane, SettingsPaneCommandsRequestedEventArgs e) { var loader = ResourceLoader....
SurenSaluka's user avatar
  • 1,593
1 vote
0 answers
735 views

I asked a similar question before but the answer there did not satisfy my requirement. Let me explain. I call the following code from a DLL to perform a WinRT operation on Windows 10 from a Windows ...
c00000fd's user avatar
  • 22.8k
0 votes
1 answer
651 views

Is this the correct way to test if a task is done? const concurrency::task<void> voidTask; if (voidTask != m_getInfoAsync) { if (!m_getInfoAsync.is_done()) { return 0; } } ...
Zingam's user avatar
  • 4,674
0 votes
1 answer
203 views

public ObservableCollection<College> Colleges { get; set; } My collection holding College data. public static Task<College> getCollege(string uniqueid) { return Task.Run(()...
Mishael Ogochukwu's user avatar
2 votes
2 answers
310 views

We're providing a library that needs to run code on its own custom threads. Once done, I want these threads to call callbacks (event handlers) through a Dispatcher (System.Windows.Threading.Dispatcher)...
Lars Blumberg's user avatar
1 vote
1 answer
223 views

I'm using a StreamSocketListener to await a connection on a port. I don't want it to listen forever, it must cancel after a specific number of seconds, for which I'm using the following code. ...
Arctic Vowel's user avatar
  • 1,522
1 vote
1 answer
82 views

I had two xaml pages like FirstPage.Xaml and SecondPage.Xaml . On FirstPage.xaml I am generating pdf of all image recods by rendering image control available on my SecondPage.Xaml. What I am doing is ...
Chetan Mahajan's user avatar
3 votes
1 answer
841 views

I'm using a ProgressBar with binding to show the progress when receiving a file from a remote device. <ProgressBar Width="500" Height="50" Value="{Binding ProgressFileReceive}"/> ...
Arctic Vowel's user avatar
  • 1,522
2 votes
0 answers
457 views

I am using VS 2013 for developing my Windows Store app using C#. Here I am invoking a service call to upload image as byte array. See below the codes: public async void SanUploadImage(...
Praveen VR's user avatar
  • 1,584
1 vote
2 answers
55 views

I am having no luck finding the issue of data binding not working. I have two user controls. The user control that uses the obervablecollection works fine. The user control bound to an object doesnt....
JenoS's user avatar
  • 13
0 votes
1 answer
281 views

I ran into an issue when i tried to access the thumbnail image of a file which is in local storage of the app(due to access issues). And the workaround suggesting : 1.copying the file to public ...
Chirag Shah's user avatar
0 votes
1 answer
193 views

I want to launch a Win Form app from a metro style application.I tried Launcher.LaunchFileAsync(IStorageFile) | launchFileAsync(IStorageFile) API but the documentation says as metro application runs ...
AkshayJ's user avatar
  • 769
1 vote
1 answer
70 views

I am developing an gmail client in uwp and want to use gmail api but the want the get messages asynchronous wihout blocking the ui the following method blocks the ui. public async Task<...
rushi's user avatar
  • 37
0 votes
1 answer
806 views

I am trying to use a WebView control to programmatically select <select id="ChooseOption"> <option value="Value1">Option1</option> <option value="Value2" selected>...
Rexfelis's user avatar
1 vote
0 answers
274 views

Basically I want to access the open, modify and store a Printing3D3MFPackage object. It is only available for UWPs. I added this two references to my WPF project: C:\Program Files (x86)\Windows Kits\...
user2799180's user avatar
4 votes
2 answers
1k views

I have a two-page WinRT application, where the first navigates to the second. I want to ask the user in OnNavigatingFrom if he really wants to navigate to the second, via a message box. The navigation ...
Dagiburgi's user avatar
0 votes
2 answers
116 views

I have the following code where if i remove the ´Task.Delay´ it throws an UnhandledException with message "Unspecified error". This exception is not thrown from the actual code and will not be ...
CodeMonkey's user avatar
  • 3,688

1
2 3 4 5