locked
Agile Pointer Warning in Release Build

    Question

  • Hi Everyone,

    In the release version of my project I am getting a warning that I can't figure out and I can't find any information concerning it:

    ViewProvider.h(22): warning C4451: 'ViewProvider::m_window' : Usage of ref class 'Windows::UI::Core::CoreWindow' inside this context can lead to invalid marshaling of object across contexts (Main.cpp)

    1> Consider using 'Platform::Agile<Windows::UI::Core::CoreWindow>' instead

    The class declaration looks like this:

    ref class ViewProvider sealed : public Windows::ApplicationModel::Core::IFrameworkView
    {
    public:
    	virtual void Initialize(Windows::ApplicationModel::Core::CoreApplicationView^ applicationView);
        void Initialize(Windows::UI::Core::CoreWindow^ window, Windows::ApplicationModel::Core::CoreApplicationView^ applicationView);
        virtual void SetWindow(Windows::UI::Core::CoreWindow^ window);
        virtual void Load(Platform::String^ entryPoint);
        virtual void Run();
        virtual void Uninitialize();
    	ViewProvider();
    	
    private:
        ActivationEntryPoint m_activationEntryPoint;
        Windows::UI::Core::CoreWindow^ m_window;
        Windows::ApplicationModel::Core::CoreApplicationView^ m_applicationView;
    };

    Platform::Agile does not exist and so I don't know what I am supposed to do to fix this warning. Has anyone seen/fixed this?

    Thanks!

    Wednesday, May 23, 2012 11:41 PM

Answers

  • Hi TheMCP,

    This is a known problem. I believe you can safely ignore the warning.

    --Rob

    • Marked as answer by TheMCP Thursday, May 24, 2012 3:24 PM
    Thursday, May 24, 2012 2:28 AM
    Owner

All replies

  • Hi TheMCP,

    This is a known problem. I believe you can safely ignore the warning.

    --Rob

    • Marked as answer by TheMCP Thursday, May 24, 2012 3:24 PM
    Thursday, May 24, 2012 2:28 AM
    Owner
  • Cool, thanks very much for (your usual) quick response!

    Thursday, May 24, 2012 3:24 PM