locked
Custom Interfaces

    Question

  • With WinRT what is the proper way to declare an interface for a WinRT object?  Do I continue creating proxy servers and declare interfaces through MIDL or is there some fancy new way?  Are custom interfaces even allowed in WinRT?  If there  is an obvious online resource on this subject with respect to WinRT and not C++/CX I would gladly appreciate it!
    Monday, July 16, 2012 6:53 PM

Answers

  • My apologies if the answer to my question was an obvious one.  I had spent a couple of days looking at stuff for the first time and I think I had the sequencing a little out of order.  I believe the answer to my question is that I can use standard COM if I want to but it is ugly, I can use WRL if I want a fresh approach to low-level COM (which I do), and I can use C++/CX for a high-level approach to the new Windows Runtime architecture.

    I guess my major point of confusion was I was under the impression that WinRT itself introduced new language extensions when in fact it is only C++/CX that has done so and WinRT is only an API.  I am assuming here that if I use WRL I will use MIDL to create new interfaces and I will follow this procedure for C++/CX.  I am still unclear as to what the restrictions are on custom implementations with respect to Metro Apps as I've read in a few places restrictions to call out do exist--the restrictions having not been clearly defined.

    • Marked as answer by Xittenn Tuesday, July 17, 2012 1:54 AM
    Monday, July 16, 2012 7:59 PM
  • First, welcome and glad to have you! Here are some great resources to help you get up to speed on Metro style app development with C++. The simplest path is using C++/CX which the VS project templates enable by default. There are some new rules regarding the APIs you can call in a Metro style app as well as types that can be used at the ABI boundary. These selected talks should cover most of the surface area to help you identify what you may want to explore in more depth. If there is a particular restriction you run across that has not been documented and want more details on, please post that question in this forum. There has been a good number of issues already discussed or answered, so I would suggest searching the forums and the Dev Center first.

    From //build/

    Using the Windows Runtime from C++
    TOOL-532T
    Speakers: Herb Sutter

    Under the covers with C++ for Metro style apps
    TOOL-690C
    Speakers: Deon Brewis

    Tips and tricks for developing Metro style apps using C++
    TOOL-845T
    Speakers: Tarek Madkour

    A recent event specific to Metro style apps with C++ that has a good number of recorded talks
    Developing Windows 8 Metro style apps with C++ sessions now online


    David Lamb

    • Marked as answer by Xittenn Tuesday, July 17, 2012 1:54 AM
    Monday, July 16, 2012 9:08 PM
    Moderator

All replies

  • My apologies if the answer to my question was an obvious one.  I had spent a couple of days looking at stuff for the first time and I think I had the sequencing a little out of order.  I believe the answer to my question is that I can use standard COM if I want to but it is ugly, I can use WRL if I want a fresh approach to low-level COM (which I do), and I can use C++/CX for a high-level approach to the new Windows Runtime architecture.

    I guess my major point of confusion was I was under the impression that WinRT itself introduced new language extensions when in fact it is only C++/CX that has done so and WinRT is only an API.  I am assuming here that if I use WRL I will use MIDL to create new interfaces and I will follow this procedure for C++/CX.  I am still unclear as to what the restrictions are on custom implementations with respect to Metro Apps as I've read in a few places restrictions to call out do exist--the restrictions having not been clearly defined.

    • Marked as answer by Xittenn Tuesday, July 17, 2012 1:54 AM
    Monday, July 16, 2012 7:59 PM
  • First, welcome and glad to have you! Here are some great resources to help you get up to speed on Metro style app development with C++. The simplest path is using C++/CX which the VS project templates enable by default. There are some new rules regarding the APIs you can call in a Metro style app as well as types that can be used at the ABI boundary. These selected talks should cover most of the surface area to help you identify what you may want to explore in more depth. If there is a particular restriction you run across that has not been documented and want more details on, please post that question in this forum. There has been a good number of issues already discussed or answered, so I would suggest searching the forums and the Dev Center first.

    From //build/

    Using the Windows Runtime from C++
    TOOL-532T
    Speakers: Herb Sutter

    Under the covers with C++ for Metro style apps
    TOOL-690C
    Speakers: Deon Brewis

    Tips and tricks for developing Metro style apps using C++
    TOOL-845T
    Speakers: Tarek Madkour

    A recent event specific to Metro style apps with C++ that has a good number of recorded talks
    Developing Windows 8 Metro style apps with C++ sessions now online


    David Lamb

    • Marked as answer by Xittenn Tuesday, July 17, 2012 1:54 AM
    Monday, July 16, 2012 9:08 PM
    Moderator