Questions tagged [winrt-component]

Windows Runtime Component and WinRT Component Libraries are concepts related to language runtime interoperability in Windows Runtime - the modern development platform for Windows and typically used in Windows Store applications. Use this tag to denote any questions related to creating WinRT Components, WinRT Component Libraries and typically to limitations imposed by the rules of creating WinRT Components.

From Wikipedia:

Classes that are compiled to target the WinRT are called WinRT components. They are classes that can be written in any supported language and for any supported platform. The key is the metadata. This metadata makes it possible to interface with the component from any other WinRT language. The runtime requires WinRT components that are built with .NET Framework to use the defined interface types or .NET type interfaces, which automatically map to the first named. Inheritance is as yet not supported in managed WinRT components, except for XAML classes.

Windows Runtime applications can be written using any combinations of the three major runtimes - native, .NET and JS as long as these components are exposed across ABI (application binary interface) following rules such as - public classes need to be sealed, method arguments and return types need to be WinRT types themselves or have direct projection to those (such as Windows.Foundation.Uri with System.Uri or Platform::String and System.String or many of the other basic types having counterparts in different language runtimes).

114 questions
0
votes
0 answers

Can I debug UWP winrt libraries? Does Microsoft provide symbol files for those libraries?

I am running into problems while developing a UWP app. So I was wondering if Windows provides symbol files for winrt components. Particularly I am looking to step into the function LoadComponentWithResourceLocation…
rsp
  • 537
  • 2
  • 13
0
votes
1 answer

C++ compiler error MDM2009 Duplicate type found processing metadata file referencing 2 Windows Component Libraries that both reference another library

My solution structure looks like this: The compiler complains that it finds duplicate types (of every public interface/class) in WCL1.winmd b/c that winmd file already exists in WCL4's bin directory. One problem is that I know absolutely nothing…
jasonxz
  • 139
  • 1
  • 9
0
votes
0 answers

How to return Non-Primitive types from C# winrt component to C++?

I currently have a working project where I am consuming a C# WinRT component in a win32 console app using Registration-free Winrt. Everything is working well, but the problem arises when I try to use Async methods from the C# component. Since Tasks…
Thomas T
  • 59
  • 6
0
votes
0 answers

What is the difference between targeting platform "Win32" and targeting platform "x86" and why aren't they compatible?

I'm building a new solution that has some code already built in. The first project is a Win32 console app and the second is a Windows Runtime Component. I can't make a reference from the win32 project to the WinRT component because they target…
Thomas T
  • 59
  • 6
0
votes
1 answer

The break point in a "WinRT Component DLL" is not hitting while debugging a C# UWP app

I referred a "Windows Runtime component(Universal Windows) C++" project in a "Black App(Universal Windows) C#" project. I set a break point in the "Windows Runtime component(Universal Windows) C++" project. But the break point never hits and i can…
user13431110
0
votes
0 answers

Window Cordova throwing System.IO.FileLoadException: Could not load file or assembly 'System.Runtime.WindowsRuntime...'

I created one sample cordova app using windows platform and added one test plugin , while calling native code through test plugin. I'm getting exception WinRTError: The text associated with this error code could not be…
Deepak Dk
  • 33
  • 8
0
votes
1 answer

Can I program a hold point into an Xbox game that waits for a user's cloud data sync to complete?

Is it possible to program a startup hold into an Xbox game package that waits for the user's cloud saves to sync before continuing? I have an HTML5 game package for which I require save data to be loaded from Xbox Live which is then read from local…
0
votes
0 answers

How do you navigate winrt-rs with Rust

I am attempting to use winrt-rs from: [https://github.com/microsoft/winrt-rs][1] But, I have no experience with winrt and other than the example (minesweeper) there is not a lot of information out there (that I've been able to find). So, I'm trying…
STF_ZBR
  • 617
  • 1
  • 4
  • 19
0
votes
0 answers

C++/WinRT cannot convert argument 1 from 'winrt::com_ptr' to 'winrt::array_view

I'm creating a winrt component for uwp with C++/WinRT. And I defined a runtimeclass like blew, namespace TagLibUWP { [bindable] [default_interface] runtimeclass Picture { Picture(); UInt8[] Data{ get; set; }; …
Cool
  • 23
  • 5
0
votes
1 answer

Cannot add timeout for Windows.Web.Http.HttpClient in JavaScript

I am having immense difficulty figuring out how to set a request timeout using the Windows.Web.HttpClient made available through WinRT. The application I am working on is a JavaScript-type Universal Windows app. "client-side", the JavaScript has…
Joshua Dannemann
  • 2,003
  • 1
  • 14
  • 34
0
votes
1 answer

How can I use the same namespace names in cpp-winrt idl file and a normal/standard cpp class?

The scenario is new and I believe it might be a bug in cpp-winrt module or the vc compiler. The Problem 1. Create a "windows runtime component" using the cpp-winrt template for universal windows. 2. Note the namespace name defined in the idl file.…
0
votes
2 answers

Can I add 'operations' to runtimeclass in a winrt component

In the below code "RuntimeMethod1()" is an operation. It does not take any input parameters and does not give back any result. Is this kind of method allowed in a runtime class? I am getting compilation error for this runtime class. It says…
vikas pachisia
  • 553
  • 5
  • 8
0
votes
1 answer

C++/WinRT Data Incorrect data Marshalling

New to C++/WinRT and haivng some trouble marshalling data when trying to export a single C++ class using C++/WinRT for use in a .Net application. I created a C++ Windows Runtime Component (Windows Universal) in Visual Studio 2017 v15.7.4. This is…
concentriq
  • 359
  • 2
  • 6
  • 16
0
votes
1 answer

WinRT application and looping through a directory

I'm working on my first WinRT app and I do not seem to be able to find any code that would allow me to loop through a directory and get file names that are in that directory? I have found plenty of code to do it in a normal winform, wpf and console…
StealthRT
  • 10,108
  • 40
  • 183
  • 342
0
votes
0 answers

In UWP WinRt, How to insert an Image in an existing PDF page

I'm looking for a solution to insert an images in a PDF file from UWP app. I need to create a new pdf with images stamped on the PDF file (without distorting PDF quality) and export it to the user. Currently i'm printing the document which distorts…