Hi,

On Tue, Apr 1, 2014 at 9:04 AM, Chris Barker <chris.bar...@noaa.gov> wrote:
> On Mon, Mar 31, 2014 at 3:09 PM, Matthew Brett <matthew.br...@gmail.com>
> wrote:
>>
>> I am hopelessly lost here, but it looks as though Python extension
>> modules get loaded via
>>
>> hDLL = LoadLibraryEx(pathname, NULL,
>>                                  LOAD_WITH_ALTERED_SEARCH_PATH);
>>
>> See:
>> http://hg.python.org/cpython/file/3a1db0d2747e/Python/dynload_win.c#l195
>>
>> I think this means that the first directory on the search path is
>> indeed the path containing the extension module:
>>
>>
>> http://msdn.microsoft.com/en-us/library/windows/desktop/ms682586(v=vs.85).aspx#alternate_search_order_for_desktop_applications
>
>
> yup -- that seems to be what it says...
>
>> So I'm guessing that it would not work putting DLLs into the 'DLLs'
>> directory - unless the extension modules went in there too.
>
>
> and yet there is a bunch of stuff there, so something is going on...It looks
> like my Windows box is down at the moment, but I _think_ there are a bunch
> of dependency dlls in there -- and not the extensions themselves.

I'm guessing that the LOAD_WITH_ALTERED_SEARCH_PATH means that a DLL loaded via:

hDLL = LoadLibraryEx(pathname, NULL,  LOAD_WITH_ALTERED_SEARCH_PATH);

will in turn (by default) search for its dependent DLLs in their own
directory.    Or maybe in the directory of the first DLL to be loaded
with LOAD_WITH_ALTERED_SEARCH_PATH, damned if I can follow the
documentation.  Looking forward to doing my tax return after this.

But - anyway - that means that any extensions in the DLLs directory
will get their dependencies from the DLLs directory, but that is only
true for extensions in that directory.

Cheers,

Matthew
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to