[python-win32] (no subject)

Thomas Heller theller at python.net
Tue Jun 21 19:15:57 CEST 2005


"Schollnick, Benjamin" <Benjamin.Schollnick at xerox.com> writes:

> Folks,
>  
>     I have run into a small problem, that I believe is a Win32net
> issue...
>  
>     My application has been running (via py2exe) on XP systems without
> a problem....  Just recently someone tried to use the application on a
> Windows 2000 system, and received:
>  
> * The procedure entry point LsaLookupNames2 cound not be located in the
> dyanmic link library ADVAPI32.dll.
>  
>     I quickly checked on Google, and found this:
...
>  
> This looks like the win32net Python extension requires the
> LsaLookupNames2 function in ADVAPI32, but this is only available in
> WinXP and Win2003 Server, according to MSDN, preventing to use
> win32net on win2k.  You should report this to Mark Hammond, and maybe
> use a later version of pywin32 for now.
>  
>  Has anyone else seen this problem?
>  
> I am running the latest pywin32 (204) for Python 2.4 that I have
> found....
>  
> 04/19/2005  09:00 AM         3,948,097 pywin32-204.win32-py2.4.exe
>  
> I may have more information later....  I have not yet been able to get
> on to the machine that is causing this problem...
>  
> But since it doesn't have Python loaded, it maybe difficult to isolate
> the line, etc that is causing this error....

Problems like this can be solved with dependencywalker (google for it).
The walker displays binary dependencies for images.

Using it I found this: win32net.pyd from build 204 does *not* use the
LsaLookupNames2 function in advapi32.dll.  However, win32net.pyd links
to netapi32.dll (among others), and netapi32.dll links to advapi32.dll,
using the name LsaLookupNames2.  This was on WinXP.

On win2k, netapi32.dll will not link to advapi32's LsaLookupNames2 -
otherwise it would not work.

So, your exe *should* be able to run on win2k - except if you distribute
XP's netapi32.dll with your exe (I've checked this with a trivial
py2exe'd script).

py2exe isn't very  good at determining which dlls belong to the
operating system, and so must not be distributed - netapi32.dll is such
a beast.  You should remove netapi32.dll from the dist directory, and it
should work on win2k.

And sorry for the false alarm on the threads you mention above ;-)

Thomas



More information about the Python-win32 mailing list