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
2
votes
1 answer

How to activate IWiFiDirectDevice in Win32 Console APP using WRL?

I want to use WinRT API for WiFi Direct from Windows 10 SDK in Win32 Console Application. I know about C++/CX (and even made some progress going that way), but still want to make it work without this extension. My problem is that I can't activate…
Yrchgrchh
  • 169
  • 8
2
votes
0 answers

How to execute the same as the C# async await on c++/WRL

i'm trying the c++/WRL but i'm failing to do the basics, mainly call a async function and obtain the result, for example how to get the IStorageFile returned by the following code: HString path; path.Set(L"C:\\somepath\\somefile.txt"); // Get the…
Nuno
  • 1,910
  • 2
  • 21
  • 33
2
votes
2 answers

Can I use WRL to write a COM server?

Can I use the WRL library in C++ as a replacement for ATL to write a COM component? And if yes, would I be able to use it on older desktop Windows systems, like Windows XP? I'm pretty sure that the answer to the first question is positive as I found…
szx
  • 6,433
  • 6
  • 46
  • 67
2
votes
1 answer

Why is thread pool work item executed on UI thread?

The following code run in a Windows Store app blocks the UI for 30 seconds despite that fact that the loop should run in a separate thread: int seconds(30); // Create a thread pool ComPtr threadPool; HRESULT hr =…
Kit Fisto
  • 4,385
  • 5
  • 26
  • 43
2
votes
1 answer

How to return a build-in winrt component using WRL?

When I create a winrt component using WRL, the problem is that I can only use ABI::Windows::xxx namespace, and I cannot use Windows::UI::Xaml::Media::Imaging namespace in WRL. Then, how to create a build-in winrt component as a return value? //…
user1713871
  • 35
  • 1
  • 4
2
votes
1 answer

Creating WinRT component with static methods in C++ / WRL

I want to create a WinRT component using C++ and WRL (Windows Runtime C++ Template Library) to be consumable in a managed code via C# static method call. int sum = Math.FastAdd(5,6); The implementation which doesn't work for me is below.What can be…
user63289
1
vote
1 answer

What's the difference between using GetAddressOf and & in this DX12 code?

I have the following piece of code from Frank Luna's DX12 book: D3D12_COMMAND_QUEUE_DESC queueDesc = {}; queueDesc.Type = D3D12_COMMAND_LIST_TYPE_DIRECT; queueDesc.Flags = D3D12_COMMAND_QUEUE_FLAG_NONE; ThrowIfFailed(md3dDevice->CreateCommandQueue( …
1
vote
1 answer

How to make the Make method of HString available

I am trying to connect my Surplex VR tracking shoes to my desktop via Wifi but unfortunately Microsoft in their infinite wisdom have depreciated the functionality to setup a simple Wifi hotspot. The have provided some example C++ code that allows…
zig13
  • 13
  • 1
  • 4
1
vote
0 answers

LaunchFullTrustProcessForCurrentAppAsync() not work from Desktop Bridge

I need launch some console app from under my packaged Win32 app using microsoft WRL. But LaunchFullTrustProcessForCurrentAppAsync not work and HRESULT = 0x80010117 in async action completed callback. using namespace Microsoft::WRL; using namespace…
isrepeat
  • 113
  • 5
1
vote
0 answers

WRL/c++: BLE WriteClientCharacteristicConfigurationDescriptorAsync no more works on Win11

Good Morning, I have a native C++ DLL managing BLE (Bluetooth Low Energy) connection who use the internal Bluetooth card of the computer. All works fine on Win10, I never had any problem connecting or reconnecting a device since 2019. Then I pass…
Jiu
  • 11
  • 1
1
vote
1 answer

How to initialize WinRT AudioGraphSettings using WRL ComPtr?

With C++/WinRT the AudioGraphSettings can be easily initialized with its constructor: AudioGraphSettings settings(AudioRenderCategory::Media); I'm having trouble to use it inside my WRL project. Below is my…
gameon67
  • 3,981
  • 5
  • 35
  • 61
1
vote
1 answer

Using winrt::com_ptr with D3D11CreateDevice()?

I've been studying the code from the DirectXTK example project and trying to implement it in a new project. It seems like Microsoft recommends using WinRT in new projects, though, so I decided I would try to switch instances of WRL::ComPtr to…
yingpar
  • 41
  • 4
1
vote
1 answer

Retrieve array through WRL idl

I have asked same question here as well. I am having trouble with making API that would return Array of objects. Here is what I have tried so far. I wrote method that would return array as parameter HRESULT GetMyObjectList([out] UINT32* objCount,…
miradham
  • 2,285
  • 16
  • 26
1
vote
0 answers

Trying to import vrml files to unity

I have the following files And I'm trying to somehow import them without losing the references to each other to unity. I tried through Blender but I can only export one wrl file at a time (I could be wrong), and that causes it to lose the reference…
Xenofonos
  • 119
  • 1
  • 2
  • 14
1
vote
1 answer

Native C++ passing IIterable to WinRT

I have a Win32 app that is using WRL (Windows Runtime Template Library) to access the WinRT API. How do I go about calling a function that takes an IIterable from native C++? My issue is obtaining something that implements IIterable or IVector. As a…
Larry B
  • 194
  • 14