Questions tagged [wrl]

The Windows Runtime C++ Template Library (WRL) is a template library that provides a low-level way to author and use Windows Runtime components.

77 questions
0
votes
1 answer

Parse WRL file to X3D

Well the problem I have is that I need to transform a WRL file to a X3D xml file, but for this I can't find API's that can get code from the file. Well first I manually saw what tags were needed for the X3D file, and then I was trying with open…
Forest
  • 1
0
votes
1 answer

Desktop-bridge and Windows APP SDK - This function must be called from a UI thread

I am trying to implement in-app purchase into my WinRT appliation using desktop bridge and Windows App SDK with WinUI 3. I have simple method: class TransactionService { void buyOrRestore() { .... …
JaSHin
  • 211
  • 2
  • 16
  • 43
0
votes
0 answers

using WRL to access winRT: where do you find the right names to use for the classfactories and classes?

(This is the next iterative question so I can figure out how to use WRL, after this one was answered I believe correctly.) So I'm trying to build up to being able to access Bluetooth LE devices through WinRT via WRL. Continuing in the pattern of a…
NormS
  • 11
  • 2
0
votes
0 answers

Using WRL to access WinRT, I cannot get ActivateInstance to work

I am trying to figure out how to access the WinRT API via WRL in C++, using visual studio 2022 with the latest update 17.1.2. (Background: I've done a fair amount of old-fashioned Windows desktop programming with the Win32 API. However, I now wish…
NormS
  • 11
  • 2
0
votes
1 answer

direct2d quickstart with ID2D1Device3

Is there a version of this tutorial using ID2D1Device3 anywhere? Just swapping out all the pointer types doesn't seem to work https://learn.microsoft.com/en-us/windows/win32/direct2d/direct2d-quickstart-with-device-context?redirectedfrom=MSDN This…
0
votes
0 answers

Adding bitmap to Windows Runtime clipboard

I'm working on a C++ app and I need to be able to add a bitmap to the Windows Runtime clipboard. My options were to use WRL or WinRT, so I chose WRL as it seemed to have (slightly) more documentation. After a bit of fiddling I had some code to add…
JonB
  • 1
0
votes
1 answer

Removing smart pointers

I'm testing some code examples for a CLR project. What would be this code equivalent without using smart pointers? Microsoft::WRL::ComPtr m_d3dDevice; Microsoft::WRL::ComPtr
Milos
  • 1,353
  • 2
  • 18
  • 37
0
votes
1 answer

WRL/C++ Detect multiple mouse buttons pressed simultaneously

I am coding in C++ targeting Windows WRL for UWP, and I need to process mouse input, at times consisting of left/right buttons being pressed simultaneously. My code only receives an event for the first mouse button pressed and the last mouse button…
SamSter
  • 3
  • 1
0
votes
0 answers

how to insert a class including ComPtr value to a container in C++?

this is the class that I want to insert. it has constructor initializes 'm_bitmap'. In fact, Initializing m_bitmap doesn't cause problem. I inserted for detail. #pragma once #include "D2DApp.h" class Image { public: ComPtr
0
votes
1 answer

Reference count of ComPtr returned from a factory method is incremented twice

I declared a COM interface and I have two implementations(classes) of the interface depending on input config. I also have a factory method that checks for input config and appropriately calls NEW on the class. In my class I implement AddRef() and…
CPPAnyDay
  • 3
  • 1
0
votes
1 answer

Use Windows::Foundation namespace interfaces in midl

I want to use interfaces defined in Windows::Foundation in my midl file. For that I wrote following sample code, but it gives compile error: Error MIDL2011 unresolved type declaration : IStringable [ Parameter 'param2' of Procedure…
miradham
  • 2,285
  • 16
  • 26
0
votes
0 answers

How to wait for IAsyncOperation to finish using C++ WRL?

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 applications installed on a system. GetAppListEntriesAsync()…
Sahil Singh
  • 3,352
  • 39
  • 62
0
votes
1 answer

Instantiating a SpatialSurfaceObserver with WRL

I am trying to use the SpatialSurfaceObserver class for Windows Mixed Reality. I was following this: https://developer.microsoft.com/en-us/windows/mixed-reality/spatial_mapping_in_directx However, I have hit a roadblock. The sample states I should…
Jan
  • 113
  • 6
0
votes
2 answers

How to instantiate H264 Encoder on WinRT Store App

I want to be able to encode video frames using Media Foundation IMFTransform for H264 Video Encoding. That's easily doable in Win32, where you can use MFTEnumEx to enumerate the transforms and find the H264 encoder. However, on WinRT (Store Apps), I…
0
votes
0 answers

How to properly wait for asynchronous WinRT callback functions to stop?

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 Store app. The code uses WRL: #include…
c00000fd
  • 20,994
  • 29
  • 177
  • 400