Answered by:
can I create a out of process WinRT component through C++/CX?

Question
-
I see the sample using WRL create out of process WINRT component, but WRL looks too heavy for me.
Does anyone know how to create a out of porcess WinRT component throw c++/CX?
Thanks a lot!
Friday, February 22, 2013 10:23 AM
Answers
-
WRL and C++/Cx are tools which do different things. C++/Cx doesn't provide any help in defining the interfaces needed for an out-of-proc component. WRL does provide help with that.
--Rob
- Marked as answer by XXXing Tuesday, February 26, 2013 4:00 AM
Monday, February 25, 2013 11:00 PMModerator
All replies
-
Hi XXXing,
WRL is the library provided to help write COM component. C++/CX won't help you here.
--Rob
- Proposed as answer by Jesse Jiang Monday, February 25, 2013 2:50 AM
Saturday, February 23, 2013 1:18 AMModerator -
Hi XXXing,
WRL is the library provided to help write COM component. C++/CX won't help you here.
--Rob
Saturday, February 23, 2013 1:19 AMModerator -
Sorry, I can not agree with you....
http://www.codeproject.com/Articles/499374/Building-WinRT-components-with-Cplusplus-CX
I believe C++/CX can build WinRT component , the only thing is that all the sample I see is in process component, however I need a out-of-process component, that's the point...
Monday, February 25, 2013 3:06 AM -
That article is about building Windows Runtime Components (which C++/Cx is designed for), not general purpose COM components (which it is not).
--Rob
Monday, February 25, 2013 3:12 AMModerator -
Rob, the OP seems to be referring to an MSDN article which shows how to write an out-of-proc WinRT component using WRL (and an example client C# app that consumes it). It may just be a case of poor article wording there though.Monday, February 25, 2013 4:09 AM
-
Rob,
This is the article I am referring to :
http://code.msdn.microsoft.com/windowsapps/Creating-a-Windows-Runtime-ed84af9d
It's titled "Creating a Windows Runtime EXE component with C++ sample"
And described as "This sample shows how to create an out-of-process EXE component in Microsoft Visual C++ that's used in C++/CX, JavaScript, and C# client code."
Monday, February 25, 2013 4:13 AM -
Hi Nishant,
The Creating a Windows Runtime EXE component with C++ sample demonstrates using WRL to create the out-of-proc server component. This is the model that XXXing needs to use, but he is looking for a way to avoid WRL (or defining the COM interfaces without a wrapper).
The article XXXing quotes in this thread is about creating an in-proc Windows Runtime Component. It doesn't use WRL, but isn't relevant to the out-of-proc scenario.
--Rob
Monday, February 25, 2013 6:02 AMModerator -
hi Rob,
Do you mean using WRL is the only way to create out-of-proc WinRT component?
My understanding is WRL & C++/CX are tools, the only difference is one work in lower level and another is work in higher, they should archive the same goal...
Monday, February 25, 2013 10:12 AM -
And I have further question with this sample: Creating a Windows Runtime EXE component with C++ sample
I can download the code and build & run, however, I can not find a project template for this. Which project template should be used for the server project? In another words, How can I build this project from scratch if no project template?
The proxy project seems been generated by code, how to do this?
Monday, February 25, 2013 12:31 PM -
Hey Rob,
I guess the OP is waiting to get a confirmation for this : "C++/CX cannot be used to create an out of proc component"
And based on your latest response, that seems to be confirmed.
Monday, February 25, 2013 2:33 PM -
There are no built in templates for WRL projects. There seems to be a client-project template that you can get off the gallery (although I am not sure how up-to-date that is).Monday, February 25, 2013 2:33 PM
-
WRL and C++/Cx are tools which do different things. C++/Cx doesn't provide any help in defining the interfaces needed for an out-of-proc component. WRL does provide help with that.
--Rob
- Marked as answer by XXXing Tuesday, February 26, 2013 4:00 AM
Monday, February 25, 2013 11:00 PMModerator -
Thanks, Rob
So I must use WRL if I need a out-of-proc component.
Tuesday, February 26, 2013 4:01 AM