如何得到某文件的本版信息。
如文件版本、说明、版权、公司名称的具体值,像WINDOWS中某文件的属性中的版本一样。解决问题者。送100分

解决方案 »

  1.   

    use the GetFileVersionInfoSize, GetFileVersionInfo, and VerQueryValue API functions, seehttp://www.vb-helper.com/howto_file_version_info.html
      

  2.   

    Option ExplicitPrivate Const SW_SHOW = 5
    Private Const SEE_MASK_INVOKEIDLIST = &HC
    Private Type SHELLEXECUTEINFO
        cbSize As Long
        fMask As Long
        hwnd As Long
        lpVerb As String
        lpFile As String
        lpParameters As String
        lpDirectory As String
        nShow As Long
        hInstApp As Long
        lpIDList As Long
        lpClass As String
        hkeyClass As Long
        dwHotKey As Long
        hIcon As Long
        hProcess As Long
    End TypePrivate Declare Function ShellExecuteEx Lib "shell32.dll" (ByRef s As SHELLEXECUTEINFO) As LongPrivate Sub DisplayFileProperties(ByVal sFullFileAndPathName As String)
        Dim shInfo As SHELLEXECUTEINFO    With shInfo
            .cbSize = LenB(shInfo)
            .lpFile = sFullFileAndPathName
            .nShow = SW_SHOW
            .fMask = SEE_MASK_INVOKEIDLIST
            .lpVerb = "properties"
        End With
        ShellExecuteEx shInfo
    End Sub
    Private Sub Command1_Click()
        DisplayFileProperties "C:\CONFIG.SYS"
    End Sub