Determining win32 dll dependency

Thomas Heller theller at python.net
Mon Aug 15 11:47:42 EDT 2005


Robin Becker <robin at reportlab.com> writes:

> A client requested that I send MSVCR71.DLL along with the rest of an
> application as it wasn't present on his machine.
>
> That is allowed as
>
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_crt_c_run.2d.time_libraries.asp
>
> seems to explicitly allow for this.

For a discussion about the rights (or not) to distribute msvcr71.dll you
could read the py2exe-users lists archive.

> I would like to automate my build script to include this file, but
> cannot think of an automatic way to determine which of msvcr70/71.dlls
> .... are needed.

py2exe contains an extension module that determines binary dependencies:

>>> from py2exe.py2exe_util import depends
>>> impport pprint
>>> pprint.pprint(depends(r"c:\windows\system32\notepad.exe").keys())
['C:\\WINDOWS\\system32\\USER32.dll',
 'C:\\WINDOWS\\system32\\SHELL32.dll',
 'C:\\WINDOWS\\system32\\comdlg32.dll',
 'C:\\WINDOWS\\WinSxS\\X86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\\COMCTL32.dll',
 'C:\\WINDOWS\\system32\\ADVAPI32.dll',
 'C:\\WINDOWS\\system32\\msvcrt.dll',
 'C:\\WINDOWS\\system32\\WINSPOOL.DRV',
 'C:\\WINDOWS\\system32\\GDI32.dll',
 'C:\\WINDOWS\\system32\\KERNEL32.dll']
>>>

Thomas



More information about the Python-list mailing list