Dynamic code execution on WinRT in Windows 8 (either C++ or .NET/C#)?

后端 未结 9 1365
谎友^
谎友^ 2021-01-02 04:12

Does WinRT under windows 8 metro allow you to dynamically load and execute code? For example, is it possible to download a dll into memory or to isolated storage and run cod

9条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-02 04:32

    In general, you cannot load and execute new code in a Metro style app. What you can access is what you ship with the app.

    LoadLibrary and GetProcAddress are missing so C++ can't dynamically load code.
    Likewise, C# cannot because there is no Assembly.Load.
    JavaScript can, but only in the web container and not in the fuller trust portions of the code.

    The reason for all this is that the store's security/malware protection would be moot if an app could just load and run arbitrary code.

提交回复
热议问题