Re: DLL version number

Discussion in 'Python' started by xytho33, Mar 24, 2005.

  1. xytho33

    xytho33 Guest

    I also need to be able to get the version info from a windows DLL
    preferably in the same format
    as what is displayed in the properties tab.

    I was overjoyed to find the little demo program filevers.py distributed in
    the win32api download.

    Unfortunately I get this error when I execute the script:

    C:\work>getfilever.py
    Traceback (most recent call last):
    File "C:\work\getfilever.py", line 8, in ?
    d=win32api.GetFileVersionInfo(fname, '\\')
    pywintypes.error: (1812, 'GetFileVersionInfo:GetFileVersionInfoSize', 'The
    specified image file did not contain a resource section.')

    Anybody know what this means, or more importantly, if there is a
    work-around?

    Thanks,
     
    xytho33, Mar 24, 2005
    #1
    1. Advertising

  2. On Thu, 24 Mar 2005 18:53:00 -0500, "xytho33" <>
    declaimed the following in comp.lang.python:

    > d=win32api.GetFileVersionInfo(fname, '\\')
    > pywintypes.error: (1812, 'GetFileVersionInfo:GetFileVersionInfoSize', 'The
    > specified image file did not contain a resource section.')
    >
    > Anybody know what this means, or more importantly, if there is a
    > work-around?
    >

    Work around -- catch the exception...

    What it means is that the file you gave the call does not have a
    standard resource section... IE, the file doesn't have the "version
    block" defined.

    --
    > ============================================================== <
    > | Wulfraed Dennis Lee Bieber KD6MOG <
    > | Bestiaria Support Staff <
    > ============================================================== <
    > Home Page: <http://www.dm.net/~wulfraed/> <
    > Overflow Page: <http://wlfraed.home.netcom.com/> <
     
    Dennis Lee Bieber, Mar 25, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Anushi
    Replies:
    5
    Views:
    8,789
  2. V Green
    Replies:
    0
    Views:
    865
    V Green
    Feb 5, 2008
  3. PA Bear [MS MVP]
    Replies:
    0
    Views:
    975
    PA Bear [MS MVP]
    Feb 5, 2008
  4. MowGreen [MVP]
    Replies:
    5
    Views:
    2,025
    PA Bear [MS MVP]
    Feb 9, 2008
  5. H. Simpson
    Replies:
    4
    Views:
    289
    H. Simpson
    Aug 3, 2004
Loading...

Share This Page