' 过程名称:GetFileVersions ' 功能描述:得到传入文件的版本号 ' 接收参数:sFilePathName:带有路径的文件名 ' 返回参数:文件的版本号字符串 ' 创建人员及日期:zzz@2006-03-08 ' 注意事项:传入的文件名需要为*.exe,*.dll,*.ocx Public Function GetFileVersions() Function GetFileVersions(ByVal sFilePathName As String) As String Dim file1 As System.Diagnostics.FileVersionInfo Try file1 = System.Diagnostics.FileVersionInfo.GetVersionInfo(sFilePathName) GetFileVersions = file1.FileVersion Catch ex As Exception GetFileVersions = "" Throw New Exception("Error In GetFileVersions!!!" & vbCrLf & _ "Source:" & ex.Source.ToString()) End Try End Function