'contains version info for reference files that a conflict was found for
Type VerConflictType
ReferenceFile As String 'name of reference file that a conflict was detected on
ReferenceVersion As String 'reference file version
ReferenceDate As String 'reference file date
ReferenceSize As String 'reference file size
ReferenceFlags As Long 'reference file flags
'contains index to the ConflictListType array, there can
'be more than one ConflictListType for each VerConflictType
ConflictListIndex As Integer
End Type
' This structure holds information on the conflicting files, it is like
' a linked list, the VerConflictType contains an index to the first conflict,
' the last conflict contains a -1 in the index.
' Only the first conflict file is an actual conflict, the remaining files
' just indicates where else on the computer can the reference file be found.
Type ConflictListType
ConflictFile As String 'string containing path of file found with same name
'as the reference file, blank if file not found
ConflictVersion As String 'version of first conflict file
ConflictDate As String 'date of first conflict file
ConflictSize As String 'size of first conflict file
ConflictFlags As Long 'conflict flags of first conflict file
ConflictFXFlags As Long 'fixed file info flags of first conflict file
ConflictNext As Integer 'next file in the conflict list, -1 if this is last one
End Type
Global VerConflictList() As VerConflictType
Global ConflictList() As ConflictListType
Global ConflictFilesFound% 'files found during scan that are in conflict with embedded files
Global FileToCheck$ 'specifies the name of file to verify for
Global EmbedInfoFound% 'indicates whether we found other files during scan (we use this to
'determine whether the file contains embedded information or not)
Global ConflictFormCaption$ 'Caption for the conflict report form, if string is empty, then will default to form's caption.
'Version Information constants
Global Const VC_GETALL = -1
Global Const VC_REFERENCEFILE = 1
'Version Conflict constants
Global Const CF_OLDERFILE = &H1
Global Const CF_NEWERFILE = &H2
Global Const CF_OLDERVERSION = &H4
Global Const CF_NEWERVERSION = &H8
Global Const CF_SPECIALVERSION = &H10
Global Const CF_ALWAYSWARN = &H20
Global Const CF_FILEINMEMORY = &H40
Global Const CF_FILENOTFOUND = &H80
Global Const CF_NOVERSIONINFO = &H100
Global Const CF_FILESIZELARGER = &H200
Global Const CF_FILESIZESMALLER = &H400
Global Const CF_NOTINREGISTRY = &H800
'The following are duplicates of the VS_FF_* constants from Verinfo.bas
Global Const VS_FF_DEBUG = &H1&
Global Const VS_FF_PRERELEASE = &H2&
Global Const VS_FF_PATCHED = &H4&
Global Const VS_FF_PRIVATEBUILD = &H8&
Global Const VS_FF_INFOINFERRED = &H10&
Global Const VS_FF_SPECIALBUILD = &H20&
'Text formatting constants
Global NL As String 'new line
Global TB As String 'tab
'Tab Stop messages
#If Win32 Then
Global Const EM_SETTABSTOPS = &HB0 + 27
Global Const EM_SETREADONLY = &HB0 + 31
Global Const LB_SETTABSTOPS = &H180 + 19
#Else
Global Const EM_SETTABSTOPS = &H400 + 27
Global Const EM_SETREADONLY = &H400 + 31
Global Const LB_SETTABSTOPS = &H400 + 19
#End If
'File Open & Save Common Dialog constants
Global Const OFN_READONLY = &H1&
Global Const OFN_OVERWRITEPROMPT = &H2&
Global Const OFN_HIDEREADONLY = &H4&
Global Const OFN_NOCHANGEDIR = &H8&
Global Const OFN_SHOWHELP = &H10&
Global Const OFN_NOVALIDATE = &H100&
Global Const OFN_ALLOWMULTISELECT = &H200&
Global Const OFN_EXTENSIONDIFFERENT = &H400&
Global Const OFN_PATHMUSTEXIST = &H800&
Global Const OFN_FILEMUSTEXIST = &H1000&
Global Const OFN_CREATEPROMPT = &H2000&
Global Const OFN_SHAREAWARE = &H4000&
Global Const OFN_NOREADONLYRETURN = &H8000&
Global Const OFN_NOTESTFILECREATE = &H10000
Global Const TECHNOLOGY = 2 ' Device classification
Global Const HORZSIZE = 4 ' Horizontal size in millimeters
Global Const VERTSIZE = 6 ' Vertical size in millimeters
Global Const HORZRES = 8 ' Horizontal width in pixels
Global Const VERTRES = 10 ' Vertical width in pixels
Global Const BITSPIXEL = 12 ' Number of bits per pixel
Global Const PLANES = 14 ' Number of planes
' 32-Bit API Functions
#If Win32 Then
Declare Function GetDeviceCaps Lib "GDI32" (ByVal hDC As Long, ByVal nIndex As Long) As Long
Declare Function SendMessage Lib "User32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Declare Function SendMessageByNum Lib "User32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
Declare Function WinHelpBynum Lib "User32" Alias "WinHelpA" (ByVal hWnd As Long, ByVal lpHelpFile As String, ByVal wCommand As Long, ByVal dwData As Long) As Long
#Else
' 16-Bit API Functions
Declare Function GetDeviceCaps Lib "GDI" (ByVal hDC As Integer, ByVal nIndex As Integer) As Integer
Declare Function SendMessage Lib "User" (ByVal hWnd As Integer, ByVal wMsg As Integer, ByVal wParam As Integer, lParam As Any) As Long
Declare Function SendMessageByNum Lib "User" Alias "SendMessage" (ByVal hWnd As Integer, ByVal wMsg As Integer, ByVal wParam As Integer, ByVal lParam As Long) As Long
Declare Function WinHelpBynum Lib "User" Alias "WinHelp" (ByVal hWnd As Integer, ByVal lpHelpFile As String, ByVal wCommand As Integer, ByVal dwData As Long) As Integer
#End If
Sub FillConflictFileListBox(ByVal append2ctl%, lbox As Control)
Dim cfidx%, listidx%
If Not append2ctl% Then lbox.Clear
' ConflictFilesFound contains the number of conflicting files that were found.
If ConflictFilesFound% > 0 Then
cfidx% = UBound(VerConflictList)
' Get list of conflicting file names and place them in the list box.