0

I'm really curious is here a way to escape double codebase to support Windows Desktop and WinRT component. Currently, using existing COM objects is blocked in metro style applications. Then, what would be the best way to organize the same functionality for two modes? Can I use WinRT components in Desktop mode?

Let's say I have a legacy calculator server for Windows desktop, implementing an interface ICalculator with a methods Add and Multiply. Is there a legal way to support one server engine for it, besides TCP connection, or I should totally divide these both worlds and supply two sets of engines? What if my server is quite heavy to distribute in two modes?

Anton K
  • 4,658
  • 2
  • 47
  • 60
  • This is why PCL exists, providing support for Portable Class Libraries. Which can be used in either a WinRT or a desktop app. The intersection of capabilities between WinRT and the desktop version of .NET is not a very large one so you'll have to deal with the restrictions. – Hans Passant Jun 01 '13 at 14:06
  • @HansPassant is right, PCL's are the way to share you codebase between the two platforms. But when you say RTComponent, do you mean the project type 'Windows Runtime Component'? or a project which will run on WinRT? – dougajmcdonald Jun 03 '13 at 08:01
  • @dougajmcdonald: 'Windows Runtime Component' or 'A project which will run on WinRT'. What's the difference in these two? Windows Runtime Component runs on WinRT, doesn't it? – Anton K Jun 04 '13 at 01:48
  • @AntonK I was talking about the distinction between the VS project type 'Windows Runtime Component' which allows you to write C# code and project it into WinJS. As opposed to a project of say 'Windows Store Application' (which will run on RT), or a portable class library (which will run on RT). – dougajmcdonald Jun 04 '13 at 07:02

1 Answers1

0

There is no way to communicate between WinRT and Desktop modes: MSDN 1 and MSDN 2

The only answer with some hope, looks like the one, which cannot be certified.

Community
  • 1
  • 1
Anton K
  • 4,658
  • 2
  • 47
  • 60