locked
Microsoft C++ exception: Platform::WrongThreadException on Win8 RTM

    Question

  • Hi all,

    My application works well on Release Preview, but Platform::WrongThreadException raised on Win8 RTM when creating an object. The only changes are making base classes derive from DependencyObject. Does anyone have idea about the issue?

    Thanks,


    rob qqq

    Sunday, September 02, 2012 3:39 PM

Answers

  • Yes ... it's known ... how to say decently ... 'feature' ? .. of Windows 8 RTM. Any public non sealed class must derive from other public non sealed class. DependencyObject looks good fot it, BUT actually it's an UI interface and can be created and used in main thread ONLY.
    • Marked as answer by rob qqq Monday, September 03, 2012 3:01 PM
    Sunday, September 02, 2012 4:07 PM

All replies

  • Yes ... it's known ... how to say decently ... 'feature' ? .. of Windows 8 RTM. Any public non sealed class must derive from other public non sealed class. DependencyObject looks good fot it, BUT actually it's an UI interface and can be created and used in main thread ONLY.
    • Marked as answer by rob qqq Monday, September 03, 2012 3:01 PM
    Sunday, September 02, 2012 4:07 PM
  • Hi,

    Would you please provide us some code snippets to reproduce this issue?

    Use a published inheritance hierarchy only to model a XAML user control, and in this scenario we recommend Windows::UI::Xaml::DependencyObject as the ultimate base class.

    Best regards,
    Jesse


    Jesse Jiang [MSFT]
    MSDN Community Support | Feedback to us

    Monday, September 03, 2012 7:36 AM