This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author paul.moore
Recipients eryksun, jkloth, paul.moore, steve.dower, tim.golden, zach.ware
Date 2021-01-25.19:02:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1611601336.71.0.34252217072.issue43022@roundup.psfhosted.org>
In-reply-to
Content
Thinking about what you said, "the loader waits to load it until first accessed via GetProcAddress()" did you mean by that, that the following code should work:

    h = LoadLibraryW(L"some/path/to/python3.dll")
    py_main = GetProcAddress(h, "Py_Main")

(with some/path/to/python39.dll being loaded on the second line)? Because if so, then that's what doesn't work for me.

Or are you suggesting that I do

    AddDllDirectoryW(L"some/path/to");
    h = LoadLibraryW(L"python3.dll");
    py_main = GetProcAddress(h, "Py_Main");


Because I didn't think to try that - and I'm not 100% sure how I'd have to do stuff like LOAD_LIBRARY_SEARCH_USER_DIRS and/or SetDefaultDllDirectories to make that work. I find the Microsoft docs on all of this really complex and hard to follow if you're a non-expert :-(
History
Date User Action Args
2021-01-25 19:02:16paul.mooresetrecipients: + paul.moore, tim.golden, jkloth, zach.ware, eryksun, steve.dower
2021-01-25 19:02:16paul.mooresetmessageid: <1611601336.71.0.34252217072.issue43022@roundup.psfhosted.org>
2021-01-25 19:02:16paul.moorelinkissue43022 messages
2021-01-25 19:02:16paul.moorecreate