Greetings community,

I am trying to load Python dynamic libraries to interface Python from an
application that I am trying to develop. The Python version I am trying to
load is the one available in the Microsoft AppStore. Now when I use the “
LoadLibraryExW” (which is a WIN32 API:
https://learn.microsoft.com/en-us/windows/win32/api/libloaderapi/nf-libloaderapi-loadlibraryexw)
function
to load the path. It throws an error having error code 5 implicating that
access is denied. It could work if I forcefully take ownership (which is
initially with “TrustedInstaller”) and alter the permissions of the file to
allow full control to the current user or permit administrator access, but
this does not seem to be an authentic or secure workaround for the same.

This is the path to the DLL I am trying to load.

C:\Program Files\WindowsApps
\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\python39.dll




In order to allow interfacing I also tried building CPython from the public
repository (https://github.com/python/cpython) but I could notice that
directory
structure of CPython code built on Windows is different from the one seen
for Microsoft Appstore installation. I want to understand how the Appstore
version of Python is built and how is it different from the process adopted
by the official website’s Python. So, is there a different way to build
Python for Windows AppStore? If yes, can you please point me to the webpage
which has instructions.


Thanks and best regards,
Piyush Dubey
_______________________________________________
python-win32 mailing list
python-win32@python.org
https://mail.python.org/mailman/listinfo/python-win32

Reply via email to