Coffeehouse Post

Single Post Permalink

View Thread: too bad ref class not supported in win32 c++ apps
  • User profile image

    I am guessing that a ref class in c++ is a language syntax wrapper around shared_ptr. I have to guess because C++/CX is limited to winRT apps, so I cannot experiment with ref class in a win32 app.

    I asked here

    "...A ref class (as in C++/CX) requires WinRT and WinRT is only present in Win8. So no way that will work on Win7, WinRT is not COM despite having a lot of things in common. ..."

    "... It does implement automatic reference counting but there's more than that. For example such classes can be instantiated by non C++ code, this is done through a "activation factory" which resembles the class factory found in COM but it's different. If you try to create a dll that contains C++/CX classes you'll see that it depends on vccorlib.dll and that in turn depends on WinRT specific functions like RoInitialize, RoGetActivationFactory etc. ..."

    WinRT looks to be a big improvement over win32. And CX improves on C++.  Too bad I can't use it from windows 7 and desktop apps in general.