locked
Access components deployed with driver

    Question

  • I am aware that Metro apps cannot access files that are outside its storage folder. However, I have files (COM component) in \system32 folder that are deployed together with a driver package. Any recommended way to access those files? 

    If this cannot be done, does it mean that driver packages with components required by the App is NOT able to have a Metro style app?

    Thank you.

    Tuesday, December 13, 2011 3:40 AM

Answers

All replies

  • No. A modern application cannot access files outside of its app store folder. If the driver wants to communicate some information to the application it has to do it via the IDeviceIoControl API.
    Tuesday, December 13, 2011 10:25 PM
  • Hi Nar,

    Thanks for your reply. I think there is a thread somewhere in the C++ forum states that Metro Apps can access a COM Dlls from \system32 folder through dynamic linking. However MS recommends the Apps to only links to Dlls that ship with Windows and not 3rd party Dlls. Reason is the 3rd party Dll might not exist in the system when the App launches and the App would like fail to launch in the scenario.

    But I find it is an expected behavior. As the Dll is deployed together with my driver, if the Dll is not around, it means my driver package was not installed, most likely is because the device has never been plugged into the system before. So it is correct for my App not to expose the functionality. As long as the App handles this scenario gracefully, eg. tells user to connect the device to the system etc, I don't see the App has anything wrong in this scenario.

    But since MS does not recommend to dynamically link the Dlls from \system32 folder, I would like to know if there is any "recommended" way to access those files. Or do you mean the driver package should not contain any DLL files?

     

    Thank you.

    Wednesday, December 14, 2011 2:44 AM
  • Angela.

     The only components that can come with the application would be winrt components. You can see the mofx2app sample to see how this possible.

    Best Wishes - Eric

    Wednesday, December 14, 2011 11:37 PM
    Moderator
  • Hi Eric,

    Yes I understand the only components that can be packaged with the Metro Apps would be WinRT components. However, my question refers to those components that are NOT packaged with Metro Apps but package with Driver.

    Regarding loading Dlls from \system32 folder, please refer to this thread 

    http://social.msdn.microsoft.com/Forums/en-US/winappswithnativecode/thread/ffe17af3-69e0-432a-8cfa-4ed6abeb371c/#65fc1383-6099-4364-bdfa-9a0bcb95f197

    My question is related to the last post in this thread. Sorry, I think I should put this link here earlier.

    Thank you.

    Thursday, December 15, 2011 3:44 AM
  • Saturday, May 26, 2012 5:56 AM
    Moderator