Controlling load location of python22.dll when using Py_Initialize()
quadric at primenet.com
quadric at primenet.com
Wed Feb 19 00:03:45 EST 2003
Hi again,
Further to my question below, it seems my thinking is a bit screwed up here
:-(.
I am statically linking with python22.lib which is an import/export library
representing
python22.dll. I am not using LoadLibrary() and therefore am relinquishing
control of the
DLL search mechanism to Windows OS. Is this correct? Py_Initialize() is
simply a call
to a function that exists in a DLL that the OS should have already
loaded. Correct?
If so, and as I understand it, the Windows OS will always first search the
calling applications
directory and then search along the PATH. Is this correct?
If so, then I must locate python22.dll in applications directory.
Is this correct?
Thanks again for the help.
At 09:39 PM 2/18/2003 -0700, you wrote:
>Hi,
>
>I have embedded Python in an application and would like to control the
>location from
>whence the application loads python22.dll upon calling
>Py_Initialize(). I don't want to
>rely on the PATH variable as Python is already installed on this machine
>and I want the
>application to load the application specific version of python22.dll. I
>have tried using
>PYTHONPATH and PYTHONHOME but to no avail. It seems that the applications
>directory
>and directories along the PATH are the only ones searched.
>
>I have traced through the source for Py_Initialize() and it seems that the
>Windows Registry
>is searched for certain keys and the directories along the PATH. I am not
>opposed to using
>the applications directory but would prefer to control the load location
>myself.
>
>Can someone tell me how to tell Py_Initialize() where to look for
>python22.dll?
>
>
>Thanks for your help.
>
>
>--
>http://mail.python.org/mailman/listinfo/python-list
>
More information about the Python-list
mailing list