Brokered components were introduced at BUILD 2014 and allows us to make use of legacy DLLs without much problems (heh). The VS templates came out aprox a month after BUILD, and before that there was a fair deal of manual work involved, I tried it and it was a pain. However, the templates make it rather easy, or easier.
Here is a step by step video with some rambling, which is what you get when your record demos at midnight after a week with very little sleep.
The best example I could come to think of, and I don’t even know if this is the best example, is simply using the file watcher and output changes to a directory in the Windows Store App.
The way it works is that the brokered component allows us to use any DLL (more or less), which means that the Store app won’t be able to use it directly as there is a missmatch between the platforms they are built for.
This is solved by creating a proxy that in turn can reference the component and allow the Store application to call the component.
The Store application has to add an extension in the manifest and register the proxy DLL as well as classes that it will be using, and the DLL has to be registered.
Install VS extension
Create Store app
<No image you should know how to do this>
Create Brokered Component – do magic in it
Create Proxy – add reference to component (right click, properties, common properties, add reference)
Add reference to proxy from Store app
Add Extension in Store manifest file, register class and add path to Proxy DLL
Run regsvr32 from elevated prompt and path to proxy DLL
Run and have fun.
Some more links:
Brokered components in detail
BUILD video demo
Detailed step by step by awesome Harry
Harry Pierson on Twitter