Can a UWP program load plugin?

964 views Asked by At

There are two possible situations:

  1. Download a ZIP from internet, unpack it, and load an entry point DLL into your program.

  2. Download a ZIP from internet, unpack it, and load an JavaScript (or Lua, python, whatever) script in it.

1

There are 1 answers

1
Rob Caplan - MSFT On

1) Download a ZIP from internet, unpack it, and load an entry point DLL into your program.

This is not possible. The app cannot load arbitrary binaries from outside of its app package. The app package is read-only and signed, so it cannot be modified once installed.

2) Download a ZIP from internet, unpack it, and load an JavaScript (or Lua, python, whatever) script in it.

This is possible so long as the app includes a script interpreter for the target language. For example, the app can Host the JavaScript Runtime.

Windows 10 Version 1607 (the Anniversary Update) introduced app extensions which allow the app to define an extension model and then others can provide extensions consisting of script (or other files) which the app can find and load and run.