|
Const SCS_32BIT_BINARY = 0
Const SCS_DOS_BINARY = 1
Const SCS_OS216_BINARY = 5
Const SCS_PIF_BINARY = 3
Const SCS_POSIX_BINARY = 4
Const SCS_WOW_BINARY = 2
Private Declare Function GetBinaryType Lib "kernel32" Alias "GetBinaryTypeA" (ByVal lpApplicationName As String, lpBinaryType As Long) As Long
Private Sub Form_Load()
'KPD-Team 2000
'URL: http://www.allapi.net/
'E-Mail: KPDTeam@Allapi.net
Dim Ret As Long, sMsg As String
Const sFile = "c:\windows\explorer.exe"
If GetBinaryType(sFile, Ret) <> 0 Then
sMsg = "The selected file is "
Select Case Ret
Case SCS_32BIT_BINARY
sMsg = sMsg + "a Win32-based application"
Case SCS_DOS_BINARY
sMsg = sMsg + "an MS-DOS – based application"
Case SCS_OS216_BINARY
sMsg = sMsg + "a 16-bit OS/2-based application"
Case SCS_PIF_BINARY
sMsg = sMsg + "a PIF file that executes an MS-DOS – based application"
Case SCS_POSIX_BINARY
sMsg = sMsg + "a POSIX – based application"
Case SCS_WOW_BINARY
sMsg = sMsg + "a 16-bit Windows-based application"
End Select
Else
sMsg = "The selected file is not an executable!"
End If
MsgBox sMsg, vbInformation
End Sub
|
|