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

Open UsbDevice using C++ WRL - ERROR_INVALID_HANDLE

I'm trying to obtain a Windows::Devices::Usb::UsbDevice object referencing a specific USB device I have in order to pass it to a 3rd party plugin. Due to project limitations, I cannot use the C++/CX extension. After looking at countless threads,…
rmobis
  • 26,129
  • 8
  • 64
  • 65
7
votes
2 answers

ComPtr vs CComPtr, As vs QueryInterface

I just want know what exact difference between ComPtr and CComPtr, and whether ComPtr::As() is analogue of CComPtr::QueryInterface()? I read documentation of both, but there is no clear answer to the question...
Olga Pshenichnikova
  • 1,509
  • 4
  • 22
  • 47
7
votes
0 answers

Using ATL/COM objects in UWP apps

My company has many old projects that are written in vb6. We have some reusable software components which are written in ATL/C++. We're now considering to rewrite our app with UWP but it seems that UWP apps do not support the old COM technology. I…
Jason Chueh
  • 361
  • 1
  • 7
7
votes
0 answers

Using WRL for C++/CX functions - linker error

Possible Duplicate: What is an undefined reference/unresolved external symbol error and how do I fix it? I'm trying to make WinRT library that is not using CX extension. I need to get name of package, roaming data folder, etc.. I wrote some…
Lipov3cz3k
  • 454
  • 4
  • 14
6
votes
1 answer

Out-of-process Classic COM EXE using Windows Runtime Template Library (WRL)

I have followed the example here: http://msdn.microsoft.com/en-us/library/vstudio/jj822931.aspx to create an In-proc Classic COM DLL using Windows Runtime Template Library (WRL). I am also able to modify to code to run the DLL as COM surrogate…
nikoniko
  • 833
  • 2
  • 11
  • 22
5
votes
3 answers

Update visual studio 2017, now getting compile error C7510: 'Callback': use of dependent template name must be prefixed with 'template'

I tried compiling my project as usual after the update (15.8.0). I set showincludes to yes to figure out where the error originates, but it's all system code. Starting with stdafx.cpp, it goes through all the includes and errors out: 1>Note:…
Tbone281
  • 91
  • 1
  • 9
4
votes
2 answers

WinRT c++: get package family name

On C# one can use the following code: Package.Current.Id.FamilyName I could not find anywhere information on how to do this using C++. It seems I need to use WRL for this. I use Microsoft Visual C++ 2015.
Alexander Dyagilev
  • 1,139
  • 1
  • 15
  • 43
4
votes
0 answers

WinRT WRL WinRtClassicComMix and IAsyncOperation fails

I have a C++ WinRT component which is a WinRtClassicComMix. I want to define a method which returns a custom class through an IAsyncOperation to the calling C# or WinJS code. All is working fine when an IAsyncAction is used with no return value,…
Rene Schulte
  • 2,962
  • 1
  • 19
  • 26
4
votes
1 answer

Loading WinRT component without referencing the DLL/assembly

I have been experimenting with WinRT components using C#, C++/CX and WRL in C++. So far I managed to do everything I tried even if compared to COM some stuff have changed and are either confusing or frustrating. The last thing I'm trying and that so…
user1466502
  • 101
  • 2
  • 7
3
votes
1 answer

C++ Extend Windows WRL component class not working

I have a class ClassA implement interface IFooBar like below class ClassA : public Microsoft::WRL::RuntimeClass { public: virtual HRESULT RuntimeClassInitialize(ParamsForClassA); } Now I want to write a ClassB inherent ClassA and…
Allan Jiang
  • 11,063
  • 27
  • 104
  • 165
2
votes
1 answer

Implementing ABI::Windows::Foundation::Collections::IVector gives - Error C2338 This interface instance has not been specialized by MIDL

I'm trying to implement IVector in a win32 app. Compiler always gives me this MIDL assert error which I can not get rid of. Here is sample class - #include #include #include #include…
2
votes
0 answers

'Microsoft::WRL::FtmBase' class has virtual functions, but destructor is not virtual

I'm getting this compile error C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\winrt\wrl\implements.h(1453): warning C4265: 'Microsoft::WRL::FtmBase': class has virtual functions, but destructor is not virtual after adding…
bysreg
  • 793
  • 1
  • 9
  • 30
2
votes
0 answers

Cannot create D2D1 device

I am trying to follow Microsoft's official tutorial for DirectX and XAML interop in order to make a C++ runtime library for image primitive drawing for a UWP application. However, the code is riddled with bugs and typos. I have managed to adapt…
Igor Ševo
  • 5,459
  • 3
  • 35
  • 80
2
votes
1 answer

How to initialize an instance of IVectorView for C++/WRL?

I'm trying to call get_Skus() method of IStoreProduct to retrieve its Skus property using C++/WRL (not C++/CX) and I can't find any suitable code examples. That method is defined as such (as I get it from the header file in Visual Studio): virtual…
c00000fd
  • 20,994
  • 29
  • 177
  • 400
2
votes
1 answer

How to activate an instance of a ref class

Say I have this class: public ref class Page1 sealed : Windows::UI::Xaml::Controls::Page {}; I can activate an instance of this class like this: auto page = ref new Page1(); But how would I do that in raw C++? I have tried this but it doesn't…
Decade Moon
  • 32,968
  • 8
  • 81
  • 101
1
2 3 4 5 6