Skip to content

Commit 784f304

Browse files
committed
LoadLibraryExW can be used on UWP from Windows SDK 10.0.22000.0
1 parent 491b2ae commit 784f304

2 files changed

Lines changed: 1 addition & 5 deletions

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
``_ctypes`` module: improve UWP compatibility.
1+
Allow build :mod:`!_ctypes` for Universal Windows Platform.

Modules/_ctypes/callproc.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1418,14 +1418,10 @@ static PyObject *load_library(PyObject *self, PyObject *args)
14181418
return NULL;
14191419

14201420
Py_BEGIN_ALLOW_THREADS
1421-
#ifndef MS_WINDOWS_DESKTOP
1422-
hMod = LoadPackagedLibrary(name, 0);
1423-
#else
14241421
/* bpo-36085: Limit DLL search directories to avoid pre-loading
14251422
* attacks and enable use of the AddDllDirectory function.
14261423
*/
14271424
hMod = LoadLibraryExW(name, NULL, (DWORD)load_flags);
1428-
#endif
14291425
err = hMod ? 0 : GetLastError();
14301426
Py_END_ALLOW_THREADS
14311427

0 commit comments

Comments
 (0)