locked
Brokered Component hangs on Windows::Storage::ApplicationData::Current RRS feed

  • Question

  • In transformed my C++ Component into a Brokered C++ in-process Component with an accompanied Proxy. It basically works (what a pain to find out all the details about it!).

    But I cannot call Windows::Storage::ApplicationData::Current in the component anymore, it blocks. Any ideas why?

    Also I was under the impression that brokered components have broader access to the system as they basically run in a different security context? Or is this only true for out-of-process components?

    Friday, November 7, 2014 2:49 PM

Answers

  • Hi pkursawe,

    >> But I cannot call Windows::Storage::ApplicationData::Current in the component anymore, it blocks. Any ideas why?

    I think it is because that the “Windows::Storage::ApplicationData::Current” is an IO related operation.

    Given the cross-process nature of the application model, “Any call that involves I/O of any sort (this includes all file handling and database retrievals) can potentially block the calling UI thread and cause the application to be terminated due to unresponsiveness. In addition, property calls on objects are discouraged in this application architecture for performance reasons”.

    A properly implemented server will normally implement calls made directly from UI threads via the Windows Runtime async pattern.

    For more details, please refer to document Brokered Windows Runtime Components for side-loaded Windows Store apps (sections as following)

    # Windows Runtime async in the server

    # Patterns and performances

    >> Also I was under the impression that brokered components have broader access to the system as they basically run in a different security context? Or is this only true for out-of-process components?

    Based on my understanding, it is because “Each sided-loaded application receives its own instance of an App Broker server (so-called "multi-instancing"). The server code is run inside of a single AppDomain. This allows for having multiple version of libraries run in separate instances” (section # Server instancing and AppDomains).

    Hope it will help.

    Regards,

    Jeffrey


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, November 10, 2014 6:54 AM