mardi 13 décembre 2011 03:40
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?
Toutes les réponses
mardi 13 décembre 2011 22:25No. 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.
- Marqué comme réponse Eric Hanson-MSFTMicrosoft Employee, Moderator samedi 26 mai 2012 05:55
mercredi 14 décembre 2011 02:44
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?
mercredi 14 décembre 2011 23:37Modérateur
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
jeudi 15 décembre 2011 03:44
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
My question is related to the last post in this thread. Sorry, I think I should put this link here earlier.
samedi 26 mai 2012 05:56Modérateur
This thread now has two answers. They are correct.
- Marqué comme réponse Eric Hanson-MSFTMicrosoft Employee, Moderator samedi 26 mai 2012 05:56