8,727 questions
1
vote
0
answers
98
views
Unable to deploy or run Microsoft Push Notifications sample
I'm trying to run the Microsoft Push Notifications sample taken from here client to explore this capability on a Windows app. My setup composed of Azure Notification server, remote app to trigger the ...
1
vote
0
answers
44
views
Cannot create event in Windows C# Runtime Component
I am trying to create an event in Windows Runtime C# Component in this way,
namespace SampleNamespace
{
public sealed class SampleClass
{
private static readonly Lazy<SampleClass>...
1
vote
1
answer
37
views
AudioGraph render device disconnect
I have an AudioGraph
Audio*InputNode.AddOutgoingConnection(AudioDeviceOutputNode)
User pauses audio
leaves computer and Monitor eventually turns off, disconnecting the Sound Output Device
User comes ...
2
votes
2
answers
139
views
Passing a NULL HSTRING to WindowsDuplicateString
Is it OK to pass NULL as the first argument to WindowsDuplicateString? The documentation isn't clear here but calling WindowsCreateString(NULL, 0, &s) is allowed and my tests showed that it sets s ...
1
vote
1
answer
63
views
How to use WinAPi in a C++ WinRT Component?
I'm creating a C++ WinRT runtime component using Visual Studio 2022.
I want to use functions like PeekMessage() to handle a basic message loop. However, I get the following errors:
error C3861: '...
0
votes
0
answers
47
views
How to get the app name from `app_user_model_id` in Python using winsdk / WinRT?
I'm using the winsdk Python package (WinRT bindings) to access media sessions via GlobalSystemMediaTransportControlsSessionManager.
I can successfully get the list of active sessions and their ...
0
votes
0
answers
57
views
StoreContext.GetAppLicenseAsync() returns false for active subscription in MSIX CLI
I'm building a WinRT CLI wrapper in C# that checks if a user owns an active Microsoft Store subscription add-on. This CLI is called from an Electron + React.js app using command-line arguments and ...
0
votes
0
answers
92
views
How to fix errors occurring with Task (.Net) and thread (WPF)?
Achieved Goal:
I am considering using PowerShell to monitor the input video from a USB camera device in real-time.
Problem:
Problem 1: When using the await class to wait for the return value (...
1
vote
0
answers
40
views
Inconsistent UWP DateTimeFormatter output for similar patterns with en-US culture
I'm using Windows.Globalization.DateTimeFormatting.DateTimeFormatter in a UWP app with the culture set to "en-US". I noticed inconsistent formatting between two similar patterns.
Scenario:
...
0
votes
0
answers
46
views
Read audio frames using IBasicAudioEffect
ChatGPT told me:
Your audio effect class IBasicAudioEffect needs to be in separate component because Windows may need to instantiate it in a separate process
How can I callback to my main project ...
1
vote
0
answers
17
views
Should `AudioDeviceInputNode` always have a `Device`?
I create my AudioGraph like this:
var pcm16 = AudioEncodingProperties.CreatePcm((uint)sampleRate, 1, 16);
var audioGraphSettings = new AudioGraphSettings(AudioRenderCategory.Speech)
{
...
0
votes
1
answer
90
views
Modify m3u8 to be recognized as Audio Only
I have an audio only m3u8, which I want to play with AdaptiveMediaSource. tutorial.
The problem (I believe) is that AdaptiveMediaSource is not recognizing it as AudioOnlyPlayback and thus errors when ...
0
votes
0
answers
47
views
The SMTC object created in Python doesn't to display the caller's information
I want to get an SMTC object in Python, and I want to display the caller's information correctly.
First, I tried to use SystemMediaTransportControls.get_for_current_view() to get the SMTC object, but ...
0
votes
1
answer
68
views
Getting current elapsed time of a song currently playing on Windows (Python)
I'm writing a program that requires the information about the song name, author(s) and the current elapsed time of the song. Song name and authors I can get with Windows' API (WinRT, more specifically ...
1
vote
1
answer
71
views
Using WinRT Interface in Python
ref: ISystemMediaTransportControlsInterop
I compiled a dll about ISystemMediaTransportControlsInterop::GetForWindow.
I use IDA to decompile it.
Then I wrote the C-like code as Python.
I believe that I ...
0
votes
1
answer
41
views
Windows runtime component project doesn't generate cpp and h skeletons
In Visual Studio 2022, there is a C++ Windows Runtime Component Project. I can use this, I suppose, to generate a skeleton given a Windows MIDL file. Then I go in and fill in the skeleton with my ...
0
votes
0
answers
75
views
Synchronized procedures execution order
For the last few days I have been unsuccessfully trying to understand the behavior of Delphi and its component for working with BLE. I'm not sure the problem is related to bluetooth or winrt, maybe i'...
0
votes
0
answers
45
views
How can I create a instance of the IIterable_1__IStorageItem enumerator in Delphi?
I'm creating a integration of the IDataTransferManager for Delphi and my goal is to be able to share files with this class.
What needs to be accomplished
In essence, In order to send files to share ...
1
vote
0
answers
68
views
Access violation invoke Certificates_ICertificateQuery.get_Thumbprint
I try WinRT in Delphi. The following code encounter access violation when invoke get_Thumbprint:
program Sample;
uses
System.SysUtils,
System.Classes,
System.Win.WinRT,
System.NetEncoding,
...
0
votes
0
answers
30
views
How can I replace VC2010 default runtime calloc with my own implementation of calloc?
I am trying to replace VC2010 default runtime calloc with my own implementation of calloc
I tried this code but my program still uses the default VC2010 calloc
void* calloc(size_t num, size_t size) {
/...
1
vote
0
answers
64
views
NeighboringFilesQuery no longer works to launch Photos app with neighboring files
In Windows 10 the following code works to launch an image in the Windows Photo App, and provides access to other images in the folder via the NeighboringFilesQuery launch option (meaning you can use ...
0
votes
2
answers
555
views
How can I broadcast a mDNS service instance on windows?
I am looking to use this api (DnssdServiceInstance to broadcast a mDNS service entry. I have the extremely simple test app in c# (blank console app created in Visual Studio):
using Windows.Networking....
-3
votes
1
answer
279
views
How to make windows toast notification unmutable on windows 11
I found out Windows security toast notification are not dismissible mutable, and it seems no other app are able to do so. How does it managed to do that?
There is an old post about this question, but ...
0
votes
0
answers
89
views
XAML element to print
Issue how to print a xaml element
How to access printer and print an xaml element. A page choose from navigation view.
I am using winui-3 and c++20. Created a blank app
The idea is only to print my ...
1
vote
0
answers
67
views
Why do all my 16-bit microphones appear as 32-bit float audio streams?
Why does Windows only give me 32-bit float audio streams even though both my microphones only produce 16-bit audio?
I've tried in WinRT/C# (AudioEncodingProperties) and also Media Foundation/C++ (...
0
votes
0
answers
90
views
Error 8001010E: "The application called an interface that was marshalled for a different thread" in Graphics Capture API
I'm getting the following error when trying to create a screen capture session. I'm using winrt::init_apartment() and co_await, but it’s still failing.
GraphicsCapture.dll!00007FFA84F4FD63: ReturnHr(1)...
0
votes
1
answer
78
views
How to use `TextGetOptions` in `RichEditBox.TextDocument().GetText()` method with WinUI3 C++
I am using WinUI3 on C++ windows app. And I have to pass TextGetOptions to TextDocument().GetText() according to the document and visual studio intellisense.
void MainWindow::TextPreviewKeyDown(...
1
vote
0
answers
320
views
How do I match the locally listed Windows App SDK runtime version to published version?
I would like to know if I have a specific version of the Windows App SDK runtime installed.
When I go to https://learn.microsoft.com/en-us/windows/apps/windows-app-sdk/downloads, I see versions listed ...
0
votes
1
answer
499
views
Install .Net core 6.0.0 and Windows Desktop runtime 6.0.33 using online setup in WiX
I am using WiX to create an installer for my wpf application (I am new to this). I need to detect and install the .Net core 6.0.0 and Windows Desktop runtime 6.0.33 using online setup. Shipping ...
1
vote
1
answer
208
views
How does the Windows Action Center get the name and icon of an application playing media?
I'm developing a library for easy integration of a media player with the action center playback. For this I used the known windows runtime interfaces ISystemMediaTransportControls and ...
1
vote
2
answers
298
views
Win11toast create scriptable notification
I'd like to create a python script that sends me a windows toast notification and gives me two buttons, one to postpone, and one to start a backup (powershell script).
I tried multiple libraries, like ...
0
votes
0
answers
142
views
Can I have a StorageProviderItemProperty with no icons
I am using the Cloud File Api to write a custom OneDrive-like sync client. I have a desire to have custom properties that are available in explorer.
When I register my CFAPI SyncRoot during ...
-1
votes
1
answer
394
views
Class Not Registered when communicating C++/WinRT with C#/WinRT components that return IAsyncOperation<> or IList<>
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 ...
3
votes
1
answer
495
views
Can WindowsGraphicsCapture APIs capture child windows?
I need to capture the image of a specific window and save it as an array. I initially used BitBlt, which worked well except for windows with hardware acceleration (it seems to work for DirectX-...
0
votes
1
answer
423
views
WinUI 3 Application Fails to Run Due to System.ArgumentException in InitializeComponent
I have a winui3 project, and when I run it, it stops and show this
Call stack :
App1.dll!App1.App.InitializeComponent.AnonymousMethod__4_2(object sender, Microsoft.UI.Xaml.UnhandledExceptionEventArgs ...
0
votes
1
answer
216
views
How to do voice echo cancellation?
I am recording user speech using Windows.Media.Audio.AudioDeviceInputNode. The app uses TTS to speak response through speakers. The issue is that the response is captured on microphone and is treated ...
0
votes
0
answers
107
views
Instantiating SqliteConnection throws exception when targetting Windows OS
I'm having an issue using Microsoft.Data.Sqlite in a .NET console app that targets Windows OS.
.NET 8
Console App
Targeting Windows OS v10.0.19041.0
Microsoft.Data.Sqlite 8.06
The following code
...
0
votes
0
answers
103
views
What is the URI deeplink to Xbox Library's "Manage Updates" screen in UWP? ex: 'library://path/to/manage/updates'
In my uwp app (xbox, webview2, react) I can deep link to (open) the Xbox's Library app using the library:// Protocol URI (found here) like this:
await Windows.System.Launcher.LaunchUriAsync(new Uri(&...
0
votes
1
answer
263
views
How to Resolve "The type or namespace name 'Windows' could not be found" Error in Unity for UWP/HoloLens Development?
Background:
I am developing an application for HoloLens 2 using Unity 2022.3.30f1, and I need to use the `Windows. Media` API to capture depth and image data from the HoloLens Research Mode. My ...
1
vote
1
answer
233
views
.NET MAUI Windows 9.0 Preview 5 on Windows/WinUI 3 crashes when using SwapChainPanel via SkiaSharp after a while
The Problem
We are using .NET MAUI 9.0 Preview 5, .NET SDK 9.0 Preview 5, and SkiaSharp 3.0 Preview 3.1 in our game, GnollHack. SKGLView of SkiaSharp uses SwapChainPanel to render GPU accelerated ...
1
vote
0
answers
89
views
Windows AudioGraph not consuming AudioFrames when there is no physical device in the graph
I am using the Windows AudioGraph APIs to generate, and conditionally mix with an input device, app generated audio and write it to an output file.
The graph is an AudioFrameInputNode and zero or more ...
1
vote
1
answer
291
views
How to receive Activated and Dismissed messages for Windows Toast notifications
I'm making a library for Delphi to implement Windows 11 toast notifications easier using the interfaces from Winapi.UI.Notifications.
I want to to post custom notifications to the action center using ...
-1
votes
1
answer
227
views
Issue while using .NET Standard 2.0 library that uses Store API in WPF .NET Core 8.0 type of project
Hi fellow MSFT developers,
I have created a sample project for your convenience, available at
https://github.com/JiyaDesai-FandCo/WpfAppdotnet8
We have existing code in Library (of type .NET Standard ...
1
vote
1
answer
149
views
Rotating image captured from Webcam in WinUI3
I'm trying to capture images from a Webcam in a WinUI3 app.
After some trial and error, I finally managed to do so via MediaFrameReader.
Now I've got the captured images as SoftwareBitmap and as I'd ...
2
votes
0
answers
471
views
To build a sync engine desktop application, cfapi and windows.storage.provider are important. In what scenario which should be used?
I am building a windows cloud sync engine application using cloud filter api. To start with the development, i am planned to register the Sync root using CfRegisterSyncRoot but the sample provided by ...
0
votes
0
answers
129
views
Nullable strings in Midl 3.0
I am working on a Windows Runtime <-> Rust integration through windows-rs. The interface between the two languages is defined trough an .idl (Midl 3.0) file.
I am trying to declare a parameter ...
0
votes
1
answer
182
views
Print PDF or XPS with WinRT Print API
I decided to modernize our product and replace the old printer code with WINRT printing. In order to send something to the printer you need to call
printDoc.AddPage(printElement);
https://learn....
1
vote
0
answers
172
views
Control, created with C++/WinRT Component, doesn't appear in C#/WinRT App
I want to use C++ as part of WinUI3.
I'm facing an issue where the C# component displays properly, but the C++ component doesn't.
Result
Therefore, I followed a Microsoft article to implement a C++/...
0
votes
1
answer
64
views
self-contained WinRT IBackgroundTask
I followed Microsoft documentation and created working WinRT IBackgroundTask that runs on dotnet8. Now I want to integrate it with my app which is deployed as self-contained and it doesn't require ...
2
votes
1
answer
944
views
Use C++/WinRT component (but really any WinRT component) in WPF .NET 6
I would like to write a WPF application, but build it on modern frameworks as much as possible, including for example .NET 6 or maybe even higher.
I have some C++ code that I want to call, and I like ...