|
-
Aug 3rd, 2006, 03:48 PM
#1
Thread Starter
Junior Member
[RESOLVED] How do I get a DLL file version in VB6?
Hello poeple,
I have been coming to this site for over a year and for the first time, I cannot find the answer using the search feature...
I am creating a small Client/Server app that will run before my main app and verify that all of the client files are of the latest version by comparing the dll list of the client to a list on the server...
I found out using an hex editor that the version is stored at 114h & 115h for the major and 116h & 117h for the minor
is there an easier way to get the version of the file without opening it in text and extracting the info?
Thanks a bunch!
-
Aug 3rd, 2006, 04:00 PM
#2
Re: How do I get a DLL file version in VB6?
You should use the GetFileVersionInfo API function. I don't know if it's easier but it's definitely a more reliable way of getting the file version compared to reading fixed bytes in the file.
Resources:
http://vb.mvps.org/samples/project.asp?id=fileinfo
http://vb-helper.com/howto_file_version_info.html
-
Aug 3rd, 2006, 05:24 PM
#3
Re: How do I get a DLL file version in VB6?
if you don't fancy implementing the API yourself then you can use fso:
VB Code:
' Requires reference to Microsoft Scripting Runtime
Dim fso As FileSystemObject
Set fso = New FileSystemObject
Debug.Print fso.GetFileVersion("C:\windows\system32\comctl32.dll")
Set fso = Nothing
-
Aug 3rd, 2006, 10:05 PM
#4
Thread Starter
Junior Member
Re: How do I get a DLL file version in VB6?
Great Bushmobile, I cant test it right now but it really sounds like what I needed
Thanks a bunch
-
Jun 28th, 2017, 10:01 AM
#5
New Member
Re: How do I get a DLL file version in VB6?
Thank you Bushmobile... Great refresher! Thanks for posting this! Yeah... still maintaining a VB 6.0 application since 2010! LOL
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|