|
Declare Function GetBinaryType Lib "kernel32" Alias "GetBinaryTypeA" (ByVal
lpApplicationName As String, lpBinaryType As Long) As Long Public Function TipoExe(NomeFile as String) as String Dim Dummy As Long, TipoFile As Long Dummy = GetBinaryType(NomeFile, TipoFile) If Dummy = 1 then Select Case TypeB Case 0 TipoExe = "Programma a 32 Bit per Windows" Case 2 TipoExe = "Programma a 16 Bit per Windows" Case 1 TipoExe = "Programma per DOS" Case 5 TipoExe = "Programma per OS/2" Case 3 TipoExe = "Programma Windows generico, File PIF" Case 4 TipoExe = "File in formato eseguibile POSIX per Unix" End Select Else TipoExe = vstringnull 'il file non e un eseguibile End If End Function |